Comment by felineflock
9 months ago
Please tell me if I understood it correctly:
It implements voxels via <input type="radio" />.
Each of the faces of each voxel is configured via <label>s, one for each face having a different CSS class.
There is a voxel for each type of block (dirt, grass, stone, etc) and only one is activated at a time.
The <input>s are arranged in a 9x9 grid 10 blocks tall times the number of different types of blocks (about 6500 total).
All that is enclosed with <div>s with CSS classes that respond to the camera navigation (look up/down, move up/down, forward/back, clockwise/counter)
That is brilliant!
Note: the <input> tag does not use and does not need a closing slash and never has in any HTML specification.
https://html.spec.whatwg.org/dev/input.html#the-input-elemen...
It's sometimes done to make the same markup compatible with XHTML, without harming its interpretation in HTML.
You are either running XHTML or you are not. No need to carry any compatibility overhead. I doubt he is serving XHTML.
9 replies →