Share your repls and programming experiences

← Back to all posts
3D Renderer and Physics Engine
tristanbeedell

It's a 3D graphical renderer and physics engine made with HTML canvas and JS. I didn't use any packages or anything. Honestly I made it ages ago and cannot remember how it works at all. All I remember is that it took forever to build.

Controls
arrow keys to move,
space to jump,
scroll to zoom,
drag to rotate.

All of the blocks are generated randomly.

Voters
NoahPorsche
duck132912
DREWNOLT
elburg
NathanPp
TurtleAndrew
ivanchang309
MemeManHimself
TMH97
atariguy123
Comments
hotnewtop
XxMustardCatxX

turn speed 100 is..

the best

CONNERSTANEK

lol

tristanbeedell

@CONNERSTANEK haha I remember this happening. I have a feeling it's a divide by 0 error.

elburg

nice

Fhillis

This is really cool, and I love it a lot, do you mind if I fork it and pull it apart, I notice an issue that when two objects take up some of the same space, it doesn't quite know what to do with them and plots one over the other almost at random (i'd like to see if I can get it to render correctly)

tristanbeedell

@Fhillis sure. At the moment it renders the shapes in order of their distance from their center to the camera.
The soting is done in render.js lines 20 to 42 it seems.

kaldisberzins

WOW that is awesome! I found a bug that sadly you probably won't be able to fix: when the block jumps some of the objects around it flicker.