11975 shaares
316 private links
316 private links
Some CSS variables are computed in JS, and the rest is made by CSS and the browser. Each item is a <div>:
<div class="wall" style="
--start-x: 2560;
--start-y: -2112;
--end-x: 2560;
--end-y: -2496;
--floor-z: 32;
--ceiling-z: 88;
">
All the geometry calculation is made in the browser.
JavaScript passes raw DOOM data in. CSS does the trigonometry.
JavaScript runs the game loop. CSS does the rendering.