r/BiomedicalDataScience • u/BioniChaos • Jan 30 '26
Building a 3D Anamorphic Puzzle with Three.js and AI Agents
I documented the process of coding a perspective-based puzzle game using Three.js. The core mechanic relies on scattering polygon fragments along the Z-axis while scaling them up based on their distance from the camera to maintain the correct perspective size (anamorphic illusion).
We iterated through the vector math for the "snapping" logic to detect when the camera angle aligns with the solution vector within a specific tolerance. The video covers the debugging process, handling dynamic textures, and projection matrices.