Merry Christmas with three.js and cannon.js
Posted :
I made a simple 3D demo with three.js and cannon.js
I didn’t have much time bacause of the year end, but it is barely working before the Christmas…thanks to cannon.js which is a 3D physics engine for JavaScript, and it supports height field feature.
For that demo, I made a height field converter to make a matrix and both cannon.js body and three.js mesh from an image. Therefore, it’s easy to replace the height field. I also prepared one more demo with another image.
The first demo is using following image.
It was rendered in Blender, then imported to canvas2d, and then, makes a matrix for the height field.
The second one is working in the same way aside from the height field image.