v2.1.0-beta.4
Pre-releaseMinor Changes
-
9982b33: Unify the coordinate frame: the Three.js scene is now Rhino's frame (Z-up), end to end.
Previously the display pipeline rotated Rhino Z-up geometry into Three's native Y-up
((x, y, z) → (x, z, −y)) during mesh decompression and display-item parsing. That hidden
rotation meant every feature producing or consuming positions — measurements, mesh metadata,
label anchors, picking, the new camera presets/grid — had to round-trip through it or silently
land in the wrong frame.The rotation is removed everywhere. A Rhino point
(x, y, z)is now the Three point(x, y, z):rhinoToThreeis the identity (kept, deprecated, for call-site compatibility).- The int16/float32 vertex paths in
webdisplay/batch-parser.tspass vertices through unrotated. initThreeorients the camera, default iso position, sunlight, floor, and reference grid to the
scene up axis (Z-up by default); the camera controller's presets are likewise up-derived.
Breaking: any consumer that assumed viewer geometry was Y-up (e.g. reading mesh vertex
positions, placing objects, or computing directions in Three space) must drop the
(x, z, −y)conversion — Three space now equals Rhino space. TheapplyTransformsoption is
retained but no longer rotates; it will be removed in a future release.
Patch Changes
-
9982b33: Make the measurement tool easier to read and aim, and report per-axis deltas.
- Distance labels now carry a default style (dark translucent pill, light text) so they stay
legible on any background instead of inheriting the page color (previously invisible white-on-white).
PassinglabelClassNamestill opts out of all default styling. - The tool previews the snap point: a ghost marker follows the cursor and jumps to the vertex a
click would lock onto, so you can aim before committing.MeasureToolgainshandleMove(event),
whichinitThreewires to canvasmousemove. - Orbiting/panning no longer disturbs a measurement: the
clicka drag fires on release is ignored
(pointer moved past a small slop threshold), so in-progress points and finished measurements survive
rotation instead of being cleared or mis-placed. - The default label now shows the per-axis breakdown (
Δx/Δy/Δz) under the total distance. The
formatcallback signature widens to(distance, delta) => string; existing(distance) => string
callbacks remain valid.
- Distance labels now carry a default style (dark translucent pill, light text) so they stay
-
9982b33: Make the viewer's camera controller, presets, and grid respect the scene up axis.
The CAD tooling assumed Three's native Y-up, but Selva scenes are Z-up.
initThreeset
scene.upto Z yet never setcamera.up, so OrbitControls orbited as if Y-up and the
preset views (top/front/…) framed the wrong faces; the grid also defaulted to the
horizontal Y-up plane.initThreenow setscamera.upto the configuredsceneUpbefore constructing
OrbitControls and the camera controller (both capture the orbit/preset basis from up).- The camera controller derives its preset view directions, iso angle, and orthographic
camera up from the up axis instead of a hardcoded Y-up table, via a new optionalup
dependency (defaults to the perspective camera's up). - The grid's default plane is derived from the up axis (Z-up →
plane: 'z'), so the grid
lies under the model without callers passingplaneexplicitly. An explicitplane
still wins.
No API changes; behavior is corrected for non-Y-up scenes and unchanged for Y-up.