Camera & Lighting
Automatic framing
When a model is loaded, the camera distance is chosen so the whole model fits in the view. Call resetCamera() to return to this position after the user has moved the camera.
Camera props
The camera is placed at camera-distance from the target, rotated by camera-euler. The target is the center of the model plus camera-offset. For example, to look at the face from slightly to the left:
camera:change is emitted whenever the camera position or target changes, and camera:options-change when camera-options changes.
Orbit controls
Set camera-interaction to let users move the camera with the mouse or touch. It is off by default.
When roll is enabled, the canvas becomes focusable. Users click the canvas (or move focus to it with Tab) before pressing Q / E.
Lights
The scene has an ambient light and a directional light.
Changes are applied immediately and reported through light:ambient-change and light:directional-change.