@playcanvas/web-components 0.10.1 → 0.11.1
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/README.md +1 -1
- package/dist/app.d.ts +102 -51
- package/dist/asset.d.ts +8 -7
- package/dist/async-element.d.ts +21 -5
- package/dist/components/button-component.d.ts +3 -7
- package/dist/components/camera-component.d.ts +16 -20
- package/dist/components/collision-component.d.ts +3 -7
- package/dist/components/component.d.ts +22 -4
- package/dist/components/element-component.d.ts +4 -8
- package/dist/components/gsplat-component.d.ts +2 -7
- package/dist/components/layoutchild-component.d.ts +2 -7
- package/dist/components/layoutgroup-component.d.ts +3 -7
- package/dist/components/light-component.d.ts +3 -7
- package/dist/components/listener-component.d.ts +1 -6
- package/dist/components/particlesystem-component.d.ts +2 -7
- package/dist/components/render-component.d.ts +2 -7
- package/dist/components/rigidbody-component.d.ts +3 -7
- package/dist/components/screen-component.d.ts +28 -11
- package/dist/components/script-component.d.ts +8 -20
- package/dist/components/script.d.ts +2 -22
- package/dist/components/scrollbar-component.d.ts +2 -7
- package/dist/components/scrollview-component.d.ts +9 -11
- package/dist/components/sound-component.d.ts +2 -7
- package/dist/components/sound-slot.d.ts +8 -6
- package/dist/custom-elements.json +5191 -10695
- package/dist/entity.d.ts +16 -9
- package/dist/index.d.ts +37 -0
- package/dist/material.d.ts +12 -12
- package/dist/model.d.ts +21 -5
- package/dist/module.d.ts +0 -6
- package/dist/parse.d.ts +6 -3
- package/dist/pwc.cjs +799 -287
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +799 -287
- 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 +800 -288
- package/dist/pwc.mjs.map +1 -1
- package/dist/scene.d.ts +4 -7
- package/dist/sky.d.ts +25 -16
- package/dist/vscode.html-custom-data.json +65 -45
- package/dist/web-types.json +585 -557
- package/package.json +8 -7
- package/src/app.ts +326 -144
- package/src/asset.ts +34 -28
- package/src/async-element.ts +34 -8
- package/src/components/button-component.ts +5 -9
- package/src/components/camera-component.ts +55 -36
- package/src/components/collision-component.ts +26 -15
- package/src/components/component.ts +58 -8
- package/src/components/element-component.ts +26 -30
- package/src/components/gsplat-component.ts +4 -9
- package/src/components/layoutchild-component.ts +4 -9
- package/src/components/layoutgroup-component.ts +14 -9
- package/src/components/light-component.ts +42 -12
- package/src/components/listener-component.ts +1 -7
- package/src/components/particlesystem-component.ts +7 -15
- package/src/components/render-component.ts +5 -10
- package/src/components/rigidbody-component.ts +23 -16
- package/src/components/screen-component.ts +46 -20
- package/src/components/script-component.ts +108 -46
- package/src/components/script.ts +38 -33
- package/src/components/scrollbar-component.ts +6 -16
- package/src/components/scrollview-component.ts +22 -15
- package/src/components/sound-component.ts +10 -15
- package/src/components/sound-slot.ts +30 -20
- package/src/entity.ts +75 -34
- package/src/index.ts +45 -1
- package/src/loading-bar.ts +8 -8
- package/src/material.ts +63 -37
- package/src/model.ts +69 -14
- package/src/module.ts +8 -7
- package/src/parse.ts +67 -20
- package/src/scene.ts +12 -9
- package/src/sky.ts +76 -34
package/dist/scene.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Scene } from 'playcanvas';
|
|
2
|
+
import { Color, Vec3 } from 'playcanvas';
|
|
2
3
|
import { AsyncElement } from './async-element';
|
|
3
4
|
/**
|
|
4
5
|
* The SceneElement interface provides properties and methods for manipulating
|
|
@@ -39,7 +40,8 @@ declare class SceneElement extends AsyncElement {
|
|
|
39
40
|
*/
|
|
40
41
|
get scene(): Scene | null;
|
|
41
42
|
connectedCallback(): Promise<void>;
|
|
42
|
-
|
|
43
|
+
disconnectedCallback(): void;
|
|
44
|
+
private _updateSceneSettings;
|
|
43
45
|
/**
|
|
44
46
|
* Applies gravity to the rigid body system. Resolved through `closestApp` rather than
|
|
45
47
|
* `parentElement` so that a `<pc-scene>` nested inside a wrapper element behaves the same as
|
|
@@ -112,9 +114,4 @@ declare class SceneElement extends AsyncElement {
|
|
|
112
114
|
static get observedAttributes(): string[];
|
|
113
115
|
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
114
116
|
}
|
|
115
|
-
declare global {
|
|
116
|
-
interface HTMLElementTagNameMap {
|
|
117
|
-
'pc-scene': SceneElement;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
117
|
export { SceneElement };
|
package/dist/sky.d.ts
CHANGED
|
@@ -10,14 +10,27 @@ declare class SkyElement extends AsyncElement {
|
|
|
10
10
|
private _center;
|
|
11
11
|
private _intensity;
|
|
12
12
|
private _rotation;
|
|
13
|
-
private
|
|
13
|
+
private _mipLevel;
|
|
14
14
|
private _lighting;
|
|
15
15
|
private _scale;
|
|
16
16
|
private _type;
|
|
17
17
|
private _scene;
|
|
18
18
|
private _appElement;
|
|
19
|
+
/**
|
|
20
|
+
* Incremented on every new load and on disconnect, and captured by a load when it starts. A
|
|
21
|
+
* load that resumes from an await or a load callback abandons itself if the value has moved
|
|
22
|
+
* on, so a superseded load cannot generate a skybox for a scene it no longer configures.
|
|
23
|
+
*/
|
|
24
|
+
private _loadGeneration;
|
|
25
|
+
/**
|
|
26
|
+
* The pending asset-load subscription of the current load, if it is waiting for its asset.
|
|
27
|
+
* Held so that whatever supersedes the load can detach the handler from the asset, rather
|
|
28
|
+
* than leave it registered until the asset loads (or forever, if it never does).
|
|
29
|
+
*/
|
|
30
|
+
private _loadHandle;
|
|
19
31
|
connectedCallback(): void;
|
|
20
32
|
disconnectedCallback(): void;
|
|
33
|
+
private _detachLoadHandler;
|
|
21
34
|
private _generateSkybox;
|
|
22
35
|
private _loadSkybox;
|
|
23
36
|
private _unloadSkybox;
|
|
@@ -51,16 +64,6 @@ declare class SkyElement extends AsyncElement {
|
|
|
51
64
|
* @returns The intensity.
|
|
52
65
|
*/
|
|
53
66
|
get intensity(): number;
|
|
54
|
-
/**
|
|
55
|
-
* Sets the mip level of the skybox.
|
|
56
|
-
* @param value - The mip level.
|
|
57
|
-
*/
|
|
58
|
-
set level(value: number);
|
|
59
|
-
/**
|
|
60
|
-
* Gets the mip level of the skybox.
|
|
61
|
-
* @returns The mip level.
|
|
62
|
-
*/
|
|
63
|
-
get level(): number;
|
|
64
67
|
/**
|
|
65
68
|
* Sets whether the skybox is used as a light source.
|
|
66
69
|
* @param value - Whether to use lighting.
|
|
@@ -71,6 +74,17 @@ declare class SkyElement extends AsyncElement {
|
|
|
71
74
|
* @returns Whether to use lighting.
|
|
72
75
|
*/
|
|
73
76
|
get lighting(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Sets the mip level of the skybox, where 0 is the sharpest. Raising it selects a blurrier mip,
|
|
79
|
+
* which is how a skybox is softened without blurring the texture itself.
|
|
80
|
+
* @param value - The mip level.
|
|
81
|
+
*/
|
|
82
|
+
set mipLevel(value: number);
|
|
83
|
+
/**
|
|
84
|
+
* Gets the mip level of the skybox.
|
|
85
|
+
* @returns The mip level.
|
|
86
|
+
*/
|
|
87
|
+
get mipLevel(): number;
|
|
74
88
|
/**
|
|
75
89
|
* Sets the Euler rotation of the skybox.
|
|
76
90
|
* @param value - The rotation.
|
|
@@ -104,9 +118,4 @@ declare class SkyElement extends AsyncElement {
|
|
|
104
118
|
static get observedAttributes(): string[];
|
|
105
119
|
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
106
120
|
}
|
|
107
|
-
declare global {
|
|
108
|
-
interface HTMLElementTagNameMap {
|
|
109
|
-
'pc-sky': SkyElement;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
121
|
export { SkyElement };
|
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
"tags": [
|
|
5
5
|
{
|
|
6
6
|
"name": "pc-app",
|
|
7
|
-
"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\n---\n\n\n### **Events:**\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
|
|
7
|
+
"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\n---\n\n\n### **Events:**\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>` element whose backing entity is `entity`, or `null` if the\nentity was not created by an element of this application - for example, a node inside a\nmodel's instantiated hierarchy, or an entity created through 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.",
|
|
8
8
|
"attributes": [
|
|
9
|
-
{
|
|
9
|
+
{
|
|
10
|
+
"name": "alpha",
|
|
11
|
+
"description": "Whether the frame buffer has an alpha channel.",
|
|
12
|
+
"values": []
|
|
13
|
+
},
|
|
10
14
|
{
|
|
11
15
|
"name": "antialias",
|
|
12
|
-
"description": "
|
|
16
|
+
"description": "Whether the frame buffer is anti-aliased.",
|
|
13
17
|
"values": []
|
|
14
18
|
},
|
|
15
19
|
{
|
|
@@ -21,10 +25,9 @@
|
|
|
21
25
|
{ "name": "null" }
|
|
22
26
|
]
|
|
23
27
|
},
|
|
24
|
-
{ "name": "depth", "description": "The depth flag.", "values": [] },
|
|
25
28
|
{
|
|
26
|
-
"name": "
|
|
27
|
-
"description": "
|
|
29
|
+
"name": "depth-buffer",
|
|
30
|
+
"description": "Whether the frame buffer has a depth buffer.",
|
|
28
31
|
"values": []
|
|
29
32
|
},
|
|
30
33
|
{
|
|
@@ -32,13 +35,22 @@
|
|
|
32
35
|
"description": "Whether the application shows its built-in loading bar while it boots and preloads its assets.",
|
|
33
36
|
"values": []
|
|
34
37
|
},
|
|
35
|
-
{
|
|
38
|
+
{
|
|
39
|
+
"name": "max-pixel-ratio",
|
|
40
|
+
"description": "The cap on the pixel ratio the application renders at.",
|
|
41
|
+
"values": []
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "stencil-buffer",
|
|
45
|
+
"description": "Whether the frame buffer has a stencil buffer.",
|
|
46
|
+
"values": []
|
|
47
|
+
}
|
|
36
48
|
],
|
|
37
49
|
"references": []
|
|
38
50
|
},
|
|
39
51
|
{
|
|
40
52
|
"name": "pc-asset",
|
|
41
|
-
"description": "The AssetElement interface provides properties and methods for manipulating\n[`<pc-asset>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-asset/) elements.\nThe AssetElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe element becomes ready once the containing application has started and the asset is in the\nstate declared by the markup: loaded for preloaded assets (even if loading failed — check the\nasset's `resource`), or registered and awaiting a load for `lazy` assets. Elements inserted\nwhile the application is running are created and registered on insertion, and begin loading\nimmediately unless `lazy`. A `pc-asset` must be a direct child of `pc-app` — elements placed\nelsewhere, or with an unsupported asset type, never become ready.\n\nApart from `lazy`, these attributes are read once when the asset is created, so changing them\nlater has no effect.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the asset fails to load, with the engine's error in `message`. Does not bubble. The element still becomes ready — readiness means the load settled, not that it succeeded.\n- **load** - Fired each time the asset finishes loading, including a `lazy` asset loaded later and any subsequent reloads. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor to observe every asset.\n- **ready** - Fired
|
|
53
|
+
"description": "The AssetElement interface provides properties and methods for manipulating\n[`<pc-asset>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-asset/) elements.\nThe AssetElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe element becomes ready once the containing application has started and the asset is in the\nstate declared by the markup: loaded for preloaded assets (even if loading failed — check the\nasset's `resource`), or registered and awaiting a load for `lazy` assets. Elements inserted\nwhile the application is running are created and registered on insertion, and begin loading\nimmediately unless `lazy`. A `pc-asset` must be a direct child of `pc-app` — elements placed\nelsewhere, or with an unsupported asset type, never become ready.\n\nApart from `lazy`, these attributes are read once when the asset is created, so changing them\nlater has no effect.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the asset fails to load, with the engine's error in `message`. Does not bubble. The element still becomes ready — readiness means the load settled, not that it succeeded.\n- **load** - Fired each time the asset finishes loading, including a `lazy` asset loaded later and any subsequent reloads. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor to observe every asset.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **get(id: _string_): __** - Returns the Asset created by the `<pc-asset>` element with the given `id`, or\n`undefined` if there is no such element or its asset has not been created yet.\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
|
|
42
54
|
"attributes": [
|
|
43
55
|
{
|
|
44
56
|
"name": "atlas",
|
|
@@ -94,7 +106,7 @@
|
|
|
94
106
|
},
|
|
95
107
|
{
|
|
96
108
|
"name": "pc-entity",
|
|
97
|
-
"description": "The EntityElement interface provides properties and methods for manipulating\n[`<pc-entity>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-entity/) elements.\nThe EntityElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe pointer events below are dispatched by the containing `<pc-app>` element when the pointer\nintersects this entity's geometry. They are only generated while the entity has a listener for\nthem, registered either with addEventListener or with the matching inline `onpointer*`\nattribute.\n\n---\n\n\n### **Events:**\n - **pointerdown** - Fired when a pointer button is pressed over the entity.\n- **pointerenter** - Fired when the pointer moves onto the entity.\n- **pointerleave** - Fired when the pointer moves off the entity.\n- **pointermove** - Fired when the pointer moves over the entity.\n- **pointerup** - Fired when a pointer button is released over the entity.\n- **ready** - Fired
|
|
109
|
+
"description": "The EntityElement interface provides properties and methods for manipulating\n[`<pc-entity>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-entity/) elements.\nThe EntityElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe pointer events below are dispatched by the containing `<pc-app>` element when the pointer\nintersects this entity's geometry. They are only generated while the entity has a listener for\nthem, registered either with addEventListener or with the matching inline `onpointer*`\nattribute.\n\n---\n\n\n### **Events:**\n - **pointerdown** - Fired when a pointer button is pressed over the entity.\n- **pointerenter** - Fired when the pointer moves onto the entity.\n- **pointerleave** - Fired when the pointer moves off the entity.\n- **pointermove** - Fired when the pointer moves over the entity.\n- **pointerup** - Fired when a pointer button is released over the entity.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
|
|
98
110
|
"attributes": [
|
|
99
111
|
{
|
|
100
112
|
"name": "enabled",
|
|
@@ -156,7 +168,7 @@
|
|
|
156
168
|
},
|
|
157
169
|
{
|
|
158
170
|
"name": "pc-material",
|
|
159
|
-
"description": "The MaterialElement interface provides properties and methods for manipulating\n[`<pc-material>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-material/) elements.\nThe MaterialElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nA `pc-material` must be a direct child of `pc-app` — elements placed elsewhere log a warning\nand never create a material. Elements inserted while the application is already running are\ncreated on insertion.\n\nThe element is metal/rough by default: unlike a bare `StandardMaterial` it enables the metalness\nworkflow, which is what the `metalness-*` attributes assume and what glTF means by PBR. It also\ndefaults `metalness` to 0 rather than the engine's 1, because those two defaults have to be\nchosen together - the engine's 1 is unreachable under its own `useMetalness` of false, and with\nthe workflow on it would make every material fully metallic, so `<pc-material diffuse=\"crimson\">`\nwould render as dark tinted reflections of an environment that may not exist rather than as a\ncrimson surface. `metalness=\"1\"` remains one attribute away.\n\nThe `roughness` and `roughness-map` attributes are aliases for `gloss` and `gloss-map` that\nadditionally invert the gloss channel; do not mix the two families on one element.\n\nThe two aliases are documented here rather than on an accessor, because they resolve to the\n`gloss` properties and would otherwise inherit gloss's description - which reads inverted.\n\n---\n\n\n### **Methods:**\n - **
|
|
171
|
+
"description": "The MaterialElement interface provides properties and methods for manipulating\n[`<pc-material>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-material/) elements.\nThe MaterialElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nA `pc-material` must be a direct child of `pc-app` — elements placed elsewhere log a warning\nand never create a material. Elements inserted while the application is already running are\ncreated on insertion.\n\nThe element is metal/rough by default: unlike a bare `StandardMaterial` it enables the metalness\nworkflow, which is what the `metalness-*` attributes assume and what glTF means by PBR. It also\ndefaults `metalness` to 0 rather than the engine's 1, because those two defaults have to be\nchosen together - the engine's 1 is unreachable under its own `useMetalness` of false, and with\nthe workflow on it would make every material fully metallic, so `<pc-material diffuse=\"crimson\">`\nwould render as dark tinted reflections of an environment that may not exist rather than as a\ncrimson surface. `metalness=\"1\"` remains one attribute away.\n\nThe `roughness` and `roughness-map` attributes are aliases for `gloss` and `gloss-map` that\nadditionally invert the gloss channel; do not mix the two families on one element.\n\nThe two aliases are documented here rather than on an accessor, because they resolve to the\n`gloss` properties and would otherwise inherit gloss's description - which reads inverted.\n\n---\n\n\n### **Methods:**\n - **get(id: _string_): __** - Returns the StandardMaterial created by the `<pc-material>` element with the given\n`id`, or `undefined` if there is no such element or its material has not been created yet.",
|
|
160
172
|
"attributes": [
|
|
161
173
|
{
|
|
162
174
|
"name": "alpha-test",
|
|
@@ -631,7 +643,7 @@
|
|
|
631
643
|
},
|
|
632
644
|
{
|
|
633
645
|
"name": "pc-model",
|
|
634
|
-
"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\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
646
|
+
"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\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.",
|
|
635
647
|
"attributes": [
|
|
636
648
|
{
|
|
637
649
|
"name": "asset",
|
|
@@ -670,7 +682,7 @@
|
|
|
670
682
|
},
|
|
671
683
|
{
|
|
672
684
|
"name": "pc-scene",
|
|
673
|
-
"description": "The SceneElement interface provides properties and methods for manipulating\n[`<pc-scene>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-scene/) elements.\nThe SceneElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
685
|
+
"description": "The SceneElement interface provides properties and methods for manipulating\n[`<pc-scene>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-scene/) elements.\nThe SceneElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
|
|
674
686
|
"attributes": [
|
|
675
687
|
{
|
|
676
688
|
"name": "fog",
|
|
@@ -712,7 +724,7 @@
|
|
|
712
724
|
},
|
|
713
725
|
{
|
|
714
726
|
"name": "pc-sky",
|
|
715
|
-
"description": "The SkyElement interface provides properties and methods for manipulating\n`<pc-sky>` elements. The SkyElement interface also inherits the properties and\nmethods of the HTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
727
|
+
"description": "The SkyElement interface provides properties and methods for manipulating\n`<pc-sky>` elements. The SkyElement interface also inherits the properties and\nmethods of the HTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
|
|
716
728
|
"attributes": [
|
|
717
729
|
{
|
|
718
730
|
"name": "asset",
|
|
@@ -730,13 +742,13 @@
|
|
|
730
742
|
"values": []
|
|
731
743
|
},
|
|
732
744
|
{
|
|
733
|
-
"name": "
|
|
734
|
-
"description": "
|
|
745
|
+
"name": "lighting",
|
|
746
|
+
"description": "Whether the skybox is used as a light source.",
|
|
735
747
|
"values": []
|
|
736
748
|
},
|
|
737
749
|
{
|
|
738
|
-
"name": "
|
|
739
|
-
"description": "
|
|
750
|
+
"name": "mip-level",
|
|
751
|
+
"description": "The mip level of the skybox.",
|
|
740
752
|
"values": []
|
|
741
753
|
},
|
|
742
754
|
{
|
|
@@ -764,7 +776,7 @@
|
|
|
764
776
|
},
|
|
765
777
|
{
|
|
766
778
|
"name": "pc-button",
|
|
767
|
-
"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
|
|
779
|
+
"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.",
|
|
768
780
|
"attributes": [
|
|
769
781
|
{
|
|
770
782
|
"name": "active",
|
|
@@ -846,7 +858,7 @@
|
|
|
846
858
|
},
|
|
847
859
|
{
|
|
848
860
|
"name": "pc-camera",
|
|
849
|
-
"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
|
|
861
|
+
"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.",
|
|
850
862
|
"attributes": [
|
|
851
863
|
{
|
|
852
864
|
"name": "clear-color",
|
|
@@ -918,16 +930,16 @@
|
|
|
918
930
|
"description": "The orthographic height of the camera.",
|
|
919
931
|
"values": []
|
|
920
932
|
},
|
|
921
|
-
{
|
|
922
|
-
"name": "orthographic",
|
|
923
|
-
"description": "The orthographic projection of the camera.",
|
|
924
|
-
"values": []
|
|
925
|
-
},
|
|
926
933
|
{
|
|
927
934
|
"name": "priority",
|
|
928
935
|
"description": "The priority of the camera.",
|
|
929
936
|
"values": []
|
|
930
937
|
},
|
|
938
|
+
{
|
|
939
|
+
"name": "projection",
|
|
940
|
+
"description": "The projection of the camera.",
|
|
941
|
+
"values": [{ "name": "perspective" }, { "name": "orthographic" }]
|
|
942
|
+
},
|
|
931
943
|
{
|
|
932
944
|
"name": "rect",
|
|
933
945
|
"description": "The rect of the camera. Accepts 4 space-separated numbers.",
|
|
@@ -956,7 +968,7 @@
|
|
|
956
968
|
},
|
|
957
969
|
{
|
|
958
970
|
"name": "pc-collision",
|
|
959
|
-
"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\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
971
|
+
"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\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.",
|
|
960
972
|
"attributes": [
|
|
961
973
|
{
|
|
962
974
|
"name": "angular-offset",
|
|
@@ -999,7 +1011,7 @@
|
|
|
999
1011
|
},
|
|
1000
1012
|
{
|
|
1001
1013
|
"name": "pc-element",
|
|
1002
|
-
"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
|
|
1014
|
+
"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.",
|
|
1003
1015
|
"attributes": [
|
|
1004
1016
|
{
|
|
1005
1017
|
"name": "anchor",
|
|
@@ -1145,7 +1157,7 @@
|
|
|
1145
1157
|
},
|
|
1146
1158
|
{
|
|
1147
1159
|
"name": "pc-gsplat",
|
|
1148
|
-
"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
|
|
1160
|
+
"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.",
|
|
1149
1161
|
"attributes": [
|
|
1150
1162
|
{
|
|
1151
1163
|
"name": "asset",
|
|
@@ -1187,7 +1199,7 @@
|
|
|
1187
1199
|
},
|
|
1188
1200
|
{
|
|
1189
1201
|
"name": "pc-layoutchild",
|
|
1190
|
-
"description": "The LayoutChildComponentElement interface provides properties and methods for manipulating\n[`<pc-layoutchild>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-layoutchild/) elements.\nThe LayoutChildComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
1202
|
+
"description": "The LayoutChildComponentElement interface provides properties and methods for manipulating\n[`<pc-layoutchild>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-layoutchild/) elements.\nThe LayoutChildComponentElement 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.",
|
|
1191
1203
|
"attributes": [
|
|
1192
1204
|
{
|
|
1193
1205
|
"name": "enabled",
|
|
@@ -1234,7 +1246,7 @@
|
|
|
1234
1246
|
},
|
|
1235
1247
|
{
|
|
1236
1248
|
"name": "pc-layoutgroup",
|
|
1237
|
-
"description": "The LayoutGroupComponentElement interface provides properties and methods for manipulating\n[`<pc-layoutgroup>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-layoutgroup/) elements.\nThe LayoutGroupComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
1249
|
+
"description": "The LayoutGroupComponentElement interface provides properties and methods for manipulating\n[`<pc-layoutgroup>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-layoutgroup/) elements.\nThe LayoutGroupComponentElement 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.",
|
|
1238
1250
|
"attributes": [
|
|
1239
1251
|
{
|
|
1240
1252
|
"name": "alignment",
|
|
@@ -1301,7 +1313,7 @@
|
|
|
1301
1313
|
},
|
|
1302
1314
|
{
|
|
1303
1315
|
"name": "pc-light",
|
|
1304
|
-
"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
|
|
1316
|
+
"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.",
|
|
1305
1317
|
"attributes": [
|
|
1306
1318
|
{
|
|
1307
1319
|
"name": "cast-shadows",
|
|
@@ -1422,7 +1434,7 @@
|
|
|
1422
1434
|
},
|
|
1423
1435
|
{
|
|
1424
1436
|
"name": "pc-listener",
|
|
1425
|
-
"description": "The ListenerComponentElement interface provides properties and methods for manipulating\n[`<pc-listener>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-listener/) elements.\nThe ListenerComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
1437
|
+
"description": "The ListenerComponentElement interface provides properties and methods for manipulating\n[`<pc-listener>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-listener/) elements.\nThe ListenerComponentElement 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.",
|
|
1426
1438
|
"attributes": [
|
|
1427
1439
|
{
|
|
1428
1440
|
"name": "enabled",
|
|
@@ -1434,7 +1446,7 @@
|
|
|
1434
1446
|
},
|
|
1435
1447
|
{
|
|
1436
1448
|
"name": "pc-particles",
|
|
1437
|
-
"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
|
|
1449
|
+
"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",
|
|
1438
1450
|
"attributes": [
|
|
1439
1451
|
{
|
|
1440
1452
|
"name": "asset",
|
|
@@ -1451,7 +1463,7 @@
|
|
|
1451
1463
|
},
|
|
1452
1464
|
{
|
|
1453
1465
|
"name": "pc-render",
|
|
1454
|
-
"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
|
|
1466
|
+
"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.",
|
|
1455
1467
|
"attributes": [
|
|
1456
1468
|
{
|
|
1457
1469
|
"name": "cast-shadows",
|
|
@@ -1490,7 +1502,7 @@
|
|
|
1490
1502
|
},
|
|
1491
1503
|
{
|
|
1492
1504
|
"name": "pc-rigidbody",
|
|
1493
|
-
"description": "The RigidBodyComponentElement interface provides properties and methods for manipulating\n[`<pc-rigidbody>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-rigidbody/) elements.\nThe RigidBodyComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
1505
|
+
"description": "The RigidBodyComponentElement interface provides properties and methods for manipulating\n[`<pc-rigidbody>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-rigidbody/) elements.\nThe RigidBodyComponentElement 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.",
|
|
1494
1506
|
"attributes": [
|
|
1495
1507
|
{ "name": "angular-damping", "values": [] },
|
|
1496
1508
|
{
|
|
@@ -1526,9 +1538,8 @@
|
|
|
1526
1538
|
},
|
|
1527
1539
|
{
|
|
1528
1540
|
"name": "pc-screen",
|
|
1529
|
-
"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
|
|
1541
|
+
"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.",
|
|
1530
1542
|
"attributes": [
|
|
1531
|
-
{ "name": "blend", "values": [] },
|
|
1532
1543
|
{
|
|
1533
1544
|
"name": "enabled",
|
|
1534
1545
|
"description": "The enabled state of the component.",
|
|
@@ -1545,14 +1556,23 @@
|
|
|
1545
1556
|
"description": "Accepts 2 space-separated numbers.",
|
|
1546
1557
|
"values": []
|
|
1547
1558
|
},
|
|
1548
|
-
{
|
|
1559
|
+
{
|
|
1560
|
+
"name": "scale-blend",
|
|
1561
|
+
"description": "How the screen's resolutions are weighted against each other.",
|
|
1562
|
+
"values": []
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
"name": "scale-mode",
|
|
1566
|
+
"description": "How the screen scales its contents.",
|
|
1567
|
+
"values": [{ "name": "none" }, { "name": "blend" }]
|
|
1568
|
+
},
|
|
1549
1569
|
{ "name": "screen-space", "values": [] }
|
|
1550
1570
|
],
|
|
1551
1571
|
"references": []
|
|
1552
1572
|
},
|
|
1553
1573
|
{
|
|
1554
1574
|
"name": "pc-scripts",
|
|
1555
|
-
"description": "The ScriptComponentElement interface provides properties and methods for manipulating\n[`<pc-scripts>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-scripts/) elements.\nThe ScriptComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
1575
|
+
"description": "The ScriptComponentElement interface provides properties and methods for manipulating\n[`<pc-scripts>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-scripts/) elements.\nThe ScriptComponentElement 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.",
|
|
1556
1576
|
"attributes": [
|
|
1557
1577
|
{
|
|
1558
1578
|
"name": "enabled",
|
|
@@ -1564,7 +1584,7 @@
|
|
|
1564
1584
|
},
|
|
1565
1585
|
{
|
|
1566
1586
|
"name": "pc-script",
|
|
1567
|
-
"description": "The ScriptElement interface provides properties and methods for manipulating\n`<pc-script>` elements. The ScriptElement 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-scripts>` element.\n\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
1587
|
+
"description": "The ScriptElement interface provides properties and methods for manipulating\n`<pc-script>` elements. The ScriptElement 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-scripts>` 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.",
|
|
1568
1588
|
"attributes": [
|
|
1569
1589
|
{
|
|
1570
1590
|
"name": "attributes",
|
|
@@ -1586,7 +1606,7 @@
|
|
|
1586
1606
|
},
|
|
1587
1607
|
{
|
|
1588
1608
|
"name": "pc-scrollbar",
|
|
1589
|
-
"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\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
1609
|
+
"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\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.",
|
|
1590
1610
|
"attributes": [
|
|
1591
1611
|
{
|
|
1592
1612
|
"name": "enabled",
|
|
@@ -1618,7 +1638,7 @@
|
|
|
1618
1638
|
},
|
|
1619
1639
|
{
|
|
1620
1640
|
"name": "pc-scrollview",
|
|
1621
|
-
"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
|
|
1641
|
+
"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.",
|
|
1622
1642
|
"attributes": [
|
|
1623
1643
|
{
|
|
1624
1644
|
"name": "bounce-amount",
|
|
@@ -1638,7 +1658,7 @@
|
|
|
1638
1658
|
{ "name": "friction", "description": "The friction.", "values": [] },
|
|
1639
1659
|
{
|
|
1640
1660
|
"name": "horizontal",
|
|
1641
|
-
"description": "Whether horizontal
|
|
1661
|
+
"description": "Whether scrolling along the horizontal axis is enabled.",
|
|
1642
1662
|
"values": []
|
|
1643
1663
|
},
|
|
1644
1664
|
{
|
|
@@ -1672,7 +1692,7 @@
|
|
|
1672
1692
|
},
|
|
1673
1693
|
{
|
|
1674
1694
|
"name": "vertical",
|
|
1675
|
-
"description": "Whether vertical
|
|
1695
|
+
"description": "Whether scrolling along the vertical axis is enabled.",
|
|
1676
1696
|
"values": []
|
|
1677
1697
|
},
|
|
1678
1698
|
{
|
|
@@ -1695,7 +1715,7 @@
|
|
|
1695
1715
|
},
|
|
1696
1716
|
{
|
|
1697
1717
|
"name": "pc-sounds",
|
|
1698
|
-
"description": "The SoundComponentElement interface provides properties and methods for manipulating\n[`<pc-sounds>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-sounds/) elements.\nThe SoundComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired
|
|
1718
|
+
"description": "The SoundComponentElement interface provides properties and methods for manipulating\n[`<pc-sounds>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-sounds/) elements.\nThe SoundComponentElement 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.",
|
|
1699
1719
|
"attributes": [
|
|
1700
1720
|
{
|
|
1701
1721
|
"name": "distance-model",
|
|
@@ -1746,7 +1766,7 @@
|
|
|
1746
1766
|
},
|
|
1747
1767
|
{
|
|
1748
1768
|
"name": "pc-sound",
|
|
1749
|
-
"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
|
|
1769
|
+
"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.",
|
|
1750
1770
|
"attributes": [
|
|
1751
1771
|
{
|
|
1752
1772
|
"name": "asset",
|