@playcanvas/web-components 0.15.0 → 0.17.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.
- package/dist/app.d.cts +14 -13
- package/dist/app.d.ts +14 -13
- package/dist/async-element.d.cts +13 -13
- package/dist/async-element.d.ts +13 -13
- package/dist/components/anim-clip.d.cts +127 -0
- package/dist/components/anim-clip.d.ts +127 -0
- package/dist/components/anim-component.d.cts +235 -0
- package/dist/components/anim-component.d.ts +235 -0
- package/dist/components/{listener-component.d.cts → audio-listener-component.d.cts} +7 -5
- package/dist/components/{listener-component.d.ts → audio-listener-component.d.ts} +7 -5
- package/dist/components/button-component.d.cts +5 -1
- package/dist/components/button-component.d.ts +5 -1
- package/dist/components/camera-component.d.cts +2 -0
- package/dist/components/camera-component.d.ts +2 -0
- package/dist/components/collision-component.d.cts +5 -1
- package/dist/components/collision-component.d.ts +5 -1
- package/dist/components/component.d.cts +3 -2
- package/dist/components/component.d.ts +3 -2
- package/dist/components/element-component.d.cts +7 -0
- package/dist/components/element-component.d.ts +7 -0
- package/dist/components/gsplat-component.d.cts +2 -0
- package/dist/components/gsplat-component.d.ts +2 -0
- package/dist/components/joint-component.d.cts +2 -0
- package/dist/components/joint-component.d.ts +2 -0
- package/dist/components/{layoutchild-component.d.cts → layout-child-component.d.cts} +3 -1
- package/dist/components/{layoutchild-component.d.ts → layout-child-component.d.ts} +3 -1
- package/dist/components/{layoutgroup-component.d.cts → layout-group-component.d.cts} +3 -1
- package/dist/components/{layoutgroup-component.d.ts → layout-group-component.d.ts} +3 -1
- package/dist/components/light-component.d.cts +2 -0
- package/dist/components/light-component.d.ts +2 -0
- package/dist/components/{particlesystem-component.d.cts → particle-system-component.d.cts} +3 -1
- package/dist/components/{particlesystem-component.d.ts → particle-system-component.d.ts} +3 -1
- package/dist/components/render-component.d.cts +2 -0
- package/dist/components/render-component.d.ts +2 -0
- package/dist/components/{rigidbody-component.d.cts → rigid-body-component.d.cts} +3 -1
- package/dist/components/{rigidbody-component.d.ts → rigid-body-component.d.ts} +3 -1
- package/dist/components/screen-component.d.cts +2 -0
- package/dist/components/screen-component.d.ts +2 -0
- package/dist/components/script-component.d.cts +23 -12
- package/dist/components/script-component.d.ts +23 -12
- package/dist/components/{script.d.cts → script-instance.d.cts} +7 -7
- package/dist/components/{script.d.ts → script-instance.d.ts} +7 -7
- package/dist/components/{scrollview-component.d.cts → scroll-view-component.d.cts} +3 -1
- package/dist/components/{scrollview-component.d.ts → scroll-view-component.d.ts} +3 -1
- package/dist/components/scrollbar-component.d.cts +2 -0
- package/dist/components/scrollbar-component.d.ts +2 -0
- package/dist/components/sound-component.d.cts +3 -1
- package/dist/components/sound-component.d.ts +3 -1
- package/dist/components/sound-slot.d.cts +2 -2
- package/dist/components/sound-slot.d.ts +2 -2
- package/dist/custom-elements.json +3154 -2005
- package/dist/entity-base.d.cts +6 -5
- package/dist/entity-base.d.ts +6 -5
- package/dist/entity-owner.d.cts +118 -0
- package/dist/entity-owner.d.ts +118 -0
- package/dist/entity.d.cts +8 -101
- package/dist/entity.d.ts +8 -101
- package/dist/index.d.cts +26 -21
- package/dist/index.d.ts +26 -21
- package/dist/model.d.cts +67 -24
- package/dist/model.d.ts +67 -24
- package/dist/pwc.cjs +1766 -619
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +1766 -619
- package/dist/pwc.js.map +1 -1
- package/dist/pwc.min.js +1 -1
- package/dist/pwc.min.js.map +1 -1
- package/dist/pwc.min.mjs +1 -1
- package/dist/pwc.min.mjs.map +1 -1
- package/dist/pwc.mjs +1762 -618
- package/dist/pwc.mjs.map +1 -1
- package/dist/vscode.html-custom-data.json +203 -89
- package/dist/{module.d.cts → wasm.d.cts} +6 -6
- package/dist/{module.d.ts → wasm.d.ts} +6 -6
- package/dist/web-types.json +556 -273
- package/package.json +7 -7
- package/src/app.ts +45 -35
- package/src/async-element.ts +14 -14
- package/src/components/anim-clip.ts +395 -0
- package/src/components/anim-component.ts +719 -0
- package/src/components/{listener-component.ts → audio-listener-component.ts} +8 -6
- package/src/components/button-component.ts +5 -1
- package/src/components/camera-component.ts +2 -0
- package/src/components/collision-component.ts +5 -1
- package/src/components/component.ts +4 -3
- package/src/components/element-component.ts +7 -0
- package/src/components/gsplat-component.ts +2 -0
- package/src/components/joint-component.ts +2 -0
- package/src/components/{layoutchild-component.ts → layout-child-component.ts} +4 -2
- package/src/components/{layoutgroup-component.ts → layout-group-component.ts} +4 -2
- package/src/components/light-component.ts +2 -0
- package/src/components/{particlesystem-component.ts → particle-system-component.ts} +4 -2
- package/src/components/render-component.ts +2 -0
- package/src/components/{rigidbody-component.ts → rigid-body-component.ts} +4 -2
- package/src/components/screen-component.ts +2 -0
- package/src/components/script-component.ts +63 -42
- package/src/components/{script.ts → script-instance.ts} +14 -14
- package/src/components/{scrollview-component.ts → scroll-view-component.ts} +4 -2
- package/src/components/scrollbar-component.ts +2 -0
- package/src/components/sound-component.ts +4 -2
- package/src/components/sound-slot.ts +4 -4
- package/src/entity-base.ts +6 -5
- package/src/entity-owner.ts +298 -0
- package/src/entity.ts +15 -270
- package/src/index.ts +32 -24
- package/src/model.ts +159 -79
- package/src/node.ts +9 -5
- package/src/{module.ts → wasm.ts} +8 -8
package/dist/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.
|
|
4
|
+
"version": "0.17.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>` or `<pc-node>` element whose backing entity is
|
|
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
12
|
"doc-url": "",
|
|
13
13
|
"attributes": [
|
|
14
14
|
{
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "closestEntity",
|
|
96
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
96
|
+
"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.",
|
|
97
97
|
"type": "EntityBaseElement | null"
|
|
98
98
|
},
|
|
99
99
|
{
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
"name": "closestEntity",
|
|
286
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
286
|
+
"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.",
|
|
287
287
|
"type": "EntityBaseElement | null"
|
|
288
288
|
},
|
|
289
289
|
{
|
|
@@ -437,7 +437,7 @@
|
|
|
437
437
|
},
|
|
438
438
|
{
|
|
439
439
|
"name": "closestEntity",
|
|
440
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
440
|
+
"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.",
|
|
441
441
|
"type": "EntityBaseElement | null"
|
|
442
442
|
},
|
|
443
443
|
{
|
|
@@ -1293,13 +1293,68 @@
|
|
|
1293
1293
|
},
|
|
1294
1294
|
{
|
|
1295
1295
|
"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
|
|
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
1297
|
"doc-url": "",
|
|
1298
1298
|
"attributes": [
|
|
1299
1299
|
{
|
|
1300
1300
|
"name": "asset",
|
|
1301
1301
|
"description": "The id of the `pc-asset` to use for the model.",
|
|
1302
1302
|
"value": { "type": "string" }
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"name": "enabled",
|
|
1306
|
+
"description": "The enabled state of the model.",
|
|
1307
|
+
"value": { "type": "boolean", "default": "true" }
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"name": "name",
|
|
1311
|
+
"description": "The name of the model.",
|
|
1312
|
+
"value": { "type": "string" }
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"name": "onpointerdown",
|
|
1316
|
+
"description": "Script to run when a pointer button is pressed over the model.",
|
|
1317
|
+
"value": { "type": "string" }
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"name": "onpointerenter",
|
|
1321
|
+
"description": "Script to run when the pointer moves onto the model.",
|
|
1322
|
+
"value": { "type": "string" }
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"name": "onpointerleave",
|
|
1326
|
+
"description": "Script to run when the pointer moves off the model.",
|
|
1327
|
+
"value": { "type": "string" }
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
"name": "onpointermove",
|
|
1331
|
+
"description": "Script to run when the pointer moves over the model.",
|
|
1332
|
+
"value": { "type": "string" }
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"name": "onpointerup",
|
|
1336
|
+
"description": "Script to run when a pointer button is released over the model.",
|
|
1337
|
+
"value": { "type": "string" }
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
"name": "position",
|
|
1341
|
+
"description": "The position of the model. Accepts 3 space-separated numbers.",
|
|
1342
|
+
"value": { "type": "string", "default": "0 0 0" }
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
"name": "rotation",
|
|
1346
|
+
"description": "The rotation of the model. Accepts 3 space-separated numbers.",
|
|
1347
|
+
"value": { "type": "string", "default": "0 0 0" }
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
"name": "scale",
|
|
1351
|
+
"description": "The scale of the model. Accepts 3 space-separated numbers.",
|
|
1352
|
+
"value": { "type": "string", "default": "1 1 1" }
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"name": "tags",
|
|
1356
|
+
"description": "The tags of the model.",
|
|
1357
|
+
"value": { "type": "string" }
|
|
1303
1358
|
}
|
|
1304
1359
|
],
|
|
1305
1360
|
"events": [
|
|
@@ -1313,6 +1368,31 @@
|
|
|
1313
1368
|
"type": "Event",
|
|
1314
1369
|
"description": "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."
|
|
1315
1370
|
},
|
|
1371
|
+
{
|
|
1372
|
+
"name": "pointerdown",
|
|
1373
|
+
"type": "PointerEvent",
|
|
1374
|
+
"description": "Fired when a pointer button is pressed over the model."
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
"name": "pointerenter",
|
|
1378
|
+
"type": "PointerEvent",
|
|
1379
|
+
"description": "Fired when the pointer moves onto the model."
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
"name": "pointerleave",
|
|
1383
|
+
"type": "PointerEvent",
|
|
1384
|
+
"description": "Fired when the pointer moves off the model."
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"name": "pointermove",
|
|
1388
|
+
"type": "PointerEvent",
|
|
1389
|
+
"description": "Fired when the pointer moves over the model."
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
"name": "pointerup",
|
|
1393
|
+
"type": "PointerEvent",
|
|
1394
|
+
"description": "Fired when a pointer button is released over the model."
|
|
1395
|
+
},
|
|
1316
1396
|
{
|
|
1317
1397
|
"name": "ready",
|
|
1318
1398
|
"type": "CustomEvent",
|
|
@@ -1333,14 +1413,37 @@
|
|
|
1333
1413
|
},
|
|
1334
1414
|
{
|
|
1335
1415
|
"name": "closestEntity",
|
|
1336
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
1416
|
+
"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.",
|
|
1337
1417
|
"type": "EntityBaseElement | null"
|
|
1338
1418
|
},
|
|
1419
|
+
{
|
|
1420
|
+
"name": "contentEntity",
|
|
1421
|
+
"description": "The root entity of the instantiated model content, parented beneath the host entity.\n`null` until the container asset has loaded and been instantiated, after a failed load,\nand again once the element has been removed from the document.",
|
|
1422
|
+
"type": "Entity | null"
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"name": "enabled",
|
|
1426
|
+
"description": "Gets the enabled state of the entity."
|
|
1427
|
+
},
|
|
1339
1428
|
{
|
|
1340
1429
|
"name": "entity",
|
|
1341
|
-
"description": "The
|
|
1430
|
+
"description": "The PlayCanvas entity instance. `null` until the element is ready, and again once the\nentity is gone — await whenReady or the element's `ready()` promise before\naccessing it.",
|
|
1342
1431
|
"type": "Entity | null"
|
|
1343
|
-
}
|
|
1432
|
+
},
|
|
1433
|
+
{ "name": "name", "description": "Gets the name of the entity." },
|
|
1434
|
+
{
|
|
1435
|
+
"name": "position",
|
|
1436
|
+
"description": "Gets the position of the entity."
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"name": "rotation",
|
|
1440
|
+
"description": "Gets the rotation of the entity."
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
"name": "scale",
|
|
1444
|
+
"description": "Gets the scale of the entity."
|
|
1445
|
+
},
|
|
1446
|
+
{ "name": "tags", "description": "Gets the tags of the entity." }
|
|
1344
1447
|
],
|
|
1345
1448
|
"events": [
|
|
1346
1449
|
{
|
|
@@ -1354,60 +1457,30 @@
|
|
|
1354
1457
|
"description": "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."
|
|
1355
1458
|
},
|
|
1356
1459
|
{
|
|
1357
|
-
"name": "
|
|
1358
|
-
"type": "
|
|
1359
|
-
"description": "Fired when
|
|
1360
|
-
}
|
|
1361
|
-
]
|
|
1362
|
-
}
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
"name": "pc-module",
|
|
1366
|
-
"description": "The ModuleElement interface provides properties and methods for manipulating\n[`<pc-module>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-module/)\nelements. The ModuleElement 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-module>` 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.",
|
|
1367
|
-
"doc-url": "",
|
|
1368
|
-
"attributes": [
|
|
1369
|
-
{
|
|
1370
|
-
"name": "fallback",
|
|
1371
|
-
"description": "The URL of the module's asm.js fallback script, used when WebAssembly is unavailable.",
|
|
1372
|
-
"value": { "type": "string" }
|
|
1373
|
-
},
|
|
1374
|
-
{
|
|
1375
|
-
"name": "glue",
|
|
1376
|
-
"description": "The URL of the module's glue script.",
|
|
1377
|
-
"value": { "type": "string" }
|
|
1378
|
-
},
|
|
1379
|
-
{
|
|
1380
|
-
"name": "name",
|
|
1381
|
-
"description": "The name of the WebAssembly module to configure, e.g. `Basis` or `Ammo`.",
|
|
1382
|
-
"value": { "type": "string" }
|
|
1383
|
-
},
|
|
1384
|
-
{
|
|
1385
|
-
"name": "wasm",
|
|
1386
|
-
"description": "The URL of the module's WebAssembly binary.",
|
|
1387
|
-
"value": { "type": "string" }
|
|
1388
|
-
}
|
|
1389
|
-
],
|
|
1390
|
-
"events": [
|
|
1391
|
-
{
|
|
1392
|
-
"name": "ready",
|
|
1393
|
-
"type": "CustomEvent",
|
|
1394
|
-
"description": "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."
|
|
1395
|
-
}
|
|
1396
|
-
],
|
|
1397
|
-
"js": {
|
|
1398
|
-
"properties": [
|
|
1460
|
+
"name": "pointerdown",
|
|
1461
|
+
"type": "PointerEvent",
|
|
1462
|
+
"description": "Fired when a pointer button is pressed over the model."
|
|
1463
|
+
},
|
|
1399
1464
|
{
|
|
1400
|
-
"name": "
|
|
1401
|
-
"
|
|
1402
|
-
"
|
|
1465
|
+
"name": "pointerenter",
|
|
1466
|
+
"type": "PointerEvent",
|
|
1467
|
+
"description": "Fired when the pointer moves onto the model."
|
|
1403
1468
|
},
|
|
1404
1469
|
{
|
|
1405
|
-
"name": "
|
|
1406
|
-
"
|
|
1407
|
-
"
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
|
|
1470
|
+
"name": "pointerleave",
|
|
1471
|
+
"type": "PointerEvent",
|
|
1472
|
+
"description": "Fired when the pointer moves off the model."
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
"name": "pointermove",
|
|
1476
|
+
"type": "PointerEvent",
|
|
1477
|
+
"description": "Fired when the pointer moves over the model."
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"name": "pointerup",
|
|
1481
|
+
"type": "PointerEvent",
|
|
1482
|
+
"description": "Fired when a pointer button is released over the model."
|
|
1483
|
+
},
|
|
1411
1484
|
{
|
|
1412
1485
|
"name": "ready",
|
|
1413
1486
|
"type": "CustomEvent",
|
|
@@ -1528,7 +1601,7 @@
|
|
|
1528
1601
|
},
|
|
1529
1602
|
{
|
|
1530
1603
|
"name": "closestEntity",
|
|
1531
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
1604
|
+
"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.",
|
|
1532
1605
|
"type": "EntityBaseElement | null"
|
|
1533
1606
|
},
|
|
1534
1607
|
{
|
|
@@ -1676,7 +1749,7 @@
|
|
|
1676
1749
|
},
|
|
1677
1750
|
{
|
|
1678
1751
|
"name": "closestEntity",
|
|
1679
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
1752
|
+
"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.",
|
|
1680
1753
|
"type": "EntityBaseElement | null"
|
|
1681
1754
|
},
|
|
1682
1755
|
{
|
|
@@ -1776,14 +1849,285 @@
|
|
|
1776
1849
|
],
|
|
1777
1850
|
"js": {
|
|
1778
1851
|
"properties": [
|
|
1779
|
-
{
|
|
1780
|
-
"name": "asset",
|
|
1781
|
-
"description": "Gets the id of the `pc-asset` to use for the skybox."
|
|
1782
|
-
},
|
|
1783
|
-
{
|
|
1784
|
-
"name": "center",
|
|
1785
|
-
"description": "Gets the center of the skybox."
|
|
1786
|
-
},
|
|
1852
|
+
{
|
|
1853
|
+
"name": "asset",
|
|
1854
|
+
"description": "Gets the id of the `pc-asset` to use for the skybox."
|
|
1855
|
+
},
|
|
1856
|
+
{
|
|
1857
|
+
"name": "center",
|
|
1858
|
+
"description": "Gets the center of the skybox."
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
"name": "closestApp",
|
|
1862
|
+
"description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
|
|
1863
|
+
"type": "AppElement | null"
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
"name": "closestEntity",
|
|
1867
|
+
"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.",
|
|
1868
|
+
"type": "EntityBaseElement | null"
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"name": "intensity",
|
|
1872
|
+
"description": "Gets the intensity of the skybox."
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
"name": "lighting",
|
|
1876
|
+
"description": "Gets whether the skybox is used as a light source."
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"name": "mipLevel",
|
|
1880
|
+
"description": "Gets the mip level of the skybox."
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
"name": "rotation",
|
|
1884
|
+
"description": "Gets the Euler rotation of the skybox."
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
"name": "scale",
|
|
1888
|
+
"description": "Gets the scale of the skybox."
|
|
1889
|
+
},
|
|
1890
|
+
{ "name": "type", "description": "Gets the type of the skybox." }
|
|
1891
|
+
],
|
|
1892
|
+
"events": [
|
|
1893
|
+
{
|
|
1894
|
+
"name": "ready",
|
|
1895
|
+
"type": "CustomEvent",
|
|
1896
|
+
"description": "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."
|
|
1897
|
+
}
|
|
1898
|
+
]
|
|
1899
|
+
}
|
|
1900
|
+
},
|
|
1901
|
+
{
|
|
1902
|
+
"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": "",
|
|
1905
|
+
"attributes": [
|
|
1906
|
+
{
|
|
1907
|
+
"name": "fallback",
|
|
1908
|
+
"description": "The URL of the module's asm.js fallback script, used when WebAssembly is unavailable.",
|
|
1909
|
+
"value": { "type": "string" }
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
"name": "glue",
|
|
1913
|
+
"description": "The URL of the module's glue script.",
|
|
1914
|
+
"value": { "type": "string" }
|
|
1915
|
+
},
|
|
1916
|
+
{
|
|
1917
|
+
"name": "name",
|
|
1918
|
+
"description": "The name of the WebAssembly module to configure, e.g. `Basis` or `Ammo`.",
|
|
1919
|
+
"value": { "type": "string" }
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
"name": "wasm",
|
|
1923
|
+
"description": "The URL of the module's WebAssembly binary.",
|
|
1924
|
+
"value": { "type": "string" }
|
|
1925
|
+
}
|
|
1926
|
+
],
|
|
1927
|
+
"events": [
|
|
1928
|
+
{
|
|
1929
|
+
"name": "ready",
|
|
1930
|
+
"type": "CustomEvent",
|
|
1931
|
+
"description": "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."
|
|
1932
|
+
}
|
|
1933
|
+
],
|
|
1934
|
+
"js": {
|
|
1935
|
+
"properties": [
|
|
1936
|
+
{
|
|
1937
|
+
"name": "closestApp",
|
|
1938
|
+
"description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
|
|
1939
|
+
"type": "AppElement | null"
|
|
1940
|
+
},
|
|
1941
|
+
{
|
|
1942
|
+
"name": "closestEntity",
|
|
1943
|
+
"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.",
|
|
1944
|
+
"type": "EntityBaseElement | null"
|
|
1945
|
+
}
|
|
1946
|
+
],
|
|
1947
|
+
"events": [
|
|
1948
|
+
{
|
|
1949
|
+
"name": "ready",
|
|
1950
|
+
"type": "CustomEvent",
|
|
1951
|
+
"description": "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."
|
|
1952
|
+
}
|
|
1953
|
+
]
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
"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": "",
|
|
1960
|
+
"attributes": [
|
|
1961
|
+
{
|
|
1962
|
+
"name": "asset",
|
|
1963
|
+
"description": "The id of the `pc-asset` supplying the clip's track.",
|
|
1964
|
+
"value": { "type": "string" }
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"name": "loop",
|
|
1968
|
+
"description": "Whether the clip loops.",
|
|
1969
|
+
"value": { "type": "boolean", "default": "true" }
|
|
1970
|
+
},
|
|
1971
|
+
{
|
|
1972
|
+
"name": "name",
|
|
1973
|
+
"description": "The name of the clip.",
|
|
1974
|
+
"value": { "type": "string" }
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
"name": "speed",
|
|
1978
|
+
"description": "The playback speed of the clip.",
|
|
1979
|
+
"value": { "type": "number", "default": "1" }
|
|
1980
|
+
}
|
|
1981
|
+
],
|
|
1982
|
+
"events": [
|
|
1983
|
+
{
|
|
1984
|
+
"name": "ready",
|
|
1985
|
+
"type": "CustomEvent",
|
|
1986
|
+
"description": "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."
|
|
1987
|
+
}
|
|
1988
|
+
],
|
|
1989
|
+
"js": {
|
|
1990
|
+
"properties": [
|
|
1991
|
+
{
|
|
1992
|
+
"name": "asset",
|
|
1993
|
+
"description": "Gets the id of the `pc-asset` supplying the clip's track."
|
|
1994
|
+
},
|
|
1995
|
+
{
|
|
1996
|
+
"name": "closestApp",
|
|
1997
|
+
"description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
|
|
1998
|
+
"type": "AppElement | null"
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
"name": "closestEntity",
|
|
2002
|
+
"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.",
|
|
2003
|
+
"type": "EntityBaseElement | null"
|
|
2004
|
+
},
|
|
2005
|
+
{ "name": "loop", "description": "Gets whether the clip loops." },
|
|
2006
|
+
{ "name": "name", "description": "Gets the name of the clip." },
|
|
2007
|
+
{
|
|
2008
|
+
"name": "speed",
|
|
2009
|
+
"description": "Gets the playback speed of the clip."
|
|
2010
|
+
}
|
|
2011
|
+
],
|
|
2012
|
+
"events": [
|
|
2013
|
+
{
|
|
2014
|
+
"name": "ready",
|
|
2015
|
+
"type": "CustomEvent",
|
|
2016
|
+
"description": "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."
|
|
2017
|
+
}
|
|
2018
|
+
]
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
"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": "",
|
|
2025
|
+
"attributes": [
|
|
2026
|
+
{
|
|
2027
|
+
"name": "activate",
|
|
2028
|
+
"description": "Whether playback starts automatically once a clip is assigned.",
|
|
2029
|
+
"value": { "type": "boolean", "default": "true" }
|
|
2030
|
+
},
|
|
2031
|
+
{
|
|
2032
|
+
"name": "clip",
|
|
2033
|
+
"description": "The name of the active clip.",
|
|
2034
|
+
"value": { "type": "string" }
|
|
2035
|
+
},
|
|
2036
|
+
{
|
|
2037
|
+
"name": "enabled",
|
|
2038
|
+
"description": "The enabled state of the component.",
|
|
2039
|
+
"value": { "type": "boolean", "default": "true" }
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
"name": "speed",
|
|
2043
|
+
"description": "The playback speed multiplier applied across all clips.",
|
|
2044
|
+
"value": { "type": "number", "default": "1" }
|
|
2045
|
+
},
|
|
2046
|
+
{
|
|
2047
|
+
"name": "transition-time",
|
|
2048
|
+
"description": "The cross-fade duration of clip switches made through the `clip` attribute.",
|
|
2049
|
+
"value": { "type": "number", "default": "0" }
|
|
2050
|
+
}
|
|
2051
|
+
],
|
|
2052
|
+
"events": [
|
|
2053
|
+
{
|
|
2054
|
+
"name": "ready",
|
|
2055
|
+
"type": "CustomEvent",
|
|
2056
|
+
"description": "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."
|
|
2057
|
+
}
|
|
2058
|
+
],
|
|
2059
|
+
"js": {
|
|
2060
|
+
"properties": [
|
|
2061
|
+
{
|
|
2062
|
+
"name": "activate",
|
|
2063
|
+
"description": "Gets whether playback starts automatically once a clip is assigned."
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
"name": "clip",
|
|
2067
|
+
"description": "Gets the name of the active clip."
|
|
2068
|
+
},
|
|
2069
|
+
{
|
|
2070
|
+
"name": "clips",
|
|
2071
|
+
"description": "Gets the names of the assigned clips.",
|
|
2072
|
+
"type": "string[]"
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
"name": "closestApp",
|
|
2076
|
+
"description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
|
|
2077
|
+
"type": "AppElement | null"
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
"name": "closestEntity",
|
|
2081
|
+
"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.",
|
|
2082
|
+
"type": "EntityBaseElement | null"
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
"name": "component",
|
|
2086
|
+
"description": "Gets the underlying PlayCanvas anim component.",
|
|
2087
|
+
"type": "Component | null"
|
|
2088
|
+
},
|
|
2089
|
+
{
|
|
2090
|
+
"name": "enabled",
|
|
2091
|
+
"description": "Gets the enabled state of the component."
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
"name": "speed",
|
|
2095
|
+
"description": "Gets the playback speed multiplier applied across all clips."
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
"name": "transitionTime",
|
|
2099
|
+
"description": "Gets the cross-fade duration of clip switches made through the `clip` attribute."
|
|
2100
|
+
}
|
|
2101
|
+
],
|
|
2102
|
+
"events": [
|
|
2103
|
+
{
|
|
2104
|
+
"name": "ready",
|
|
2105
|
+
"type": "CustomEvent",
|
|
2106
|
+
"description": "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."
|
|
2107
|
+
}
|
|
2108
|
+
]
|
|
2109
|
+
}
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
"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": "",
|
|
2115
|
+
"attributes": [
|
|
2116
|
+
{
|
|
2117
|
+
"name": "enabled",
|
|
2118
|
+
"description": "The enabled state of the component.",
|
|
2119
|
+
"value": { "type": "boolean", "default": "true" }
|
|
2120
|
+
}
|
|
2121
|
+
],
|
|
2122
|
+
"events": [
|
|
2123
|
+
{
|
|
2124
|
+
"name": "ready",
|
|
2125
|
+
"type": "CustomEvent",
|
|
2126
|
+
"description": "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."
|
|
2127
|
+
}
|
|
2128
|
+
],
|
|
2129
|
+
"js": {
|
|
2130
|
+
"properties": [
|
|
1787
2131
|
{
|
|
1788
2132
|
"name": "closestApp",
|
|
1789
2133
|
"description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
|
|
@@ -1791,30 +2135,18 @@
|
|
|
1791
2135
|
},
|
|
1792
2136
|
{
|
|
1793
2137
|
"name": "closestEntity",
|
|
1794
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
2138
|
+
"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.",
|
|
1795
2139
|
"type": "EntityBaseElement | null"
|
|
1796
2140
|
},
|
|
1797
2141
|
{
|
|
1798
|
-
"name": "
|
|
1799
|
-
"description": "Gets the
|
|
1800
|
-
|
|
1801
|
-
{
|
|
1802
|
-
"name": "lighting",
|
|
1803
|
-
"description": "Gets whether the skybox is used as a light source."
|
|
1804
|
-
},
|
|
1805
|
-
{
|
|
1806
|
-
"name": "mipLevel",
|
|
1807
|
-
"description": "Gets the mip level of the skybox."
|
|
1808
|
-
},
|
|
1809
|
-
{
|
|
1810
|
-
"name": "rotation",
|
|
1811
|
-
"description": "Gets the Euler rotation of the skybox."
|
|
2142
|
+
"name": "component",
|
|
2143
|
+
"description": "Gets the underlying PlayCanvas audio listener component.",
|
|
2144
|
+
"type": "Component | null"
|
|
1812
2145
|
},
|
|
1813
2146
|
{
|
|
1814
|
-
"name": "
|
|
1815
|
-
"description": "Gets the
|
|
1816
|
-
}
|
|
1817
|
-
{ "name": "type", "description": "Gets the type of the skybox." }
|
|
2147
|
+
"name": "enabled",
|
|
2148
|
+
"description": "Gets the enabled state of the component."
|
|
2149
|
+
}
|
|
1818
2150
|
],
|
|
1819
2151
|
"events": [
|
|
1820
2152
|
{
|
|
@@ -1827,7 +2159,7 @@
|
|
|
1827
2159
|
},
|
|
1828
2160
|
{
|
|
1829
2161
|
"name": "pc-button",
|
|
1830
|
-
"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\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.",
|
|
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.",
|
|
1831
2163
|
"doc-url": "",
|
|
1832
2164
|
"attributes": [
|
|
1833
2165
|
{
|
|
@@ -1926,7 +2258,7 @@
|
|
|
1926
2258
|
},
|
|
1927
2259
|
{
|
|
1928
2260
|
"name": "closestEntity",
|
|
1929
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
2261
|
+
"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.",
|
|
1930
2262
|
"type": "EntityBaseElement | null"
|
|
1931
2263
|
},
|
|
1932
2264
|
{
|
|
@@ -2002,7 +2334,7 @@
|
|
|
2002
2334
|
},
|
|
2003
2335
|
{
|
|
2004
2336
|
"name": "pc-camera",
|
|
2005
|
-
"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\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.",
|
|
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.",
|
|
2006
2338
|
"doc-url": "",
|
|
2007
2339
|
"attributes": [
|
|
2008
2340
|
{
|
|
@@ -2143,7 +2475,7 @@
|
|
|
2143
2475
|
},
|
|
2144
2476
|
{
|
|
2145
2477
|
"name": "closestEntity",
|
|
2146
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
2478
|
+
"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.",
|
|
2147
2479
|
"type": "EntityBaseElement | null"
|
|
2148
2480
|
},
|
|
2149
2481
|
{
|
|
@@ -2236,7 +2568,7 @@
|
|
|
2236
2568
|
},
|
|
2237
2569
|
{
|
|
2238
2570
|
"name": "pc-collision",
|
|
2239
|
-
"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\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.",
|
|
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.",
|
|
2240
2572
|
"doc-url": "",
|
|
2241
2573
|
"attributes": [
|
|
2242
2574
|
{
|
|
@@ -2295,7 +2627,7 @@
|
|
|
2295
2627
|
},
|
|
2296
2628
|
{
|
|
2297
2629
|
"name": "closestEntity",
|
|
2298
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
2630
|
+
"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.",
|
|
2299
2631
|
"type": "EntityBaseElement | null"
|
|
2300
2632
|
},
|
|
2301
2633
|
{
|
|
@@ -2325,7 +2657,7 @@
|
|
|
2325
2657
|
},
|
|
2326
2658
|
{
|
|
2327
2659
|
"name": "pc-element",
|
|
2328
|
-
"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\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.",
|
|
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.",
|
|
2329
2661
|
"doc-url": "",
|
|
2330
2662
|
"attributes": [
|
|
2331
2663
|
{
|
|
@@ -2503,7 +2835,7 @@
|
|
|
2503
2835
|
},
|
|
2504
2836
|
{
|
|
2505
2837
|
"name": "closestEntity",
|
|
2506
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
2838
|
+
"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.",
|
|
2507
2839
|
"type": "EntityBaseElement | null"
|
|
2508
2840
|
},
|
|
2509
2841
|
{
|
|
@@ -2612,7 +2944,7 @@
|
|
|
2612
2944
|
},
|
|
2613
2945
|
{
|
|
2614
2946
|
"name": "pc-gsplat",
|
|
2615
|
-
"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\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.",
|
|
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.",
|
|
2616
2948
|
"doc-url": "",
|
|
2617
2949
|
"attributes": [
|
|
2618
2950
|
{
|
|
@@ -2675,7 +3007,7 @@
|
|
|
2675
3007
|
},
|
|
2676
3008
|
{
|
|
2677
3009
|
"name": "closestEntity",
|
|
2678
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
3010
|
+
"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.",
|
|
2679
3011
|
"type": "EntityBaseElement | null"
|
|
2680
3012
|
},
|
|
2681
3013
|
{
|
|
@@ -2715,7 +3047,7 @@
|
|
|
2715
3047
|
},
|
|
2716
3048
|
{
|
|
2717
3049
|
"name": "pc-joint",
|
|
2718
|
-
"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.\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.",
|
|
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.",
|
|
2719
3051
|
"doc-url": "",
|
|
2720
3052
|
"attributes": [
|
|
2721
3053
|
{
|
|
@@ -2899,7 +3231,7 @@
|
|
|
2899
3231
|
{
|
|
2900
3232
|
"name": "break",
|
|
2901
3233
|
"type": "CustomEvent",
|
|
2902
|
-
"description": "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."
|
|
3234
|
+
"description": "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`)."
|
|
2903
3235
|
},
|
|
2904
3236
|
{
|
|
2905
3237
|
"name": "ready",
|
|
@@ -2956,7 +3288,7 @@
|
|
|
2956
3288
|
},
|
|
2957
3289
|
{
|
|
2958
3290
|
"name": "closestEntity",
|
|
2959
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
3291
|
+
"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.",
|
|
2960
3292
|
"type": "EntityBaseElement | null"
|
|
2961
3293
|
},
|
|
2962
3294
|
{
|
|
@@ -3050,7 +3382,7 @@
|
|
|
3050
3382
|
{
|
|
3051
3383
|
"name": "break",
|
|
3052
3384
|
"type": "CustomEvent",
|
|
3053
|
-
"description": "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."
|
|
3385
|
+
"description": "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`)."
|
|
3054
3386
|
},
|
|
3055
3387
|
{
|
|
3056
3388
|
"name": "ready",
|
|
@@ -3061,8 +3393,8 @@
|
|
|
3061
3393
|
}
|
|
3062
3394
|
},
|
|
3063
3395
|
{
|
|
3064
|
-
"name": "pc-
|
|
3065
|
-
"description": "The LayoutChildComponentElement interface provides properties and methods for manipulating\n[`<pc-
|
|
3396
|
+
"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.",
|
|
3066
3398
|
"doc-url": "",
|
|
3067
3399
|
"attributes": [
|
|
3068
3400
|
{
|
|
@@ -3122,7 +3454,7 @@
|
|
|
3122
3454
|
},
|
|
3123
3455
|
{
|
|
3124
3456
|
"name": "closestEntity",
|
|
3125
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
3457
|
+
"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.",
|
|
3126
3458
|
"type": "EntityBaseElement | null"
|
|
3127
3459
|
},
|
|
3128
3460
|
{
|
|
@@ -3173,8 +3505,8 @@
|
|
|
3173
3505
|
}
|
|
3174
3506
|
},
|
|
3175
3507
|
{
|
|
3176
|
-
"name": "pc-
|
|
3177
|
-
"description": "The LayoutGroupComponentElement interface provides properties and methods for manipulating\n[`<pc-
|
|
3508
|
+
"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.",
|
|
3178
3510
|
"doc-url": "",
|
|
3179
3511
|
"attributes": [
|
|
3180
3512
|
{
|
|
@@ -3257,7 +3589,7 @@
|
|
|
3257
3589
|
},
|
|
3258
3590
|
{
|
|
3259
3591
|
"name": "closestEntity",
|
|
3260
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
3592
|
+
"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.",
|
|
3261
3593
|
"type": "EntityBaseElement | null"
|
|
3262
3594
|
},
|
|
3263
3595
|
{
|
|
@@ -3313,7 +3645,7 @@
|
|
|
3313
3645
|
},
|
|
3314
3646
|
{
|
|
3315
3647
|
"name": "pc-light",
|
|
3316
|
-
"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\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.",
|
|
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.",
|
|
3317
3649
|
"doc-url": "",
|
|
3318
3650
|
"attributes": [
|
|
3319
3651
|
{
|
|
@@ -3443,7 +3775,7 @@
|
|
|
3443
3775
|
},
|
|
3444
3776
|
{
|
|
3445
3777
|
"name": "closestEntity",
|
|
3446
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
3778
|
+
"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.",
|
|
3447
3779
|
"type": "EntityBaseElement | null"
|
|
3448
3780
|
},
|
|
3449
3781
|
{
|
|
@@ -3535,57 +3867,8 @@
|
|
|
3535
3867
|
}
|
|
3536
3868
|
},
|
|
3537
3869
|
{
|
|
3538
|
-
"name": "pc-
|
|
3539
|
-
"description": "The
|
|
3540
|
-
"doc-url": "",
|
|
3541
|
-
"attributes": [
|
|
3542
|
-
{
|
|
3543
|
-
"name": "enabled",
|
|
3544
|
-
"description": "The enabled state of the component.",
|
|
3545
|
-
"value": { "type": "boolean", "default": "true" }
|
|
3546
|
-
}
|
|
3547
|
-
],
|
|
3548
|
-
"events": [
|
|
3549
|
-
{
|
|
3550
|
-
"name": "ready",
|
|
3551
|
-
"type": "CustomEvent",
|
|
3552
|
-
"description": "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."
|
|
3553
|
-
}
|
|
3554
|
-
],
|
|
3555
|
-
"js": {
|
|
3556
|
-
"properties": [
|
|
3557
|
-
{
|
|
3558
|
-
"name": "closestApp",
|
|
3559
|
-
"description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
|
|
3560
|
-
"type": "AppElement | null"
|
|
3561
|
-
},
|
|
3562
|
-
{
|
|
3563
|
-
"name": "closestEntity",
|
|
3564
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
|
|
3565
|
-
"type": "EntityBaseElement | null"
|
|
3566
|
-
},
|
|
3567
|
-
{
|
|
3568
|
-
"name": "component",
|
|
3569
|
-
"description": "Gets the underlying PlayCanvas audio listener component.",
|
|
3570
|
-
"type": "Component | null"
|
|
3571
|
-
},
|
|
3572
|
-
{
|
|
3573
|
-
"name": "enabled",
|
|
3574
|
-
"description": "Gets the enabled state of the component."
|
|
3575
|
-
}
|
|
3576
|
-
],
|
|
3577
|
-
"events": [
|
|
3578
|
-
{
|
|
3579
|
-
"name": "ready",
|
|
3580
|
-
"type": "CustomEvent",
|
|
3581
|
-
"description": "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."
|
|
3582
|
-
}
|
|
3583
|
-
]
|
|
3584
|
-
}
|
|
3585
|
-
},
|
|
3586
|
-
{
|
|
3587
|
-
"name": "pc-particles",
|
|
3588
|
-
"description": "The ParticleSystemComponentElement interface provides properties and methods for manipulating\n[`<pc-particles>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-particles/) elements.\nThe ParticleSystemComponentElement 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 - **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",
|
|
3870
|
+
"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",
|
|
3589
3872
|
"doc-url": "",
|
|
3590
3873
|
"attributes": [
|
|
3591
3874
|
{
|
|
@@ -3620,7 +3903,7 @@
|
|
|
3620
3903
|
},
|
|
3621
3904
|
{
|
|
3622
3905
|
"name": "closestEntity",
|
|
3623
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
3906
|
+
"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.",
|
|
3624
3907
|
"type": "EntityBaseElement | null"
|
|
3625
3908
|
},
|
|
3626
3909
|
{
|
|
@@ -3644,7 +3927,7 @@
|
|
|
3644
3927
|
},
|
|
3645
3928
|
{
|
|
3646
3929
|
"name": "pc-render",
|
|
3647
|
-
"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\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.",
|
|
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.",
|
|
3648
3931
|
"doc-url": "",
|
|
3649
3932
|
"attributes": [
|
|
3650
3933
|
{
|
|
@@ -3697,7 +3980,7 @@
|
|
|
3697
3980
|
},
|
|
3698
3981
|
{
|
|
3699
3982
|
"name": "closestEntity",
|
|
3700
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
3983
|
+
"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.",
|
|
3701
3984
|
"type": "EntityBaseElement | null"
|
|
3702
3985
|
},
|
|
3703
3986
|
{
|
|
@@ -3734,8 +4017,8 @@
|
|
|
3734
4017
|
}
|
|
3735
4018
|
},
|
|
3736
4019
|
{
|
|
3737
|
-
"name": "pc-
|
|
3738
|
-
"description": "The RigidBodyComponentElement interface provides properties and methods for manipulating\n[`<pc-
|
|
4020
|
+
"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.",
|
|
3739
4022
|
"doc-url": "",
|
|
3740
4023
|
"attributes": [
|
|
3741
4024
|
{
|
|
@@ -3800,7 +4083,7 @@
|
|
|
3800
4083
|
},
|
|
3801
4084
|
{
|
|
3802
4085
|
"name": "closestEntity",
|
|
3803
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
4086
|
+
"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.",
|
|
3804
4087
|
"type": "EntityBaseElement | null"
|
|
3805
4088
|
},
|
|
3806
4089
|
{
|
|
@@ -3831,7 +4114,7 @@
|
|
|
3831
4114
|
},
|
|
3832
4115
|
{
|
|
3833
4116
|
"name": "pc-screen",
|
|
3834
|
-
"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\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.",
|
|
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.",
|
|
3835
4118
|
"doc-url": "",
|
|
3836
4119
|
"attributes": [
|
|
3837
4120
|
{
|
|
@@ -3884,7 +4167,7 @@
|
|
|
3884
4167
|
},
|
|
3885
4168
|
{
|
|
3886
4169
|
"name": "closestEntity",
|
|
3887
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
4170
|
+
"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.",
|
|
3888
4171
|
"type": "EntityBaseElement | null"
|
|
3889
4172
|
},
|
|
3890
4173
|
{
|
|
@@ -3919,8 +4202,8 @@
|
|
|
3919
4202
|
}
|
|
3920
4203
|
},
|
|
3921
4204
|
{
|
|
3922
|
-
"name": "pc-
|
|
3923
|
-
"description": "The ScriptComponentElement interface provides properties and methods for manipulating\n[`<pc-
|
|
4205
|
+
"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.",
|
|
3924
4207
|
"doc-url": "",
|
|
3925
4208
|
"attributes": [
|
|
3926
4209
|
{
|
|
@@ -3945,7 +4228,7 @@
|
|
|
3945
4228
|
},
|
|
3946
4229
|
{
|
|
3947
4230
|
"name": "closestEntity",
|
|
3948
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
4231
|
+
"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.",
|
|
3949
4232
|
"type": "EntityBaseElement | null"
|
|
3950
4233
|
},
|
|
3951
4234
|
{
|
|
@@ -3968,8 +4251,8 @@
|
|
|
3968
4251
|
}
|
|
3969
4252
|
},
|
|
3970
4253
|
{
|
|
3971
|
-
"name": "pc-script",
|
|
3972
|
-
"description": "The
|
|
4254
|
+
"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.",
|
|
3973
4256
|
"doc-url": "",
|
|
3974
4257
|
"attributes": [
|
|
3975
4258
|
{
|
|
@@ -4019,7 +4302,7 @@
|
|
|
4019
4302
|
},
|
|
4020
4303
|
{
|
|
4021
4304
|
"name": "closestEntity",
|
|
4022
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
4305
|
+
"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.",
|
|
4023
4306
|
"type": "EntityBaseElement | null"
|
|
4024
4307
|
},
|
|
4025
4308
|
{
|
|
@@ -4063,96 +4346,8 @@
|
|
|
4063
4346
|
}
|
|
4064
4347
|
},
|
|
4065
4348
|
{
|
|
4066
|
-
"name": "pc-
|
|
4067
|
-
"description": "The
|
|
4068
|
-
"doc-url": "",
|
|
4069
|
-
"attributes": [
|
|
4070
|
-
{
|
|
4071
|
-
"name": "enabled",
|
|
4072
|
-
"description": "The enabled state of the component.",
|
|
4073
|
-
"value": { "type": "boolean", "default": "true" }
|
|
4074
|
-
},
|
|
4075
|
-
{
|
|
4076
|
-
"name": "handle",
|
|
4077
|
-
"description": "The reference to the `<pc-entity>` used as the scrollbar handle.",
|
|
4078
|
-
"value": { "type": "string" }
|
|
4079
|
-
},
|
|
4080
|
-
{
|
|
4081
|
-
"name": "handle-size",
|
|
4082
|
-
"description": "The size of the handle relative to the size of the track.",
|
|
4083
|
-
"value": { "type": "number", "default": "0.5" }
|
|
4084
|
-
},
|
|
4085
|
-
{
|
|
4086
|
-
"name": "orientation",
|
|
4087
|
-
"description": "The orientation of the scrollbar.",
|
|
4088
|
-
"value": {
|
|
4089
|
-
"type": "'horizontal' | 'vertical'",
|
|
4090
|
-
"default": "horizontal"
|
|
4091
|
-
}
|
|
4092
|
-
},
|
|
4093
|
-
{
|
|
4094
|
-
"name": "value",
|
|
4095
|
-
"description": "The current position value of the scrollbar.",
|
|
4096
|
-
"value": { "type": "number", "default": "0" }
|
|
4097
|
-
}
|
|
4098
|
-
],
|
|
4099
|
-
"events": [
|
|
4100
|
-
{
|
|
4101
|
-
"name": "ready",
|
|
4102
|
-
"type": "CustomEvent",
|
|
4103
|
-
"description": "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."
|
|
4104
|
-
}
|
|
4105
|
-
],
|
|
4106
|
-
"js": {
|
|
4107
|
-
"properties": [
|
|
4108
|
-
{
|
|
4109
|
-
"name": "closestApp",
|
|
4110
|
-
"description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
|
|
4111
|
-
"type": "AppElement | null"
|
|
4112
|
-
},
|
|
4113
|
-
{
|
|
4114
|
-
"name": "closestEntity",
|
|
4115
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
|
|
4116
|
-
"type": "EntityBaseElement | null"
|
|
4117
|
-
},
|
|
4118
|
-
{
|
|
4119
|
-
"name": "component",
|
|
4120
|
-
"description": "Gets the underlying PlayCanvas scrollbar component.",
|
|
4121
|
-
"type": "Component | null"
|
|
4122
|
-
},
|
|
4123
|
-
{
|
|
4124
|
-
"name": "enabled",
|
|
4125
|
-
"description": "Gets the enabled state of the component."
|
|
4126
|
-
},
|
|
4127
|
-
{
|
|
4128
|
-
"name": "handle",
|
|
4129
|
-
"description": "Gets the reference to the `<pc-entity>` used as the scrollbar handle."
|
|
4130
|
-
},
|
|
4131
|
-
{
|
|
4132
|
-
"name": "handleSize",
|
|
4133
|
-
"description": "Gets the size of the handle relative to the size of the track."
|
|
4134
|
-
},
|
|
4135
|
-
{
|
|
4136
|
-
"name": "orientation",
|
|
4137
|
-
"description": "Gets the orientation of the scrollbar."
|
|
4138
|
-
},
|
|
4139
|
-
{
|
|
4140
|
-
"name": "value",
|
|
4141
|
-
"description": "Gets the current position value of the scrollbar."
|
|
4142
|
-
}
|
|
4143
|
-
],
|
|
4144
|
-
"events": [
|
|
4145
|
-
{
|
|
4146
|
-
"name": "ready",
|
|
4147
|
-
"type": "CustomEvent",
|
|
4148
|
-
"description": "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."
|
|
4149
|
-
}
|
|
4150
|
-
]
|
|
4151
|
-
}
|
|
4152
|
-
},
|
|
4153
|
-
{
|
|
4154
|
-
"name": "pc-scrollview",
|
|
4155
|
-
"description": "The ScrollViewComponentElement interface provides properties and methods for manipulating\n[`<pc-scrollview>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-scrollview/) elements.\nThe ScrollViewComponentElement 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.",
|
|
4349
|
+
"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.",
|
|
4156
4351
|
"doc-url": "",
|
|
4157
4352
|
"attributes": [
|
|
4158
4353
|
{
|
|
@@ -4255,7 +4450,7 @@
|
|
|
4255
4450
|
},
|
|
4256
4451
|
{
|
|
4257
4452
|
"name": "closestEntity",
|
|
4258
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
4453
|
+
"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.",
|
|
4259
4454
|
"type": "EntityBaseElement | null"
|
|
4260
4455
|
},
|
|
4261
4456
|
{
|
|
@@ -4323,8 +4518,96 @@
|
|
|
4323
4518
|
}
|
|
4324
4519
|
},
|
|
4325
4520
|
{
|
|
4326
|
-
"name": "pc-
|
|
4327
|
-
"description": "The
|
|
4521
|
+
"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": "",
|
|
4524
|
+
"attributes": [
|
|
4525
|
+
{
|
|
4526
|
+
"name": "enabled",
|
|
4527
|
+
"description": "The enabled state of the component.",
|
|
4528
|
+
"value": { "type": "boolean", "default": "true" }
|
|
4529
|
+
},
|
|
4530
|
+
{
|
|
4531
|
+
"name": "handle",
|
|
4532
|
+
"description": "The reference to the `<pc-entity>` used as the scrollbar handle.",
|
|
4533
|
+
"value": { "type": "string" }
|
|
4534
|
+
},
|
|
4535
|
+
{
|
|
4536
|
+
"name": "handle-size",
|
|
4537
|
+
"description": "The size of the handle relative to the size of the track.",
|
|
4538
|
+
"value": { "type": "number", "default": "0.5" }
|
|
4539
|
+
},
|
|
4540
|
+
{
|
|
4541
|
+
"name": "orientation",
|
|
4542
|
+
"description": "The orientation of the scrollbar.",
|
|
4543
|
+
"value": {
|
|
4544
|
+
"type": "'horizontal' | 'vertical'",
|
|
4545
|
+
"default": "horizontal"
|
|
4546
|
+
}
|
|
4547
|
+
},
|
|
4548
|
+
{
|
|
4549
|
+
"name": "value",
|
|
4550
|
+
"description": "The current position value of the scrollbar.",
|
|
4551
|
+
"value": { "type": "number", "default": "0" }
|
|
4552
|
+
}
|
|
4553
|
+
],
|
|
4554
|
+
"events": [
|
|
4555
|
+
{
|
|
4556
|
+
"name": "ready",
|
|
4557
|
+
"type": "CustomEvent",
|
|
4558
|
+
"description": "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."
|
|
4559
|
+
}
|
|
4560
|
+
],
|
|
4561
|
+
"js": {
|
|
4562
|
+
"properties": [
|
|
4563
|
+
{
|
|
4564
|
+
"name": "closestApp",
|
|
4565
|
+
"description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
|
|
4566
|
+
"type": "AppElement | null"
|
|
4567
|
+
},
|
|
4568
|
+
{
|
|
4569
|
+
"name": "closestEntity",
|
|
4570
|
+
"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.",
|
|
4571
|
+
"type": "EntityBaseElement | null"
|
|
4572
|
+
},
|
|
4573
|
+
{
|
|
4574
|
+
"name": "component",
|
|
4575
|
+
"description": "Gets the underlying PlayCanvas scrollbar component.",
|
|
4576
|
+
"type": "Component | null"
|
|
4577
|
+
},
|
|
4578
|
+
{
|
|
4579
|
+
"name": "enabled",
|
|
4580
|
+
"description": "Gets the enabled state of the component."
|
|
4581
|
+
},
|
|
4582
|
+
{
|
|
4583
|
+
"name": "handle",
|
|
4584
|
+
"description": "Gets the reference to the `<pc-entity>` used as the scrollbar handle."
|
|
4585
|
+
},
|
|
4586
|
+
{
|
|
4587
|
+
"name": "handleSize",
|
|
4588
|
+
"description": "Gets the size of the handle relative to the size of the track."
|
|
4589
|
+
},
|
|
4590
|
+
{
|
|
4591
|
+
"name": "orientation",
|
|
4592
|
+
"description": "Gets the orientation of the scrollbar."
|
|
4593
|
+
},
|
|
4594
|
+
{
|
|
4595
|
+
"name": "value",
|
|
4596
|
+
"description": "Gets the current position value of the scrollbar."
|
|
4597
|
+
}
|
|
4598
|
+
],
|
|
4599
|
+
"events": [
|
|
4600
|
+
{
|
|
4601
|
+
"name": "ready",
|
|
4602
|
+
"type": "CustomEvent",
|
|
4603
|
+
"description": "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."
|
|
4604
|
+
}
|
|
4605
|
+
]
|
|
4606
|
+
}
|
|
4607
|
+
},
|
|
4608
|
+
{
|
|
4609
|
+
"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.",
|
|
4328
4611
|
"doc-url": "",
|
|
4329
4612
|
"attributes": [
|
|
4330
4613
|
{
|
|
@@ -4387,7 +4670,7 @@
|
|
|
4387
4670
|
},
|
|
4388
4671
|
{
|
|
4389
4672
|
"name": "closestEntity",
|
|
4390
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
4673
|
+
"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.",
|
|
4391
4674
|
"type": "EntityBaseElement | null"
|
|
4392
4675
|
},
|
|
4393
4676
|
{
|
|
@@ -4439,8 +4722,8 @@
|
|
|
4439
4722
|
}
|
|
4440
4723
|
},
|
|
4441
4724
|
{
|
|
4442
|
-
"name": "pc-sound",
|
|
4443
|
-
"description": "The SoundSlotElement interface provides properties and methods for manipulating\n`<pc-sound>` 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.",
|
|
4725
|
+
"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.",
|
|
4444
4727
|
"doc-url": "",
|
|
4445
4728
|
"attributes": [
|
|
4446
4729
|
{
|
|
@@ -4513,7 +4796,7 @@
|
|
|
4513
4796
|
},
|
|
4514
4797
|
{
|
|
4515
4798
|
"name": "closestEntity",
|
|
4516
|
-
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or
|
|
4799
|
+
"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.",
|
|
4517
4800
|
"type": "EntityBaseElement | null"
|
|
4518
4801
|
},
|
|
4519
4802
|
{
|