Private OptionalrenderingPrivatesavedPrivatescenePrivateanimationLate-bind the rendering-controls reference. The InputHandler may
receive its setRenderingControls(controls) call after the
window listeners are already registered, so we accept the late
wiring instead of forcing the caller to re-attach.
Register the three window/document listeners and append the
unregistration thunks to cleanups. Returns nothing — the
cleanups array is the caller's source of truth.
PrivateonHandle window resize: update canvas / camera dimensions and kick the animation loop so the resized scene renders.
PrivateonHandle fullscreen enter/exit. While in fullscreen, force the
canvas to fill the viewport via inline styles; on exit, drop the
style attribute entirely.
The single rAF after the style change is intentional: modern
browsers fire fullscreenchange after the viewport transition
completes, so one frame is enough to capture final dimensions
before calling updateSize().
PrivateonHandle mouse-wheel events. Orbit/ortho controls own the actual
zoom math (they listen for wheel on the canvas separately). All
we do here is:
updateFOV now persists the perspective FOV stash even in
ortho for DELIBERATE reset/zarr/panel applies, so the interactive
wheel must be gated here or a pinch would corrupt that stash. The
delta handed to updateFOV is normalized to pixel-mode equivalent
(normalizeWheelDelta), which puts a line-mode browser's notch in the
same ballpark as a pixel-mode one — 2.4 vs 5.0 degrees, instead of
0.15 vs 5.0 before. When the FOV actually changed, switch the
rendering-controls preset to "Custom" so the panel value matches the
slider.
The canvas
styleattribute as it was just before we entered fullscreen, so exiting restores exactly what the embedder authored (e.g.width:100%;height:100%inside their container) instead of wiping every inline style.nullwhen not in fullscreen.