Zoom
The zoom() function returns camera zoom level. It sets the zoom level, if a value is provided.
A higher zoom value results in a closer view of the scene. Default zoom value is defined such that 1
unit in the scene is equal to 1 pixel on screen.
The zoom value is equal to the inverse of the camera's scale.
const zoomies = slider( "Zoom", 1, 100, 1, { step: 1 } ); grid(); sphere(1); sphere(32).pos([100, 0, 0]); update(() => { zoom(zoomies.value()); });
Some values depend on the zoom level, like the graph3d() resolution.