Primitive Geometry

Cube, sphere, cylinder, and plane. This example shows how to create basic shapes with simple materials.

Transport

In the browser, use a canvas with id vulfram-canvas.

Key steps

1. Create the camera and the light.

2. Generate geometry with createGeometry.

3. Create simple materials with color textures.

4. Instantiate models and position them with updateTransform.

Full example

Use this snippet as a base and tweak each primitive to experiment.

ts
Live demo canvas