@playcanvas/web-components 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +5 -3
  2. package/dist/app.d.cts +28 -3
  3. package/dist/app.d.ts +28 -3
  4. package/dist/asset.d.cts +13 -3
  5. package/dist/asset.d.ts +13 -3
  6. package/dist/components/anim-clip.d.cts +3 -1
  7. package/dist/components/anim-clip.d.ts +3 -1
  8. package/dist/components/anim-component.d.cts +5 -0
  9. package/dist/components/anim-component.d.ts +5 -0
  10. package/dist/components/audio-listener-component.d.cts +4 -0
  11. package/dist/components/audio-listener-component.d.ts +4 -0
  12. package/dist/components/button-component.d.cts +5 -0
  13. package/dist/components/button-component.d.ts +5 -0
  14. package/dist/components/camera-component.d.cts +35 -1
  15. package/dist/components/camera-component.d.ts +35 -1
  16. package/dist/components/collision-component.d.cts +4 -0
  17. package/dist/components/collision-component.d.ts +4 -0
  18. package/dist/components/element-component.d.cts +4 -0
  19. package/dist/components/element-component.d.ts +4 -0
  20. package/dist/components/gsplat-component.d.cts +4 -0
  21. package/dist/components/gsplat-component.d.ts +4 -0
  22. package/dist/components/joint-component.d.cts +12 -2
  23. package/dist/components/joint-component.d.ts +12 -2
  24. package/dist/components/layout-child-component.d.cts +4 -0
  25. package/dist/components/layout-child-component.d.ts +4 -0
  26. package/dist/components/layout-group-component.d.cts +4 -0
  27. package/dist/components/layout-group-component.d.ts +4 -0
  28. package/dist/components/light-component.d.cts +50 -1
  29. package/dist/components/light-component.d.ts +50 -1
  30. package/dist/components/particle-system-component.d.cts +4 -0
  31. package/dist/components/particle-system-component.d.ts +4 -0
  32. package/dist/components/render-component.d.cts +5 -0
  33. package/dist/components/render-component.d.ts +5 -0
  34. package/dist/components/rigid-body-component.d.cts +5 -0
  35. package/dist/components/rigid-body-component.d.ts +5 -0
  36. package/dist/components/screen-component.d.cts +4 -0
  37. package/dist/components/screen-component.d.ts +4 -0
  38. package/dist/components/script-component.d.cts +3 -0
  39. package/dist/components/script-component.d.ts +3 -0
  40. package/dist/components/script-instance.d.cts +4 -0
  41. package/dist/components/script-instance.d.ts +4 -0
  42. package/dist/components/scroll-view-component.d.cts +4 -0
  43. package/dist/components/scroll-view-component.d.ts +4 -0
  44. package/dist/components/scrollbar-component.d.cts +4 -0
  45. package/dist/components/scrollbar-component.d.ts +4 -0
  46. package/dist/components/sound-component.d.cts +4 -0
  47. package/dist/components/sound-component.d.ts +4 -0
  48. package/dist/components/sound-slot.d.cts +3 -0
  49. package/dist/components/sound-slot.d.ts +3 -0
  50. package/dist/custom-elements.json +338 -7
  51. package/dist/entity-base.d.cts +5 -4
  52. package/dist/entity-base.d.ts +5 -4
  53. package/dist/entity-owner.d.cts +2 -2
  54. package/dist/entity-owner.d.ts +2 -2
  55. package/dist/entity.d.cts +13 -2
  56. package/dist/entity.d.ts +13 -2
  57. package/dist/index.d.cts +4 -1
  58. package/dist/index.d.ts +4 -1
  59. package/dist/material.d.cts +18 -7
  60. package/dist/material.d.ts +18 -7
  61. package/dist/model.d.cts +11 -0
  62. package/dist/model.d.ts +11 -0
  63. package/dist/node.d.cts +12 -1
  64. package/dist/node.d.ts +12 -1
  65. package/dist/pwc.cjs +601 -206
  66. package/dist/pwc.cjs.map +1 -1
  67. package/dist/pwc.js +601 -206
  68. package/dist/pwc.js.map +1 -1
  69. package/dist/pwc.min.js +1 -1
  70. package/dist/pwc.min.js.map +1 -1
  71. package/dist/pwc.min.mjs +1 -1
  72. package/dist/pwc.min.mjs.map +1 -1
  73. package/dist/pwc.mjs +602 -207
  74. package/dist/pwc.mjs.map +1 -1
  75. package/dist/scene.d.cts +19 -0
  76. package/dist/scene.d.ts +19 -0
  77. package/dist/sky.d.cts +4 -0
  78. package/dist/sky.d.ts +4 -0
  79. package/dist/vscode.html-custom-data.json +257 -62
  80. package/dist/wasm.d.cts +4 -0
  81. package/dist/wasm.d.ts +4 -0
  82. package/dist/web-types.json +169 -69
  83. package/package.json +3 -3
  84. package/src/app.ts +150 -71
  85. package/src/asset.ts +13 -4
  86. package/src/components/anim-clip.ts +3 -1
  87. package/src/components/anim-component.ts +5 -0
  88. package/src/components/audio-listener-component.ts +4 -0
  89. package/src/components/button-component.ts +5 -0
  90. package/src/components/camera-component.ts +63 -6
  91. package/src/components/collision-component.ts +4 -0
  92. package/src/components/element-component.ts +4 -0
  93. package/src/components/gsplat-component.ts +4 -0
  94. package/src/components/joint-component.ts +12 -2
  95. package/src/components/layout-child-component.ts +4 -0
  96. package/src/components/layout-group-component.ts +4 -0
  97. package/src/components/light-component.ts +108 -17
  98. package/src/components/particle-system-component.ts +4 -0
  99. package/src/components/render-component.ts +5 -0
  100. package/src/components/rigid-body-component.ts +5 -0
  101. package/src/components/screen-component.ts +4 -0
  102. package/src/components/script-component.ts +3 -0
  103. package/src/components/script-instance.ts +4 -0
  104. package/src/components/scroll-view-component.ts +4 -0
  105. package/src/components/scrollbar-component.ts +4 -0
  106. package/src/components/sound-component.ts +4 -0
  107. package/src/components/sound-slot.ts +3 -0
  108. package/src/entity-base.ts +28 -16
  109. package/src/entity-owner.ts +2 -2
  110. package/src/entity.ts +16 -4
  111. package/src/index.ts +12 -1
  112. package/src/material.ts +19 -8
  113. package/src/model.ts +14 -2
  114. package/src/node.ts +15 -3
  115. package/src/scene.ts +35 -1
  116. package/src/sky.ts +4 -0
  117. package/src/wasm.ts +4 -0
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@playcanvas/web-components",
4
- "version": "0.17.0",
4
+ "version": "0.19.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "pc-app",
11
- "description": "The AppElement interface provides properties and methods for manipulating\n[`<pc-app>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/) elements.\nThe AppElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe element is sized like a replaced element such as `<video>`: a block-level box that the\npage's CSS controls, 300x150 by default. The application's canvas always fills the element,\nand the drawing buffer resolution follows the element's size (capped by `max-pixel-ratio`),\ntracked live via a ResizeObserver — so the element can be embedded at any size, resized by\nits container, or made fullscreen with ordinary CSS such as `width: 100vw; height: 100dvh`.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the application cannot boot because no graphics device could be created (for example, a browser with WebGL disabled). `message` names the requested backends and `error` holds the underlying failure. The element never becomes ready and `app` stays `null` — listen for this event to show a fallback UI. Removing the element and re-inserting it retries the boot with its current attributes. Does not bubble.\n- **progress** - Fired while the application preloads its assets. `loaded` and `total` are asset counts, not bytes, and an asset that fails to load still counts as loaded. Fired at least once per boot, and the final event always has `loaded` equal to `total`. Does not bubble.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **elementFromEntity(entity: _Entity_): __** - Returns the `<pc-entity>`, `<pc-model>` or `<pc-node>` element whose backing entity is\n`entity`, or `null` if the entity is not fronted by an element of this application - for\nexample, an unbound node inside a model's instantiated hierarchy, or an entity created\nthrough the engine API.\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
12
- "doc-url": "",
11
+ "description": "The `<pc-app>` element creates a PlayCanvas application and the canvas it renders\ninto, and is the root of every scene. It holds the `<pc-asset>`, `<pc-material>`, `<pc-wasm>` and\n`<pc-scene>` elements, and the page's CSS sizes it, as it would a `<video>`.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the application cannot boot because no graphics device could be created (for example, a browser with WebGL disabled). `message` names the requested backends and `error` holds the underlying failure. The element never becomes ready and `app` stays `null` — listen for this event to show a fallback UI. Removing the element and re-inserting it retries the boot with its current attributes. Does not bubble.\n- **progress** - Fired while the application preloads its assets. `loaded` and `total` are asset counts, not bytes, and an asset that fails to load still counts as loaded. Fired at least once per boot, and the final event always has `loaded` equal to `total`. Does not bubble.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
12
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/",
13
13
  "attributes": [
14
14
  {
15
15
  "name": "alpha",
@@ -139,8 +139,8 @@
139
139
  },
140
140
  {
141
141
  "name": "pc-asset",
142
- "description": "The AssetElement interface provides properties and methods for manipulating\n[`<pc-asset>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-asset/) elements.\nThe AssetElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe element becomes ready once the containing application has started and the asset is in the\nstate declared by the markup: loaded for preloaded assets (even if loading failed — check the\nasset's `resource`), or registered and awaiting a load for `lazy` assets. Elements inserted\nwhile the application is running are created and registered on insertion, and begin loading\nimmediately unless `lazy`. A `pc-asset` must be a direct child of `pc-app` elements placed\nelsewhere, or with an unsupported asset type, never become ready.\n\nA `lazy` asset loads on first use: the first time any element resolves it by `id` — a model,\na material map, a sky, a script `asset:` reference — or when the `lazy` attribute is removed,\nwhichever comes first. Until then it stays registered and unloaded.\n\nFor `texture` and `textureatlas` assets, the texture options (`address-u`, `address-v`,\n`min-filter`, `mag-filter`, `anisotropy`, `mipmaps`, `srgb`, `flip-y`) apply when the texture is\ncreated and — like `lazy` — are observed: changing one updates a texture that has already\nloaded, and removing one restores the engine default. Changing `srgb` or `mipmaps` on a loaded\ntexture recreates the underlying GPU resource, so prefer declaring those up front. Each option\noverrides the matching key in the `data` JSON; options left unset write nothing, leaving the\nengine's per-format defaults in force.\n\nApart from `lazy` and the texture options, these attributes are read once when the asset is\ncreated, so changing them later has no effect.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the asset fails to load, with the engine's error in `message`. Does not bubble. The element still becomes ready — readiness means the load settled, not that it succeeded.\n- **load** - Fired each time the asset finishes loading, including a `lazy` asset loaded later and any subsequent reloads. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor to observe every asset.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **get(id: _string_): __** - Returns the Asset created by the `<pc-asset>` element with the given `id`, or\n`undefined` if there is no such element or its asset has not been created yet.\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
143
- "doc-url": "",
142
+ "description": "The `<pc-asset>` element declares an asset for the application to load — a model,\ntexture, font, sound, script or JSON file under an `id` that other elements reference. Must be\na direct child of `<pc-app>`.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the asset fails to load, with the engine's error in `message`. Does not bubble. The element still becomes ready — readiness means the load settled, not that it succeeded.\n- **load** - Fired each time the asset finishes loading, including a `lazy` asset loaded later and any subsequent reloads. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor to observe every asset.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
143
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-asset/",
144
144
  "attributes": [
145
145
  {
146
146
  "name": "address-u",
@@ -337,8 +337,8 @@
337
337
  },
338
338
  {
339
339
  "name": "pc-entity",
340
- "description": "The EntityElement interface provides properties and methods for manipulating\n[`<pc-entity>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-entity/) elements.\nThe EntityElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe pointer events below are dispatched by the containing `<pc-app>` element when the pointer\nintersects this entity's geometry. They are only generated while the entity has a listener for\nthem, registered either with addEventListener or with the matching inline `onpointer*`\nattribute.\n\n---\n\n\n### **Events:**\n - **pointerdown** - Fired when a pointer button is pressed over the entity.\n- **pointerenter** - Fired when the pointer moves onto the entity.\n- **pointerleave** - Fired when the pointer moves off the entity.\n- **pointermove** - Fired when the pointer moves over the entity.\n- **pointerup** - Fired when a pointer button is released over the entity.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
341
- "doc-url": "",
340
+ "description": "The `<pc-entity>` element creates an entity: a named, transformable node of the\nscene hierarchy, and the host for component elements such as `<pc-camera>`, `<pc-light>` and\n`<pc-render>`. Place it in the `<pc-scene>`, or nest it under another `<pc-entity>`, a\n`<pc-model>` or a `<pc-node>` to parent it there.\n\n---\n\n\n### **Events:**\n - **click** - Fired when a primary pointer button is pressed and then released over the entity. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2.\n- **pointerdown** - Fired when a pointer button is pressed over the entity.\n- **pointerenter** - Fired when the pointer moves onto the entity.\n- **pointerleave** - Fired when the pointer moves off the entity.\n- **pointermove** - Fired when the pointer moves over the entity.\n- **pointerup** - Fired when a pointer button is released over the entity.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
341
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-entity/",
342
342
  "attributes": [
343
343
  {
344
344
  "name": "enabled",
@@ -350,6 +350,11 @@
350
350
  "description": "The name of the entity.",
351
351
  "value": { "type": "string" }
352
352
  },
353
+ {
354
+ "name": "onclick",
355
+ "description": "Script to run when the entity is clicked: a primary pointer button pressed and then released over it.",
356
+ "value": { "type": "string" }
357
+ },
353
358
  {
354
359
  "name": "onpointerdown",
355
360
  "description": "Script to run when a pointer button is pressed over the entity.",
@@ -397,6 +402,11 @@
397
402
  }
398
403
  ],
399
404
  "events": [
405
+ {
406
+ "name": "click",
407
+ "type": "PointerEvent",
408
+ "description": "Fired when a primary pointer button is pressed and then released over the entity. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
409
+ },
400
410
  {
401
411
  "name": "pointerdown",
402
412
  "type": "PointerEvent",
@@ -465,6 +475,11 @@
465
475
  { "name": "tags", "description": "Gets the tags of the entity." }
466
476
  ],
467
477
  "events": [
478
+ {
479
+ "name": "click",
480
+ "type": "PointerEvent",
481
+ "description": "Fired when a primary pointer button is pressed and then released over the entity. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
482
+ },
468
483
  {
469
484
  "name": "pointerdown",
470
485
  "type": "PointerEvent",
@@ -500,8 +515,8 @@
500
515
  },
501
516
  {
502
517
  "name": "pc-material",
503
- "description": "The MaterialElement interface provides properties and methods for manipulating\n[`<pc-material>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-material/) elements.\nThe MaterialElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nA `pc-material` must be a direct child of `pc-app` elements placed elsewhere log a warning\nand never create a material. Elements inserted while the application is already running are\ncreated on insertion.\n\nThe element is metal/rough by default: unlike a bare `StandardMaterial` it enables the metalness\nworkflow, which is what the `metalness-*` attributes assume and what glTF means by PBR. It also\ndefaults `metalness` to 0 rather than the engine's 1, because those two defaults have to be\nchosen together - the engine's 1 is unreachable under its own `useMetalness` of false, and with\nthe workflow on it would make every material fully metallic, so `<pc-material diffuse=\"crimson\">`\nwould render as dark tinted reflections of an environment that may not exist rather than as a\ncrimson surface. `metalness=\"1\"` remains one attribute away.\n\nThe `roughness` and `roughness-map` attributes are aliases for `gloss` and `gloss-map` that\nadditionally invert the gloss channel; do not mix the two families on one element.\n\nThe two aliases are documented here rather than on an accessor, because they resolve to the\n`gloss` properties and would otherwise inherit gloss's description - which reads inverted.\n\n---\n\n\n### **Methods:**\n - **get(id: _string_): __** - Returns the StandardMaterial created by the `<pc-material>` element with the given\n`id`, or `undefined` if there is no such element or its material has not been created yet.",
504
- "doc-url": "",
518
+ "description": "The `<pc-material>` element defines a physically based material, which\n`<pc-render>` elements apply by naming its `id`. It is metal/rough by default, with `metalness`\nstarting at 0. Must be a direct child of `<pc-app>`.\n\n---\n",
519
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-material/",
505
520
  "attributes": [
506
521
  {
507
522
  "name": "alpha-test",
@@ -1293,8 +1308,8 @@
1293
1308
  },
1294
1309
  {
1295
1310
  "name": "pc-model",
1296
- "description": "The ModelElement interface provides properties and methods for manipulating\n[`<pc-model>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-model/) elements.\nThe ModelElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe element creates and fronts a stable host entity: `entity` is that host, created when the\napplication builds its hierarchy and kept across `asset` changes, so the element's transform\nand tags are instance placement that composes with whatever transform the asset authored on\nits root. The instantiated content is parented beneath the host and exposed as\ncontentEntity.\n\nThe element becomes ready once its current asset selection has settled: the container asset\nhas loaded and its content root has been parented beneath the host, the load has failed\n(`contentEntity` stays `null` listen for `error`, or check `contentEntity`, to tell the\noutcomes apart), or no asset is assigned at all. Changing `asset` re-arms readiness and\ninstantiates anew, so a `ready()` obtained after the change resolves against the new content.\nA `pc-model` outside a `pc-app`, or referencing an unknown asset id, warns and never becomes\nready.\n\nThe pointer events below are dispatched by the containing `<pc-app>` element when the pointer\nintersects the model's geometry, exactly as for `<pc-entity>` a hit on a content node that no\n`pc-node` fronts resolves to this element.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the container asset fails to load, with the engine's error in `message`. Does not bubble. The element still becomes ready — readiness means the load settled, not that it succeeded.\n- **load** - Fired each time a container asset finishes instantiating, including re-instantiation after `asset` changes. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor.\n- **pointerdown** - Fired when a pointer button is pressed over the model.\n- **pointerenter** - Fired when the pointer moves onto the model.\n- **pointerleave** - Fired when the pointer moves off the model.\n- **pointermove** - Fired when the pointer moves over the model.\n- **pointerup** - Fired when a pointer button is released over the model.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **hierarchy(): __** - Returns a snapshot of the instantiated node tree, or `null` while there is none (the\ncontainer asset has not loaded, or the element has left the document). One call grounds a\nsession — a browser console, a test, an agent — in the vocabulary `pc-node` binding\nresolves against: the instantiated names (HierarchyNode.name), paths, match\nindices, attached component types and the material assignments of render components\n(HierarchyNode.materials). `String(...)` of the result, or of any node in it,\nis the printable form.\n\nThe snapshot is plain data, computed afresh each call: it does not follow later changes\nto the hierarchy, and mutating it changes nothing. It covers the instantiated content\nonly — the host entity the element fronts is not part of the asset's node tree.\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
1297
- "doc-url": "",
1311
+ "description": "The `<pc-model>` element instantiates a 3D model from a container asset\n(typically a GLB) beneath an entity of its own, so the element's transform and tags place the\ninstance in the scene. Its `<pc-node>` children override what the asset authored. Place it in the\n`<pc-scene>`, or nest it under a `<pc-entity>`, another `<pc-model>` or a `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **click** - Fired when a primary pointer button is pressed and then released over the model. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2.\n- **error** - Fired when the container asset fails to load, with the engine's error in `message`. Does not bubble. The element still becomes ready — readiness means the load settled, not that it succeeded.\n- **load** - Fired each time a container asset finishes instantiating, including re-instantiation after `asset` changes. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor.\n- **pointerdown** - Fired when a pointer button is pressed over the model.\n- **pointerenter** - Fired when the pointer moves onto the model.\n- **pointerleave** - Fired when the pointer moves off the model.\n- **pointermove** - Fired when the pointer moves over the model.\n- **pointerup** - Fired when a pointer button is released over the model.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
1312
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-model/",
1298
1313
  "attributes": [
1299
1314
  {
1300
1315
  "name": "asset",
@@ -1311,6 +1326,11 @@
1311
1326
  "description": "The name of the model.",
1312
1327
  "value": { "type": "string" }
1313
1328
  },
1329
+ {
1330
+ "name": "onclick",
1331
+ "description": "Script to run when the model is clicked: a primary pointer button pressed and then released over it.",
1332
+ "value": { "type": "string" }
1333
+ },
1314
1334
  {
1315
1335
  "name": "onpointerdown",
1316
1336
  "description": "Script to run when a pointer button is pressed over the model.",
@@ -1358,6 +1378,11 @@
1358
1378
  }
1359
1379
  ],
1360
1380
  "events": [
1381
+ {
1382
+ "name": "click",
1383
+ "type": "PointerEvent",
1384
+ "description": "Fired when a primary pointer button is pressed and then released over the model. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
1385
+ },
1361
1386
  {
1362
1387
  "name": "error",
1363
1388
  "type": "ErrorEvent",
@@ -1446,6 +1471,11 @@
1446
1471
  { "name": "tags", "description": "Gets the tags of the entity." }
1447
1472
  ],
1448
1473
  "events": [
1474
+ {
1475
+ "name": "click",
1476
+ "type": "PointerEvent",
1477
+ "description": "Fired when a primary pointer button is pressed and then released over the model. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
1478
+ },
1449
1479
  {
1450
1480
  "name": "error",
1451
1481
  "type": "ErrorEvent",
@@ -1491,8 +1521,8 @@
1491
1521
  },
1492
1522
  {
1493
1523
  "name": "pc-node",
1494
- "description": "The NodeElement interface provides properties and methods for manipulating\n[`<pc-node>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-node/)\nelements. The NodeElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nA `pc-node` is an override element: where `pc-entity` creates an entity, `pc-node` binds to a\nnode a `pc-model` loaded and declares overrides against the authored asset components to\nadd, properties to change, content to attach. Attributes present apply as overrides; attributes\nabsent leave authored values untouched, and removing an attribute (or assigning `null` to the\nmatching property) restores the authored value.\n\n`name` selects among the host model's nodes (first match in depth-first order), nesting a\n`pc-node` inside another scopes the search to that subtree, and `index` picks among identically\nnamed matches. When `name` matches more than one node and no `index` is given, the element\nwarns and binds nothing.\n\nThe element becomes ready once bound, and never while unresolved — a missing or ambiguous\nname warns and records the failure in `state`, readiness stays unresolved, and descendants\nwait with it.\n\nThe pointer events below are dispatched by the containing `<pc-app>` element when the pointer\nintersects the bound node's geometry, exactly as for `<pc-entity>`.\n\n---\n\n\n### **Events:**\n - **pointerdown** - Fired when a pointer button is pressed over the node.\n- **pointerenter** - Fired when the pointer moves onto the node.\n- **pointerleave** - Fired when the pointer moves off the node.\n- **pointermove** - Fired when the pointer moves over the node.\n- **pointerup** - Fired when a pointer button is released over the node.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
1495
- "doc-url": "",
1524
+ "description": "The `<pc-node>` element binds to a node inside the hierarchy a `<pc-model>`\ninstantiated and declares overrides against it: a transform, an enabled state, tags, components\nto add, or content to attach. Its `name` is a lookup, never a rename. Must be a descendant of\n`<pc-model>`.\n\n---\n\n\n### **Events:**\n - **click** - Fired when a primary pointer button is pressed and then released over the node. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2.\n- **pointerdown** - Fired when a pointer button is pressed over the node.\n- **pointerenter** - Fired when the pointer moves onto the node.\n- **pointerleave** - Fired when the pointer moves off the node.\n- **pointermove** - Fired when the pointer moves over the node.\n- **pointerup** - Fired when a pointer button is released over the node.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
1525
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-node/",
1496
1526
  "attributes": [
1497
1527
  {
1498
1528
  "name": "enabled",
@@ -1514,6 +1544,11 @@
1514
1544
  "description": "The name of the node to bind, resolved within the nearest ancestor `pc-model` (or `pc-node`) once it has instantiated.",
1515
1545
  "value": { "type": "string" }
1516
1546
  },
1547
+ {
1548
+ "name": "onclick",
1549
+ "description": "Script to run when the node is clicked: a primary pointer button pressed and then released over it.",
1550
+ "value": { "type": "string" }
1551
+ },
1517
1552
  {
1518
1553
  "name": "onpointerdown",
1519
1554
  "description": "Script to run when a pointer button is pressed over the node.",
@@ -1561,6 +1596,11 @@
1561
1596
  }
1562
1597
  ],
1563
1598
  "events": [
1599
+ {
1600
+ "name": "click",
1601
+ "type": "PointerEvent",
1602
+ "description": "Fired when a primary pointer button is pressed and then released over the node. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
1603
+ },
1564
1604
  {
1565
1605
  "name": "pointerdown",
1566
1606
  "type": "PointerEvent",
@@ -1661,6 +1701,11 @@
1661
1701
  }
1662
1702
  ],
1663
1703
  "events": [
1704
+ {
1705
+ "name": "click",
1706
+ "type": "PointerEvent",
1707
+ "description": "Fired when a primary pointer button is pressed and then released over the node. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
1708
+ },
1664
1709
  {
1665
1710
  "name": "pointerdown",
1666
1711
  "type": "PointerEvent",
@@ -1696,9 +1741,14 @@
1696
1741
  },
1697
1742
  {
1698
1743
  "name": "pc-scene",
1699
- "description": "The SceneElement interface provides properties and methods for manipulating\n[`<pc-scene>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-scene/) elements.\nThe SceneElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
1700
- "doc-url": "",
1744
+ "description": "The `<pc-scene>` element holds the entity hierarchy the application renders,\nalong with the scene-wide fog, exposure and gravity settings. Must be a direct child of\n`<pc-app>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
1745
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-scene/",
1701
1746
  "attributes": [
1747
+ {
1748
+ "name": "exposure",
1749
+ "description": "The exposure of the scene.",
1750
+ "value": { "type": "number", "default": "1" }
1751
+ },
1702
1752
  {
1703
1753
  "name": "fog",
1704
1754
  "description": "The fog type of the scene.",
@@ -1752,6 +1802,10 @@
1752
1802
  "description": "The nearest ancestor element that fronts an entity — `<pc-entity>`, `<pc-model>` or\n`<pc-node>` — or `null` if this element has no such ancestor. The search starts at the\nparent, so an element never resolves to itself.",
1753
1803
  "type": "EntityBaseElement | null"
1754
1804
  },
1805
+ {
1806
+ "name": "exposure",
1807
+ "description": "Gets the exposure of the scene."
1808
+ },
1755
1809
  {
1756
1810
  "name": "fog",
1757
1811
  "description": "Gets the fog type of the scene."
@@ -1793,8 +1847,8 @@
1793
1847
  },
1794
1848
  {
1795
1849
  "name": "pc-sky",
1796
- "description": "The SkyElement interface provides properties and methods for manipulating\n`<pc-sky>` elements. The SkyElement interface also inherits the properties and\nmethods of the HTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
1797
- "doc-url": "",
1850
+ "description": "The `<pc-sky>` element renders a skybox from a texture asset, projected as an\ninfinite background, a box or a dome, and optionally lights the scene from it. Must be a direct\nchild of `<pc-scene>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
1851
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-sky/",
1798
1852
  "attributes": [
1799
1853
  {
1800
1854
  "name": "asset",
@@ -1900,8 +1954,8 @@
1900
1954
  },
1901
1955
  {
1902
1956
  "name": "pc-wasm",
1903
- "description": "The WasmElement interface provides properties and methods for manipulating\n[`<pc-wasm>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-wasm/)\nelements. The WasmElement interface also inherits the properties and methods of the\nAsyncElement interface.\n\nThe attributes are read once, when the module starts loading - on the element's first\nconnection, or earlier if a containing `<pc-app>` boots first and collects it - so changing\nthem later has no effect. The element becomes ready once the module has loaded. WebAssembly\nmodules configure engine-global state that never unloads, so readiness is not re-armed by\nremoving the element, and a re-inserted element does not load again.\n\nA `<pc-wasm>` without a `name` warns and never becomes ready; a containing `<pc-app>` still\nboots.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
1904
- "doc-url": "",
1957
+ "description": "The `<pc-wasm>` element loads a WebAssembly module the engine needs before the\napplication starts `Ammo` for physics, `Basis` or `DracoDecoderModule` for compressed assets.\nMust be a direct child of `<pc-app>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
1958
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-wasm/",
1905
1959
  "attributes": [
1906
1960
  {
1907
1961
  "name": "fallback",
@@ -1955,8 +2009,8 @@
1955
2009
  },
1956
2010
  {
1957
2011
  "name": "pc-anim-clip",
1958
- "description": "The AnimClipElement interface provides properties and methods for manipulating\n[`<pc-anim-clip>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-anim-clip/)\nelements. The AnimClipElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nA clip declares one named animation on its parent `<pc-anim>`. `name` is both the clip's name\nand the track looked up in the clip's source: an explicit `asset` (a `container`, an\n`animation` `.glb`, or an `animclip` JSON), or, without one, the container of the `<pc-model>`\nenclosing the parent `<pc-anim>`. A source holding a single track supplies it whatever it is\nnamed; in a multi-track source the track named `name` is chosen, falling back to the first\nwith a warning. The element becomes ready once its resolved track is assigned.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
1959
- "doc-url": "",
2012
+ "description": "The `<pc-anim-clip>` element declares one named animation clip on its parent\n`<pc-anim>`, taken from the `asset` it names or, without one, from the enclosing `<pc-model>`'s\nown animations. Must be a direct child of `<pc-anim>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
2013
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-anim-clip/",
1960
2014
  "attributes": [
1961
2015
  {
1962
2016
  "name": "asset",
@@ -2020,8 +2074,8 @@
2020
2074
  },
2021
2075
  {
2022
2076
  "name": "pc-anim",
2023
- "description": "The AnimComponentElement interface provides properties and methods for manipulating\n[`<pc-anim>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-anim/) elements.\nThe AnimComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe element drives animation clips over the host entity's hierarchy. Clips come from\n`<pc-anim-clip>` children or, when the element is a direct child of a `<pc-model>` and\ndeclares no clips, every animation of that model's container asset is assigned, named by track\nname, in container order. The first clip plays automatically (opt out with `activate=\"false\"`);\nswitch clips declaratively through the `clip` attribute, or imperatively through play\nand transition. Tracks bind to scene nodes by name, so any hierarchy whose node names\nmatch a clip's curves can be animated — a model's skeleton is simply the common case.\n\nThe engine reports no clip completion: a non-looping clip holds its last pose silently. Poll\nthe underlying AnimComponent (via component) for playback state beyond what\nthis element exposes.\n\nEngine component: AnimComponent (`anim`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **pause()** - Pauses playback, preserving the playhead — play resumes from where it stopped.\n- **play(name: _string_)** - Resumes playback, optionally switching to a named clip first (a hard cut). A name that\nmatches no clip leaves the selection unchanged.\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.\n- **transition(name: _string_, time: _number_)** - Cross-fades to a named clip and ensures playback is running. A name that matches no clip\nleaves the selection unchanged.",
2024
- "doc-url": "",
2077
+ "description": "The `<pc-anim>` element plays animation clips over its entity's hierarchy, taken\nfrom `<pc-anim-clip>` children or from the enclosing `<pc-model>`'s own animations. The first\nclip plays automatically, and the `clip` attribute switches between them. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
2078
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-anim/",
2025
2079
  "attributes": [
2026
2080
  {
2027
2081
  "name": "activate",
@@ -2110,8 +2164,8 @@
2110
2164
  },
2111
2165
  {
2112
2166
  "name": "pc-audio-listener",
2113
- "description": "The AudioListenerComponentElement interface provides properties and methods for manipulating\n[`<pc-audio-listener>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-audio-listener/) elements.\nThe AudioListenerComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: AudioListenerComponent (`audiolistener`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
2114
- "doc-url": "",
2167
+ "description": "The `<pc-audio-listener>` element makes its entity the point from which\npositional sounds are heard, typically the entity holding the `<pc-camera>`. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
2168
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-audio-listener/",
2115
2169
  "attributes": [
2116
2170
  {
2117
2171
  "name": "enabled",
@@ -2159,8 +2213,8 @@
2159
2213
  },
2160
2214
  {
2161
2215
  "name": "pc-button",
2162
- "description": "The ButtonComponentElement interface provides properties and methods for manipulating\n[`<pc-button>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-button/) elements.\nThe ButtonComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: ButtonComponent (`button`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
2163
- "doc-url": "",
2216
+ "description": "The `<pc-button>` element makes its entity respond to pointer input, tinting or\nswapping its image as the pointer hovers, presses and releases it. The entity also needs a\n`<pc-element>` with `use-input` set. Must be a child of a `<pc-entity>`, `<pc-model>` or\n`<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
2217
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-button/",
2164
2218
  "attributes": [
2165
2219
  {
2166
2220
  "name": "active",
@@ -2334,8 +2388,8 @@
2334
2388
  },
2335
2389
  {
2336
2390
  "name": "pc-camera",
2337
- "description": "The CameraComponentElement interface provides properties and methods for manipulating\n[`<pc-camera>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-camera/) elements.\nThe CameraComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: CameraComponent (`camera`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **endXr()** - Ends the camera's XR mode.\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.\n- **startXr(type: _'immersive-ar' | 'immersive-vr'_, space: _'bounded-floor' | 'local' | 'local-floor' | 'unbounded' | 'viewer'_)** - Starts the camera in XR mode.",
2338
- "doc-url": "",
2391
+ "description": "The `<pc-camera>` element renders the scene from its entity's transform, with\nattributes for the projection, field of view, clip planes, clear color and tonemapping. Must be a\nchild of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
2392
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-camera/",
2339
2393
  "attributes": [
2340
2394
  {
2341
2395
  "name": "clear-color",
@@ -2347,6 +2401,11 @@
2347
2401
  "description": "The clear color buffer of the camera.",
2348
2402
  "value": { "type": "boolean", "default": "true" }
2349
2403
  },
2404
+ {
2405
+ "name": "clear-depth",
2406
+ "description": "The depth value the depth buffer is cleared to.",
2407
+ "value": { "type": "number", "default": "1" }
2408
+ },
2350
2409
  {
2351
2410
  "name": "clear-depth-buffer",
2352
2411
  "description": "The clear depth buffer of the camera.",
@@ -2355,7 +2414,7 @@
2355
2414
  {
2356
2415
  "name": "clear-stencil-buffer",
2357
2416
  "description": "The clear stencil buffer of the camera.",
2358
- "value": { "type": "boolean", "default": "false" }
2417
+ "value": { "type": "boolean", "default": "true" }
2359
2418
  },
2360
2419
  {
2361
2420
  "name": "cull-faces",
@@ -2448,6 +2507,11 @@
2448
2507
  ],
2449
2508
  "js": {
2450
2509
  "properties": [
2510
+ {
2511
+ "name": "arAvailable",
2512
+ "description": "Whether immersive AR is available. Independent of vrAvailable: a device can offer\neither mode without the other.",
2513
+ "type": "boolean"
2514
+ },
2451
2515
  {
2452
2516
  "name": "clearColor",
2453
2517
  "description": "Gets the clear color of the camera.",
@@ -2458,6 +2522,11 @@
2458
2522
  "description": "Gets the clear color buffer of the camera.",
2459
2523
  "type": "boolean"
2460
2524
  },
2525
+ {
2526
+ "name": "clearDepth",
2527
+ "description": "Gets the depth value the depth buffer is cleared to.",
2528
+ "type": "number"
2529
+ },
2461
2530
  {
2462
2531
  "name": "clearDepthBuffer",
2463
2532
  "description": "Gets the clear depth buffer of the camera.",
@@ -2555,7 +2624,11 @@
2555
2624
  "description": "Gets the tone mapping of the camera.",
2556
2625
  "type": "'none' | 'linear' | 'filmic' | 'hejl' | 'aces' | 'aces2' | 'neutral'"
2557
2626
  },
2558
- { "name": "xrAvailable" }
2627
+ {
2628
+ "name": "vrAvailable",
2629
+ "description": "Whether immersive VR is available. Independent of arAvailable: a device can offer\neither mode without the other.",
2630
+ "type": "boolean"
2631
+ }
2559
2632
  ],
2560
2633
  "events": [
2561
2634
  {
@@ -2568,8 +2641,8 @@
2568
2641
  },
2569
2642
  {
2570
2643
  "name": "pc-collision",
2571
- "description": "The CollisionComponentElement interface provides properties and methods for manipulating\n[`<pc-collision>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-collision/) elements.\nThe CollisionComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nFor `type=\"mesh\"`, the collision geometry defaults to the host entity's own render component\n(its render asset) a collider matching the visible mesh, which is what a mesh collider on a\nglTF node means. The default resolves each time the component applies, so a `pc-node` that\nretargets or rebinds picks up the new node's geometry. An entity with no asset-backed render\ncomponent warns, and the collider has no shape.\n\nEngine component: CollisionComponent (`collision`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
2572
- "doc-url": "",
2644
+ "description": "The `<pc-collision>` element gives its entity a collision shape a box, sphere,\ncapsule, cone, cylinder or meshfor the physics simulation to collide against. Pair it with a\n`<pc-rigid-body>`. Must be a child of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
2645
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-collision/",
2573
2646
  "attributes": [
2574
2647
  {
2575
2648
  "name": "angular-offset",
@@ -2657,8 +2730,8 @@
2657
2730
  },
2658
2731
  {
2659
2732
  "name": "pc-element",
2660
- "description": "The ElementComponentElement interface provides properties and methods for manipulating\n[`<pc-element>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-element/) elements.\nThe ElementComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nDespite the name, this is not a base class or a generic wrapper: it is the engine's 2D UI\ncomponent, which gives its host entity a rectangle in a `<pc-screen>` hierarchy that draws\neither an image, a line of text or nothing (`type=\"image\"`, `\"text\"` or `\"group\"`). The tag\nspells the engine component it adds, as every component element does.\n\nEngine component: ElementComponent (`element`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
2661
- "doc-url": "",
2733
+ "description": "The `<pc-element>` element gives its entity a 2D UI rectangle inside a\n`<pc-screen>` hierarchy, drawing an image, a line of text or nothing (`type=\"image\"`, `\"text\"` or\n`\"group\"`). Must be a child of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
2734
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-element/",
2662
2735
  "attributes": [
2663
2736
  {
2664
2737
  "name": "anchor",
@@ -2944,8 +3017,8 @@
2944
3017
  },
2945
3018
  {
2946
3019
  "name": "pc-gsplat",
2947
- "description": "The GSplatComponentElement interface provides properties and methods for manipulating\n[`<pc-gsplat>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-gsplat/) elements.\nThe GSplatComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: GSplatComponent (`gsplat`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
2948
- "doc-url": "",
3020
+ "description": "The `<pc-gsplat>` element renders the 3D Gaussian splats of a `gsplat` asset at\nits entity, with attributes for shadow casting and level of detail. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
3021
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-gsplat/",
2949
3022
  "attributes": [
2950
3023
  {
2951
3024
  "name": "asset",
@@ -3047,8 +3120,8 @@
3047
3120
  },
3048
3121
  {
3049
3122
  "name": "pc-joint",
3050
- "description": "The JointComponentElement interface provides properties and methods for manipulating\n[`<pc-joint>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-joint/) elements.\nThe JointComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe entity holding the joint is not itself constrained. Its world transform defines the joint\nframe — the anchor point and axes the constraint operates about — with the local X axis as the\nprimary axis: a hinge rotates about it, a slider translates along it and a ball joint twists\nabout it. The constrained bodies are referenced by `entity-a` and `entity-b`, both of which need\na rigid body component; leaving `entity-b` empty constrains `entity-a` to a fixed point in world\nspace. The underlying engine component is in alpha, so its API may change.\n\n---\n\n\n### **Events:**\n - **break** - Fired when the impulse on the joint exceeds `break-impulse` and the constraint breaks. A broken joint no longer constrains its bodies; calling `refreshFrames()` on the underlying component re-attaches it. Bubbles and is composed. Engine component: `JointComponent` (`joint`).\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
3051
- "doc-url": "",
3123
+ "description": "The `<pc-joint>` element constrains two rigid bodies to each other a hinged\ndoor, a swinging chain, a sliding drawer. Its entity's transform is the joint frame, and\n`entity-a` and `entity-b` name the bodies. Must be a child of a `<pc-entity>`, `<pc-model>` or\n`<pc-node>`.\n\n---\n\n\n### **Events:**\n - **break** - Fired when the impulse on the joint exceeds `break-impulse` and the constraint breaks. A broken joint no longer constrains its bodies; calling `refreshFrames()` on the underlying component re-attaches it. Bubbles and is composed. Engine component: `JointComponent` (`joint`).\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
3124
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-joint/",
3052
3125
  "attributes": [
3053
3126
  {
3054
3127
  "name": "angular-damping",
@@ -3394,8 +3467,8 @@
3394
3467
  },
3395
3468
  {
3396
3469
  "name": "pc-layout-child",
3397
- "description": "The LayoutChildComponentElement interface provides properties and methods for manipulating\n[`<pc-layout-child>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-layout-child/) elements.\nThe LayoutChildComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: LayoutChildComponent (`layoutchild`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
3398
- "doc-url": "",
3470
+ "description": "The `<pc-layout-child>` element controls how its entity is sized by the\n`<pc-layout-group>` above it, through minimum and maximum sizes and fit proportions. Must be a\nchild of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
3471
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-layout-child/",
3399
3472
  "attributes": [
3400
3473
  {
3401
3474
  "name": "enabled",
@@ -3506,8 +3579,8 @@
3506
3579
  },
3507
3580
  {
3508
3581
  "name": "pc-layout-group",
3509
- "description": "The LayoutGroupComponentElement interface provides properties and methods for manipulating\n[`<pc-layout-group>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-layout-group/) elements.\nThe LayoutGroupComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: LayoutGroupComponent (`layoutgroup`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
3510
- "doc-url": "",
3582
+ "description": "The `<pc-layout-group>` element arranges its entity's children in a row or\ncolumn, with spacing, padding, alignment and fitting. Must be a child of a `<pc-entity>`,\n`<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
3583
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-layout-group/",
3511
3584
  "attributes": [
3512
3585
  {
3513
3586
  "name": "alignment",
@@ -3645,9 +3718,19 @@
3645
3718
  },
3646
3719
  {
3647
3720
  "name": "pc-light",
3648
- "description": "The LightComponentElement interface provides properties and methods for manipulating\n[`<pc-light>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-light/) elements.\nThe LightComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: LightComponent (`light`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
3649
- "doc-url": "",
3721
+ "description": "The `<pc-light>` element lights the scene from its entity — as a directional,\nomni or spot light with attributes for color, intensity, range and shadows. Must be a child of\na `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
3722
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-light/",
3650
3723
  "attributes": [
3724
+ {
3725
+ "name": "cascade-blend",
3726
+ "description": "The cascade blend factor of the light, from 0 (no blending) to 1, which applies only to `directional` lights with `num-cascades` greater than 1.",
3727
+ "value": { "type": "number", "default": "0" }
3728
+ },
3729
+ {
3730
+ "name": "cascade-distribution",
3731
+ "description": "The cascade distribution of the light, from 0 (linear split) to 1 (logarithmic split, concentrating shadow resolution near the camera), which applies only to `directional` lights with `num-cascades` greater than 1.",
3732
+ "value": { "type": "number", "default": "0.5" }
3733
+ },
3651
3734
  {
3652
3735
  "name": "cast-shadows",
3653
3736
  "description": "The cast shadows flag of the light.",
@@ -3676,7 +3759,12 @@
3676
3759
  {
3677
3760
  "name": "normal-offset-bias",
3678
3761
  "description": "The normal offset bias of the light.",
3679
- "value": { "type": "number", "default": "0.05" }
3762
+ "value": { "type": "number", "default": "0" }
3763
+ },
3764
+ {
3765
+ "name": "num-cascades",
3766
+ "description": "The number of shadow cascades of the light, an integer from 1 (no cascades) to 4, which applies only to `directional` lights.",
3767
+ "value": { "type": "number", "default": "1" }
3680
3768
  },
3681
3769
  {
3682
3770
  "name": "outer-cone-angle",
@@ -3701,7 +3789,7 @@
3701
3789
  {
3702
3790
  "name": "shadow-bias",
3703
3791
  "description": "The shadow bias of the light.",
3704
- "value": { "type": "number", "default": "0.2" }
3792
+ "value": { "type": "number", "default": "0.05" }
3705
3793
  },
3706
3794
  {
3707
3795
  "name": "shadow-blocker-samples",
@@ -3711,7 +3799,7 @@
3711
3799
  {
3712
3800
  "name": "shadow-distance",
3713
3801
  "description": "The shadow distance of the light.",
3714
- "value": { "type": "number", "default": "16" }
3802
+ "value": { "type": "number", "default": "40" }
3715
3803
  },
3716
3804
  {
3717
3805
  "name": "shadow-intensity",
@@ -3747,7 +3835,7 @@
3747
3835
  {
3748
3836
  "name": "vsm-bias",
3749
3837
  "description": "The VSM bias of the light.",
3750
- "value": { "type": "number", "default": "0.01" }
3838
+ "value": { "type": "number", "default": "0.0025" }
3751
3839
  },
3752
3840
  {
3753
3841
  "name": "vsm-blur-size",
@@ -3764,6 +3852,14 @@
3764
3852
  ],
3765
3853
  "js": {
3766
3854
  "properties": [
3855
+ {
3856
+ "name": "cascadeBlend",
3857
+ "description": "Gets the cascade blend factor of the light, from 0 (no blending) to 1, which applies only to\n`directional` lights with `num-cascades` greater than 1."
3858
+ },
3859
+ {
3860
+ "name": "cascadeDistribution",
3861
+ "description": "Gets the cascade distribution of the light, from 0 (linear split) to 1 (logarithmic split,\nconcentrating shadow resolution near the camera), which applies only to `directional` lights\nwith `num-cascades` greater than 1."
3862
+ },
3767
3863
  {
3768
3864
  "name": "castShadows",
3769
3865
  "description": "Gets the cast shadows flag of the light."
@@ -3803,6 +3899,10 @@
3803
3899
  "name": "normalOffsetBias",
3804
3900
  "description": "Gets the normal offset bias of the light."
3805
3901
  },
3902
+ {
3903
+ "name": "numCascades",
3904
+ "description": "Gets the number of shadow cascades of the light, an integer from 1 (no cascades) to 4, which\napplies only to `directional` lights."
3905
+ },
3806
3906
  {
3807
3907
  "name": "outerConeAngle",
3808
3908
  "description": "Gets the outer cone angle of the light."
@@ -3868,8 +3968,8 @@
3868
3968
  },
3869
3969
  {
3870
3970
  "name": "pc-particle-system",
3871
- "description": "The ParticleSystemComponentElement interface provides properties and methods for manipulating\n[`<pc-particle-system>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-particle-system/) elements.\nThe ParticleSystemComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: ParticleSystemComponent (`particlesystem`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **pause()** - Pauses the particle system\n- **play()** - Starts playing the particle system\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.\n- **reset()** - Resets the particle system\n- **stop()** - Stops the particle system",
3872
- "doc-url": "",
3971
+ "description": "The `<pc-particle-system>` element emits particles from its entity, with\nattributes for the emitter's shape, rate, lifetime, textures and blending. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
3972
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-particle-system/",
3873
3973
  "attributes": [
3874
3974
  {
3875
3975
  "name": "asset",
@@ -3927,8 +4027,8 @@
3927
4027
  },
3928
4028
  {
3929
4029
  "name": "pc-render",
3930
- "description": "The RenderComponentElement interface provides properties and methods for manipulating\n[`<pc-render>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-render/) elements.\nThe RenderComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThis element renders one of the engine's built-in primitives, selected with `type` (defaulting\nto `box`). It does not cover the engine's `asset` render type, since there is no way to supply\na render asset here use `pc-model` for glTF content instead.\n\nEngine component: RenderComponent (`render`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
3931
- "doc-url": "",
4030
+ "description": "The `<pc-render>` element renders one of the engine's built-in primitives at its\nentity — box, sphere, capsule, cone, cylinder or plane shaded by the `<pc-material>` its\n`material` attribute names. For glTF content, use `<pc-model>` instead. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
4031
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-render/",
3932
4032
  "attributes": [
3933
4033
  {
3934
4034
  "name": "cast-shadows",
@@ -4018,8 +4118,8 @@
4018
4118
  },
4019
4119
  {
4020
4120
  "name": "pc-rigid-body",
4021
- "description": "The RigidBodyComponentElement interface provides properties and methods for manipulating\n[`<pc-rigid-body>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-rigid-body/) elements.\nThe RigidBodyComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: RigidBodyComponent (`rigidbody`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
4022
- "doc-url": "",
4121
+ "description": "The `<pc-rigid-body>` element hands its entity to the physics simulation, with\nattributes for its type, mass, friction and restitution. It needs a sibling `<pc-collision>` for\nits shape, and `Ammo` loaded through `<pc-wasm>`. Must be a child of a `<pc-entity>`,\n`<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
4122
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-rigid-body/",
4023
4123
  "attributes": [
4024
4124
  {
4025
4125
  "name": "angular-damping",
@@ -4114,8 +4214,8 @@
4114
4214
  },
4115
4215
  {
4116
4216
  "name": "pc-screen",
4117
- "description": "The ScreenComponentElement interface provides properties and methods for manipulating\n[`<pc-screen>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-screen/) elements.\nThe ScreenComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: ScreenComponent (`screen`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
4118
- "doc-url": "",
4217
+ "description": "The `<pc-screen>` element gives its entity a 2D space — in screen space or in the\nworld — that a hierarchy of `<pc-element>` descendants lays out inside. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
4218
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-screen/",
4119
4219
  "attributes": [
4120
4220
  {
4121
4221
  "name": "enabled",
@@ -4203,8 +4303,8 @@
4203
4303
  },
4204
4304
  {
4205
4305
  "name": "pc-script",
4206
- "description": "The ScriptComponentElement interface provides properties and methods for manipulating\n[`<pc-script>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-script/) elements.\nThe ScriptComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: ScriptComponent (`script`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
4207
- "doc-url": "",
4306
+ "description": "The `<pc-script>` element holds the `<pc-script-instance>` children that attach\nscripts to its entity. Must be a child of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
4307
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-script/",
4208
4308
  "attributes": [
4209
4309
  {
4210
4310
  "name": "enabled",
@@ -4252,8 +4352,8 @@
4252
4352
  },
4253
4353
  {
4254
4354
  "name": "pc-script-instance",
4255
- "description": "The ScriptInstanceElement interface provides properties and methods for manipulating\n`<pc-script-instance>` elements. The ScriptInstanceElement interface also inherits the properties and\nmethods of the AsyncElement interface.\n\nScript attributes can be supplied through two channels:\n\n- **Per-property attributes**: any non-reserved attribute on the element maps to the script\n attribute of the same name (kebab-case to camelCase, e.g. `focus-point` `focusPoint`).\n Values are parsed according to the type of the attribute's current value — initially the\n script's declared default (numbers, booleans, strings, Vec2/3/4, Color, Quat as Euler\n angles) — and the `asset:`/`entity:`/`vec2:`/`vec3:`/`vec4:`/`color:` prefixes may be used\n to be explicit.\n- **The `attributes` JSON attribute**: an object supporting nested structures and attribute\n names that collide with reserved HTML attribute names (e.g. `title`).\n\nWhen both specify the same attribute, the per-property attribute wins — at creation and\nwhenever either channel changes at runtime. The element's own `name` and `enabled`\nattributes configure the element itself and are not script attributes.\n\nChanging `name` on a live element destroys the old-name script instance and creates the\nnew-name one, re-applying both attribute channels to it.\n\nThe element becomes ready once its script instance has been created by the parent\n`<pc-script>` element.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n- **scriptattributeschange** - Fired when the script's attributes change. The `detail` carries the new `attributes` object. Bubbles.\n- **scriptenablechange** - Fired when the script's enabled state changes. The `detail` carries the new `enabled` state. Bubbles.\n- **scriptnamechange** - Fired when the script is renamed on a live element. The `detail` carries `oldName` and `newName`. Bubbles.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
4256
- "doc-url": "",
4355
+ "description": "The `<pc-script-instance>` element attaches one script class, named by `name`, to\nthe entity of its parent `<pc-script>`. Its other attributes set script attributes of the same\nname, and `attributes` takes a JSON object instead. Must be a direct child of `<pc-script>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n- **scriptattributeschange** - Fired when the script's attributes change. The `detail` carries the new `attributes` object. Bubbles.\n- **scriptenablechange** - Fired when the script's enabled state changes. The `detail` carries the new `enabled` state. Bubbles.\n- **scriptnamechange** - Fired when the script is renamed on a live element. The `detail` carries `oldName` and `newName`. Bubbles.",
4356
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-script-instance/",
4257
4357
  "attributes": [
4258
4358
  {
4259
4359
  "name": "attributes",
@@ -4347,8 +4447,8 @@
4347
4447
  },
4348
4448
  {
4349
4449
  "name": "pc-scroll-view",
4350
- "description": "The ScrollViewComponentElement interface provides properties and methods for manipulating\n[`<pc-scroll-view>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-scroll-view/) elements.\nThe ScrollViewComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: ScrollViewComponent (`scrollview`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
4351
- "doc-url": "",
4450
+ "description": "The `<pc-scroll-view>` element scrolls a larger content entity within a clipped\nviewport at its entity, optionally driven by the `<pc-scrollbar>` elements it references. Must be\na child of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
4451
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-scroll-view/",
4352
4452
  "attributes": [
4353
4453
  {
4354
4454
  "name": "bounce-amount",
@@ -4519,8 +4619,8 @@
4519
4619
  },
4520
4620
  {
4521
4621
  "name": "pc-scrollbar",
4522
- "description": "The ScrollbarComponentElement interface provides properties and methods for manipulating\n[`<pc-scrollbar>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-scrollbar/) elements.\nThe ScrollbarComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: ScrollbarComponent (`scrollbar`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
4523
- "doc-url": "",
4622
+ "description": "The `<pc-scrollbar>` element gives its entity a draggable handle reporting a\nposition from 0 to 1, which a `<pc-scroll-view>` references to scroll its content. Must be a\nchild of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
4623
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-scrollbar/",
4524
4624
  "attributes": [
4525
4625
  {
4526
4626
  "name": "enabled",
@@ -4607,8 +4707,8 @@
4607
4707
  },
4608
4708
  {
4609
4709
  "name": "pc-sound",
4610
- "description": "The SoundComponentElement interface provides properties and methods for manipulating\n[`<pc-sound>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-sound/) elements.\nThe SoundComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: SoundComponent (`sound`).\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
4611
- "doc-url": "",
4710
+ "description": "The `<pc-sound>` element holds the `<pc-sound-slot>` children that play sounds at\nits entity, along with the positional audio settings they share. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
4711
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-sound/",
4612
4712
  "attributes": [
4613
4713
  {
4614
4714
  "name": "distance-model",
@@ -4723,8 +4823,8 @@
4723
4823
  },
4724
4824
  {
4725
4825
  "name": "pc-sound-slot",
4726
- "description": "The SoundSlotElement interface provides properties and methods for manipulating\n`<pc-sound-slot>` elements. The SoundSlotElement interface also inherits the properties and\nmethods of the AsyncElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
4727
- "doc-url": "",
4826
+ "description": "The `<pc-sound-slot>` element declares one named sound on its parent `<pc-sound>`\n— its asset, volume, pitch, looping and autoplay. Must be a direct child of `<pc-sound>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
4827
+ "doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-sound-slot/",
4728
4828
  "attributes": [
4729
4829
  {
4730
4830
  "name": "asset",