File under: javascript, raymarcher, 3d, development, online
Javascript Ray Marcher v0.15
In this final version, I write some proper documentation and code comments, instead of some very sparse // comments.
You can add objects to the render by writing javascript in the box below, then click go to see the preview and then the full render.
### Primitives
These are the shapes available to use in the scene. Almost all shapes work the same way:
Primitive (x,y,z,scale,Red,Green,Blue)
Red, Green and Blue must be between 0.0 and 1.0. So to draw a blue sphere of radius 3, use:
Sphere(0,0,0, 3, 0.0,0.0,1.0)
The shapes available are:
- Sphere
- BlobCylinder
- Cylinder( x1, y1, z1, x2,y2,z2, x3,y3,z3,radius, red, blue, green)
- Lsystem
- PointCloud
- Triangle ( x1, y1, z1, x2,y2,z2, x3,y3,z3,thickness, red, blue, green)
- Tetrahedron ( x1, y1, z1, x2,y2,z2, x3,y3,z3,thickness, green, blue, green)
- Terrain - everything y<0
- Cube - radius is from centre to face of cube.
DebugDivxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx