Vanilla javascript 3d filled heightmap

Previous Image | Next Image
Description: Games like 'virus' in the 80's used maps looking like this. 

By starting to ask Claude 3 for a rotating 3d cube. Then for a filled cube with zbuffering. Then a face of this cube made of a grid. Then this grid as a height map. I ended up with a 3d part without using any external libraries or complex code required.

The code is pretty solid I think. And short. Zooming into the model causes line drawing corruption. Maybe by drawing it on a offline canvas and keeping the model small. Then only showing the center part of the offline canvas on the main canvas. This might be solved?

I think it might be soon, with these llm's, that creating a 3d engine or 3d game can get very easy. 

The code can be found on my github (user:pakz001 repo in the html5 javascript 3d folder)
Picture Stats:
Views: 14
Filesize: 774.09kB
Height: 1461 Width: 1441
Keywords: Height map. 3d, javascript, html, vanilla, canvas 2d 
Posted by: Pakz at March 19, 2024, 11:59:50

Image Linking Codes
BB Code
Direct Link
Show Html Link Code
0 Members and 1 Guest are viewing this picture.

Comments (0)



Powered by: SMF Gallery