Skip to content

v0.31.0

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Nov 01:42
· 7 commits to main since this release

Breaking and behavior changes

  • The package is an ES module only (#563). The CommonJS build, dist/pwc.cjs, and its .d.cts typings are gone. require('@playcanvas/web-components') works on Node 22.12 and later, which load the ES module. Jest in CommonJS mode and older Node versions get Node's error that the package is an ES module. The script-tag builds are unchanged.
  • Asset and material ids are looked up in the element's own <pc-app> first, then in its own tree (#559). Two applications can now reuse an id, and an application inside a shadow root resolves its own assets and materials. An application in a shadow root no longer falls back to an id declared in the document outside it. AssetElement.get returns undefined, as documented, where it returned null for an asset not yet created.
  • A dotted animation track name is renamed, not skipped (#561). Under a bare <pc-anim>, a track such as Armature|mixamo.com|Layer0 is assigned as Armature|mixamo_com|Layer0 and plays.
  • Element properties are declared as properties in the typings, not accessor pairs (#558). A TypeScript subclass that overrides one with an accessor, or reaches it through super, no longer compiles. Reading and writing properties is unaffected.

Smaller

  • The minified ES module is 144 KB, down from 211 KB (41 KB gzipped, down from 52 KB) (#558).

What's Changed

Full Changelog: v0.30.0...v0.31.0