JS-3D Engine is a raw WebGL2 renderer built from scratch to push the limits of vanilla JavaScript. By bypassing high-level libraries, I’ve implemented low-level graphics math usually reserved for C++ engines.
Major Milestones
Z-Fail Stencil Shadows: Implemented “Carmack’s Reverse” to create pixel-perfect volumetric shadows by extruding mesh silhouettes into the stencil buffer.
Quaternion Camera: Built a 6-DOF camera system using quaternions and Gram-Schmidt orthogonalization to ensure smooth, gimbal-lock-free navigation.
Manual Pipeline: Created a custom .obj parser and a CPU-side clipping engine to handle geometry and vertex-normal averaging for high-fidelity lighting.
Integrated Light Manager: Developed a real-time inspector for Point, Spot, and Directional lights, allowing for instant scene manipulation and intensity scaling.
Mesh Loading & Performance
Please note that the initial plane model loaded is single-sided. Since the current lighting and shadow extrusion logic is not optimized for paper-thin, flat planes, lighting artifacts may occur on the reverse side. I strongly encourage users to utilize the OBJ Loader to import manifold 3D geometry; loading complex, solid models is the best way to truly test the engine’s architectural limits and the precision of the volumetric shadow system.
The Vision
The goal is to prove that a modern, feature-rich 3D engine can be lightweight, dependency-free, and highly performant using only the browser’s native capabilities.