Repository navigation
docs: track Web Components 0.28.1 - pc-wasm load failures and what time-scale 0 leaves running - #1304
Merged
Merged
Conversation
…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>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Library 0.28.1 is a patch release. It adds no attributes and keeps the
playcanvaspeer 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 thetime-scaledocs 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:errorevent (anErrorEventwith the engine's error inmessage), once per element. It does not bubble, and aBasismodule never fires itpc-wasm failed to load module '<name>' - <error><pc-app>boots without the moduleThe 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 anamein the wrong case (ammoforAmmo) 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 runsprogrammatic-access: failed loads are no longer in the "Elements That Never Become Ready" list, and a wrong-casenameis. Thepc-wasmparagraph and itswhenReady('pc-app')comment say "loaded or failed"pc-asset: the capture-phaseerrorlistener on<pc-app>also sees<pc-wasm>'s errorstime-scale="0"(playcanvas/web-components#532)The
pc-apptime-scalerow said 0 "pauses all three together". Scripts actually keep running theirupdateandpostUpdatewith adtof 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.jspins@playcanvas/web-components0.28.1. The engine stays at 2.23.0Not 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-componentsagainst the 0.28.1 manifest reported exactly one gap before the edits (the missingpc-wasmerrorrow, in en and ja). It passes nownpm run lintfinds no issues.npm run build(en + ja) succeeds with no broken links or anchorsA headless Chrome probe at 0.28.1 / engine 2.23.0, serving this repo's
static/assets/modules/ammo:erroronce (inlineonerrorand listener), not seen ondocument, seen by a capture listener on<pc-app>; element and app ready; canvas renders;window.Ammoundefined.wasmbinaryerroreven though the engine reports it twice<pc-app>added after the failure<pc-wasm>fireserrorand is ready in about 3 ms; the app bootsname="ammo"TypeError, noerror, neither element nor app ready after 10 sAmmoloaded, app rendersNot 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