Without the use of a single line of Script, does a 3D Minecraft implementation become created wholly in CSS and HTML? Well, the answer is!
Although this tiny copy only has the ability to play with blocks in a world that is only 9x9x9, it is amazing that Benjamin Aster was able to do it all using only CSS and pure HTML. It’s very smart in terms of proofs of idea.
The project consists of roughly 40,000 lines of HTML radio buttons and labels, combined with fewer than 500 lines of CSS where the real work is done. In [Benjamin] explains that each block in the 9x9x9 world is defined with the help of tens of thousands of and elements to track block types and faces, and CSS uses that as a type of display filter. Clicking a block is clicking a label, and changing a block type (“air” or no block is considered a type of block) switches which labels are visible to the user.
CSS animations that apply changes to the displayed content are used to implement 3D seeing. A watch shift occurs when you click a command to start and end the animation. For simple HTML and CSS, there is a lot of unusual functionality, demonstrating what is possible with a little outside-the-box thinking.
If you want to look more in-depthly into CSS-Minecraft and how it functions, [Simon Willison ] has written a more in-depth analysis of it. The code is available on Git Hub.
Don’t overlook and Minecraft Running in… Minecraft when you’ve finished checking that out and are looking for more brilliance.