Skip to content

v0.22.0 — Studio look, pixelRatio, plate thumbnails

Choose a tag to compare

@sobechestnut-dev sobechestnut-dev released this 12 Nov 00:22
c5013ab

All fourteen @chestnutlabs/* packages release in lockstep at v0.22.0 (npm, provenance).

This is a minor release. Everything new is opt-in, and with no new options set the viewer looks and behaves as before, except for the bug fixes listed under "Behaviour changes".

New

  • Studio viewport look (DD-032; #470, #485, #484, #492, #493, #503): an opt-in preset, theme: studioTheme('dark' | 'light') / setTheme. It adds a camera lens control (setCameraFov) and a build plate in the source-model viewer. The default look is unchanged.
  • pixelRatio / setPixelRatio (#495) on the toolpath and model viewers, on core and all four adapters. When it is unset, the renderer's own ratio is kept and the default capture() size is unchanged.
  • Model-viewer build-volume cage toggle: setBuildVolumeCage / showVolumeCage (#498).
  • Thumbnails:
    • Prusa .bgcode preview images (#482) and .gcode.3mf plate images (#489) now reach metadata.thumbnails. Plate images follow parseOptions.plate.
    • G-code-comment JPG/QOI thumbnails report their real mime (#488).
    • New warning code: container-thumbnail-invalid.
  • The 2D renderer records a renderer-unsupported disclosure for the lens and pixelRatio.

Behaviour changes (observable to consumers)

  • renderStill now rejects instead of hanging when the toolpath build fails (#494). It rejects with an exported RenderStillError with code: 'E_GEOMETRY_BUILD', and the renderer is already disposed. Add a catch to any still job that awaited without one.
  • Oversize numbers: a coordinate, E, F or S word too large for float32 is dropped with a number-out-of-range warning (#506). It used to become Infinity in the segments and bounds.
  • Arcs (#506): helical G2/G3 arcs ramp from the start height toward the target. Negative-R arcs take the long way round, as the standard specifies.
  • Print-time estimates (#506): now read for Bambu Studio and for OrcaSlicer files from every printer profile. Estimates of a day or more are read for PrusaSlicer and OrcaSlicer too.
  • A parse limit passed as undefined now keeps its default (#506). It used to disable that limit.
  • Colour and time modes tolerate non-finite values (#500):
    • color-by-speed no longer throws on an infinite feed rate;
    • computeToolpathTime no longer returns NaN;
    • createProgressMapper().observe(null) returns unavailable;
    • builder retraction/colour-change events before the first segment use the segment frame.
  • <gcode-model-viewer> (#505): the pixel-ratio, camera-fov and background attributes set in markup are now reflected by their property getters. Before connect, the last write wins, whether it was an attribute or a property.
  • React onDisclosure reports the current build's text, not the previous one's (#499).
  • Interaction quality (interactionQuality: 'auto', #486): after an orbit on a HiDPI screen the view returns to the resolution it had before, not the full device pixel ratio. A custom renderer pixel ratio survives orbits and setInteractionQuality('off').

Publishing

release-publish.yml tries npm trusted publishing (OIDC) first and falls back to NPM_TOKEN. It reports which one each package used (#497, #460).

Full per-package notes are in each package's CHANGELOG.md.