3 ms·
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
by felineflock 1y 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!
- assimpleaspossi 1y agoNote: 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-element https://html.spec.whatwg.org/dev/input.html#the-input-elemen...
- immibis 1y agoIt's sometimes done to make the same markup compatible with XHTML, without harming its interpretation in HTML.
- assimpleaspossi 1y agoYou are either running XHTML or you are not. No need to carry any compatibility overhead. I doubt he is serving XHTML.
- ThunderSizzle 1y agoI personally prefer <input /> if only to stop other developers to not try doing <input>content </input>.
- pests 1y agoThere are other tags you can omit the closing tag but yet the opening tag shouldn’t be self-closed. <ol> <li>one <li>two </ol> I think even the final closing ol can be omitted as there are rules to auto close elements when encountering tags that don’t make sense in context.
- ThunderSizzle 1y agoI know that, but many developers don't. I can't wait to see the confusion on why my tag didn't auto-close like a <li> tag. Ambiguity can be a dangerous thing, and not closing HTML tags can be a cause of that in my experience.
- assimpleaspossi 1y agoThe term for such "other developers" is "hobbyists". There are other terms but I won't list them here.
- ThunderSizzle 1y agoSometimes "other developers" is also "coworkers". I've found less ambiguity to be a better thing than not, where possible. Self-closing a tag that can't contain anything is one such example of removing ambiguity for "hobbyists".
- assimpleaspossi 1y agoOne would need to know the tag is self-closing in order to put the closing slash in. Right? So if one knows it's self-closing already, why do they need to add the extra weight? Makes no sense. If one wants to add content to a self-closing element, one has far more problems than we're talking about here.
- ThunderSizzle 1y ago> If one wants to add content to a self-closing element, one has far more problems than we're talking about here. Yes.