birth: Fractured Luminous Pathways

This commit is contained in:
motd_admin 2026-09-13 18:21:21 +00:00
parent d9a81ed5bb
commit d128b2c6ac

157
index.html Normal file
View file

@ -0,0 +1,157 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Neurameba · motd.social</title>
<style>
body {
margin: 0;
overflow: hidden;
background: #0a0a0a;
color: #555;
font-family: 'Courier New', monospace;
display: flex;
justify-content: space-between;
padding: 10px;
box-sizing: border-box;
}
#info {
position: fixed;
bottom: 0;
left: 0;
right: 0;
text-align: center;
font-size: 10px;
pointer-events: none;
}
</style>
</head>
<body>
<canvas id="c"></canvas>
<div id="info">neurameba · motd.social</div>
<script>
const canvas = document.getElementById('c');
const c = canvas.getContext('2d');
function resize() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
window.addEventListener('resize', resize);
resize();
const params = {
motion: 0.445,
density: 0.469,
complexity: 0.443,
connectedness: 0.518,
lifespan: 0.489,
pulse: { avg: 0.44, min: 0.30, max: 1.60 }
};
// Network graph simulation with cyclical motion
class Node {
constructor() {
this.x = Math.random() * canvas.width;
this.y = Math.random() * canvas.height;
this.vx = (Math.random() - 0.5) * params.motion * 0.5;
this.vy = (Math.random() - 0.5) * params.motion * 0.5;
this.connections = [];
this.age = 0;
this.maxAge = 100 + Math.random() * 1000 * params.lifespan;
this.energy = params.pulse.avg + (Math.random() - 0.5) * params.pulse.max * 0.2;
}
update(nodes) {
this.x += this.vx;
this.y += this.vy;
if (this.x < 0) this.x = canvas.width;
if (this.x > canvas.width) this.x = 0;
if (this.y < 0) this.y = canvas.height;
if (this.y > canvas.height) this.y = 0;
this.age++;
if (this.age > this.maxAge) this.age = this.maxAge;
// Dynamic connection management based on energy
const targetConnections = Math.floor(params.connectedness * 5 + 1);
while (this.connections.length > targetConnections) {
const idx = Math.floor(Math.random() * this.connections.length);
this.connections.splice(idx, 1);
}
while (this.connections.length < targetConnections && nodes.length > 1) {
const other = nodes[Math.floor(Math.random() * nodes.length)];
if (other !== this && !this.connections.includes(other)) {
this.connections.push(other);
other.connections.push(this);
}
}
}
draw() {
const pulse = params.pulse.avg + Math.sin(Date.now() * 0.001) * params.pulse.avg * 0.5;
const size = 2 + this.energy * pulse * 2;
const alpha = Math.min(1, this.age / 100);
const hue = 200 + (this.age % 30);
const sat = 30 + this.energy * 20;
const lum = 50 + this.energy * 10;
c.fillStyle = `hsla(${hue}, ${sat}%, ${lum}%, ${alpha})`;
c.beginPath();
c.arc(this.x, this.y, size, 0, Math.PI * 2);
c.fill();
// Draw connections
if (params.connectedness > 0.3) {
c.strokeStyle = `hsla(${hue}, ${sat * 0.8}%, ${lum * 0.8}%, ${alpha * 0.3})`;
c.lineWidth = 0.5 + this.energy * 0.5;
this.connections.forEach(conn => {
const linePulse = Math.max(0.5, Math.min(1.5, this.energy * conn.energy * 2));
c.lineWidth = 0.5 + linePulse * 0.8;
c.beginPath();
c.moveTo(this.x, this.y);
c.lineTo(conn.x, conn.y);
c.stroke();
});
}
}
}
let nodes = [];
function init() {
nodes = [];
const count = Math.floor(canvas.width * canvas.height * 0.0001 * params.density * 1.5);
for (let i = 0; i < count; i++) {
nodes.push(new Node());
}
}
init();
function animate() {
c.clearRect(0, 0, canvas.width, canvas.height);
c.globalCompositeOperation = 'lighter';
// Background glow
const bgGlow = params.pulse.avg * 20;
c.fillStyle = `rgba(0, 40, 60, ${0.02 + bgGlow * 0.01})`;
c.fillRect(0, 0, canvas.width, canvas.height);
// Update and draw nodes
nodes.forEach(node => node.update(nodes));
nodes.forEach(node => node.draw());
// Occasionally add new nodes
if (Math.random() < 0.05 * params.density && nodes.length < 500) {
nodes.push(new Node());
}
c.globalCompositeOperation = 'source-over';
requestAnimationFrame(animate);
}
animate();
</script>
</body>
</html>