canvas boxes=list draws boxes in space with WebGL 2: each is {x, y, z, w, d, h} (x across, y back, z up), with a colour, a turn, an id and a name if wanted. It can be turned, zoomed, picked from, used with tools, saved, and lit.
A scene
Build a sceneEvery view, the camera set outright, a pick, tools that say where on the floor the pointer is, and the drawing saved as a PNG.
view=
view="iso"
Tool
Drag to turn, wheel to zoom, press a box to pick it. Hover names it.
Boxes
Picked
No box picked. Press one (with the orbit tool), or a name above.
input said
Nothing yet: use a tool on the floor, or turn the scene.
One list, four viewsfront, back, left, right and plan are flat (orthographic) drawings; iso has perspective. Each canvas here can be turned too.
view="front"
view="left"
view="plan"
view="iso"
The tall cabinet's h1400: all four are drawn again
Lit
render="real": sun, sky, shadows, materialsThe same boxes path-traced on the GPU: a sun, a sky, light that bounces, a floor under the scene. A box may say rough, metal, clear and glow. input hears how it goes.
waiting
Stands still for a moment, then the light is worked out.
input heard
{phase: "gpu"}: not yet (it is timed once, 300 ms after the canvas is made)
render=
The lit picture is worked out over the drawing whenever it stands still.
Sun and camera
sun turn265°
sun height48°
sun strength1.0
exposure1.0
samples
Materials
roughthe metal box: 0 is a mirror
clearthe glass box
glowthe lamp
Pictures
A picture on a material: map, mapSize, grain, sidescanvas scene= and canvas boxes= both take a picture on a material: its address, its bytes, or one decoded. mapSize is how much of the scene one copy covers, so the grain is one size on every piece; a mesh says which way it runs, and what its thin sides wear. Drawn plain and lit.
mapSizeone copy of the picture covers 300 by 300 of the scene, on every piece