Skip to content

docs: track Web Components 0.28.1 - pc-wasm load failures and what time-scale 0 leaves running - #1304

Merged
willeastcott merged 2 commits into
mainfrom
docs-web-components-0-28-1
Oct 27, 2026
Merged

willeastcott merged 2 commits into
mainfrom
docs-web-components-0-28-1

Conversation

@willeastcott

Copy link
Copy Markdown
Contributor

Library 0.28.1 is a patch release. It adds no attributes and keeps the playcanvas peer range at ^2.23.0. Two of its three source changes affect the User Manual: <pc-wasm> no longer blocks its app when a module fails to load, and the time-scale docs no longer claim that 0 pauses scripts. This PR documents both in English and Japanese and pins the live examples to 0.28.1.

Changes

<pc-wasm> load failures (playcanvas/web-components#534)

A module that fails to load used to leave the element unready and the <pc-app> blank forever. Now the element:

  • fires an error event (an ErrorEvent with the engine's error in message), once per element. It does not bubble, and a Basis module never fires it
  • logs pc-wasm failed to load module '<name>' - <error>
  • becomes ready anyway, so the containing <pc-app> boots without the module

The engine never retries a failed module, so every <pc-wasm> for it fails too, and one added later fails straight away.

  • pc-wasm: new Events section. The Readiness prose now says "loaded or failed to load", and the old "never starts" paragraph is removed. The page also notes that a name in the wrong case (ammo for Ammo) is the one failure that still hangs the app. The library PR calls this out of scope, since the engine throws before any error callback runs
  • programmatic-access: failed loads are no longer in the "Elements That Never Become Ready" list, and a wrong-case name is. The pc-wasm paragraph and its whenReady('pc-app') comment say "loaded or failed"
  • pc-asset: the capture-phase error listener on <pc-app> also sees <pc-wasm>'s errors

time-scale="0" (playcanvas/web-components#532)

The pc-app time-scale row said 0 "pauses all three together". Scripts actually keep running their update and postUpdate with a dt of 0. The row now says so, in the same words as the Physics Basics page. #532 names this page as a follow-up.

Live examples

  • shell.js pins @playcanvas/web-components 0.28.1. The engine stays at 2.23.0

Not changed: playcanvas/web-components#535 lets the package be imported during server-side rendering. The manual never said it couldn't be, so nothing here is wrong. A note in Getting Started is left for later.

Verification

  • npm run check:web-components against the 0.28.1 manifest reported exactly one gap before the edits (the missing pc-wasm error row, in en and ja). It passes now

  • npm run lint finds no issues. npm run build (en + ja) succeeds with no broken links or anchors

  • A headless Chrome probe at 0.28.1 / engine 2.23.0, serving this repo's static/assets/modules/ammo:

    Case Result
    Missing glue script error once (inline onerror and listener), not seen on document, seen by a capture listener on <pc-app>; element and app ready; canvas renders; window.Ammo undefined
    Missing .wasm binary the same, with one error even though the engine reports it twice
    Second <pc-app> added after the failure its <pc-wasm> fires error and is ready in about 3 ms; the app boots
    name="ammo" uncaught TypeError, no error, neither element nor app ready after 10 s
    Working Ammo (control) no errors, Ammo loaded, app renders
  • Not run: the full before-and-after render pass over all live-example fences. Migrate Developer Site to Docusaurus #535 changes only how elements register, which the PR reports as unchanged in browsers, and the probe's control page booted normally

🤖 Generated with Claude Code

…me-scale 0 leaves running

- pc-wasm: a module that fails to load fires a non-bubbling `error`
  event once per element, logs the failure and still becomes ready,
  so the containing pc-app boots without it (library #534). Adds an
  Events section, rewrites the readiness prose and notes that a
  wrong-case `name` is the one failure that still hangs the app
- programmatic-access: drop failed loads from the never-ready list
  and describe pc-wasm readiness as "loaded or failed"
- pc-app: `time-scale="0"` does not pause scripts; they keep running
  with a `dt` of 0 (library #532)
- pc-asset: the capture-phase `error` listener also sees pc-wasm's
- Pin the live examples to @playcanvas/web-components 0.28.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JavaScript Interface paragraph still said a ready element means an
instantiated module. Since 0.28.1 a failed load also makes the element
ready, while `Ammo` stays undefined and `WasmModule.getInstance` never
calls back, so code that needs a module has to handle the `error`
outcome instead of waiting on `getInstance`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@willeastcott
willeastcott merged commit 8d8cd33 into main Oct 27, 2026
4 checks passed
@willeastcott
willeastcott deleted the docs-web-components-0-28-1 branch October 27, 2026 20:29

This branch was successfully deployed

1 active deployment
Preview — 5a337787 Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant