AMBIENT LIGHT
INTERACTION_013CSS + JS
Mouse Glow
Large ambient light that trails the pointer across a section.
Mouse / MediumView
Each layer receives a depth factor and translates by a fraction of the normalized pointer offset, producing dimensional depth without scroll.
scene.addEventListener("pointermove", (e) => {
const r = scene.getBoundingClientRect();
const x = (e.clientX - r.left) / r.width - 0.5;
const y = (e.clientY - r.top) / r.height - 0.5;
scene.querySelectorAll("[data-depth]").forEach((layer) => {
const d = Number(layer.dataset.depth);
layer.style.transform = `translate3d(${x * d * 40}px, ${y * d * 40}px, 0)`;
});
});Large ambient light that trails the pointer across a section.
Perspective tilt that responds to pointer position.
Dot plus trailing ring with contextual labels.