Skip to content

1.0.2

Latest
Compare
Choose a tag to compare
@keithclark keithclark released this 07 Jun 08:00

⚠️ Breaking changes

  • r102 is now the minimum supported version of Three.js

Updates

  • Support for the width and height attributes — These take pixel values but can be overridden with any unit values using inline styles (style="width|height") or in CSS. <x-model> should now following the same behaviour as the <img> element when setting dimensions.
  • Performance improvementsIntersectionObserver is used to ensure only models that are in visible in the viewport are queried and painted (saves lots of calls to getComputedStyle and parsing CSS transform strings into Matrix4).
  • Move to shadow DOM — models now construct a hidden DOM bounding box, which is monitored by an IntersectionObserver. These elements, along with default styling are now applied in the Shadow DOM, rather than injected into the main page.
  • Fix clipping issue — ThreeJS changed the scissor origin reference in r102, which inverted vertical clipping. This is now fixed.

Other

  • Remove unused helpers
  • Fixed lag in the 3D scene example
  • Added debugging support through CSS custom properties:
    • --xModelBoundingBoxTransformStyle - sets transform-style of a bounding box element
    • --xModelBoundingBoxVisibility - sets the visibility of a bounding box element
  • Updated the NPM build scripts
  • Updated package.json to only include the minified dist file when npm installed as a dependency.