@playcanvas/web-components 0.17.0 → 0.18.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/README.md +5 -3
- package/dist/app.d.cts +4 -0
- package/dist/app.d.ts +4 -0
- package/dist/asset.d.cts +13 -3
- package/dist/asset.d.ts +13 -3
- package/dist/components/anim-clip.d.cts +4 -0
- package/dist/components/anim-clip.d.ts +4 -0
- package/dist/components/anim-component.d.cts +5 -0
- package/dist/components/anim-component.d.ts +5 -0
- package/dist/components/audio-listener-component.d.cts +4 -0
- package/dist/components/audio-listener-component.d.ts +4 -0
- package/dist/components/button-component.d.cts +5 -0
- package/dist/components/button-component.d.ts +5 -0
- package/dist/components/camera-component.d.cts +35 -1
- package/dist/components/camera-component.d.ts +35 -1
- package/dist/components/collision-component.d.cts +4 -0
- package/dist/components/collision-component.d.ts +4 -0
- package/dist/components/element-component.d.cts +4 -0
- package/dist/components/element-component.d.ts +4 -0
- package/dist/components/gsplat-component.d.cts +4 -0
- package/dist/components/gsplat-component.d.ts +4 -0
- package/dist/components/joint-component.d.cts +12 -2
- package/dist/components/joint-component.d.ts +12 -2
- package/dist/components/layout-child-component.d.cts +4 -0
- package/dist/components/layout-child-component.d.ts +4 -0
- package/dist/components/layout-group-component.d.cts +4 -0
- package/dist/components/layout-group-component.d.ts +4 -0
- package/dist/components/light-component.d.cts +50 -1
- package/dist/components/light-component.d.ts +50 -1
- package/dist/components/particle-system-component.d.cts +4 -0
- package/dist/components/particle-system-component.d.ts +4 -0
- package/dist/components/render-component.d.cts +5 -0
- package/dist/components/render-component.d.ts +5 -0
- package/dist/components/rigid-body-component.d.cts +5 -0
- package/dist/components/rigid-body-component.d.ts +5 -0
- package/dist/components/screen-component.d.cts +4 -0
- package/dist/components/screen-component.d.ts +4 -0
- package/dist/components/script-component.d.cts +3 -0
- package/dist/components/script-component.d.ts +3 -0
- package/dist/components/script-instance.d.cts +4 -0
- package/dist/components/script-instance.d.ts +4 -0
- package/dist/components/scroll-view-component.d.cts +4 -0
- package/dist/components/scroll-view-component.d.ts +4 -0
- package/dist/components/scrollbar-component.d.cts +4 -0
- package/dist/components/scrollbar-component.d.ts +4 -0
- package/dist/components/sound-component.d.cts +4 -0
- package/dist/components/sound-component.d.ts +4 -0
- package/dist/components/sound-slot.d.cts +3 -0
- package/dist/components/sound-slot.d.ts +3 -0
- package/dist/custom-elements.json +268 -7
- package/dist/entity-base.d.cts +1 -1
- package/dist/entity-base.d.ts +1 -1
- package/dist/entity-owner.d.cts +2 -2
- package/dist/entity-owner.d.ts +2 -2
- package/dist/entity.d.cts +6 -1
- package/dist/entity.d.ts +6 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/material.d.cts +18 -7
- package/dist/material.d.ts +18 -7
- package/dist/model.d.cts +5 -0
- package/dist/model.d.ts +5 -0
- package/dist/node.d.cts +6 -1
- package/dist/node.d.ts +6 -1
- package/dist/pwc.cjs +284 -28
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +284 -28
- 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 +285 -29
- package/dist/pwc.mjs.map +1 -1
- package/dist/scene.d.cts +3 -0
- package/dist/scene.d.ts +3 -0
- package/dist/sky.d.cts +4 -0
- package/dist/sky.d.ts +4 -0
- package/dist/vscode.html-custom-data.json +237 -62
- package/dist/wasm.d.cts +4 -0
- package/dist/wasm.d.ts +4 -0
- package/dist/web-types.json +115 -69
- package/package.json +1 -1
- package/src/app.ts +4 -0
- package/src/asset.ts +13 -4
- package/src/components/anim-clip.ts +4 -0
- package/src/components/anim-component.ts +5 -0
- package/src/components/audio-listener-component.ts +4 -0
- package/src/components/button-component.ts +5 -0
- package/src/components/camera-component.ts +63 -6
- package/src/components/collision-component.ts +4 -0
- package/src/components/element-component.ts +4 -0
- package/src/components/gsplat-component.ts +4 -0
- package/src/components/joint-component.ts +12 -2
- package/src/components/layout-child-component.ts +4 -0
- package/src/components/layout-group-component.ts +4 -0
- package/src/components/light-component.ts +108 -17
- package/src/components/particle-system-component.ts +4 -0
- package/src/components/render-component.ts +5 -0
- package/src/components/rigid-body-component.ts +5 -0
- package/src/components/screen-component.ts +4 -0
- package/src/components/script-component.ts +3 -0
- package/src/components/script-instance.ts +4 -0
- package/src/components/scroll-view-component.ts +4 -0
- package/src/components/scrollbar-component.ts +4 -0
- package/src/components/sound-component.ts +4 -0
- package/src/components/sound-slot.ts +3 -0
- package/src/entity-base.ts +2 -2
- package/src/entity-owner.ts +2 -2
- package/src/entity.ts +6 -1
- package/src/index.ts +12 -1
- package/src/material.ts +19 -8
- package/src/model.ts +5 -0
- package/src/node.ts +6 -1
- package/src/scene.ts +3 -0
- package/src/sky.ts +4 -0
- package/src/wasm.ts +4 -0
package/dist/web-types.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@playcanvas/web-components",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.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
|
|
12
|
-
"doc-url": "",
|
|
11
|
+
"description": "The `<pc-app>` element creates a PlayCanvas application and the canvas it renders\ninto, and is the root of every scene. It holds the `<pc-asset>`, `<pc-material>`, `<pc-wasm>` and\n`<pc-scene>` elements, and the page's CSS sizes it, as it would a `<video>`.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the application cannot boot because no graphics device could be created (for example, a browser with WebGL disabled). `message` names the requested backends and `error` holds the underlying failure. The element never becomes ready and `app` stays `null` — listen for this event to show a fallback UI. Removing the element and re-inserting it retries the boot with its current attributes. Does not bubble.\n- **progress** - Fired while the application preloads its assets. `loaded` and `total` are asset counts, not bytes, and an asset that fails to load still counts as loaded. Fired at least once per boot, and the final event always has `loaded` equal to `total`. Does not bubble.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
12
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/",
|
|
13
13
|
"attributes": [
|
|
14
14
|
{
|
|
15
15
|
"name": "alpha",
|
|
@@ -139,8 +139,8 @@
|
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
"name": "pc-asset",
|
|
142
|
-
"description": "The
|
|
143
|
-
"doc-url": "",
|
|
142
|
+
"description": "The `<pc-asset>` element declares an asset for the application to load — a model,\ntexture, font, sound, script or JSON file — under an `id` that other elements reference. Must be\na direct child of `<pc-app>`.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the asset fails to load, with the engine's error in `message`. Does not bubble. The element still becomes ready — readiness means the load settled, not that it succeeded.\n- **load** - Fired each time the asset finishes loading, including a `lazy` asset loaded later and any subsequent reloads. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor to observe every asset.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
143
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-asset/",
|
|
144
144
|
"attributes": [
|
|
145
145
|
{
|
|
146
146
|
"name": "address-u",
|
|
@@ -337,8 +337,8 @@
|
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
339
|
"name": "pc-entity",
|
|
340
|
-
"description": "The
|
|
341
|
-
"doc-url": "",
|
|
340
|
+
"description": "The `<pc-entity>` element creates an entity: a named, transformable node of the\nscene hierarchy, and the host for component elements such as `<pc-camera>`, `<pc-light>` and\n`<pc-render>`. Place it in the `<pc-scene>`, or nest it under another `<pc-entity>`, a\n`<pc-model>` or a `<pc-node>` to parent it there.\n\n---\n\n\n### **Events:**\n - **pointerdown** - Fired when a pointer button is pressed over the entity.\n- **pointerenter** - Fired when the pointer moves onto the entity.\n- **pointerleave** - Fired when the pointer moves off the entity.\n- **pointermove** - Fired when the pointer moves over the entity.\n- **pointerup** - Fired when a pointer button is released over the entity.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
341
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-entity/",
|
|
342
342
|
"attributes": [
|
|
343
343
|
{
|
|
344
344
|
"name": "enabled",
|
|
@@ -500,8 +500,8 @@
|
|
|
500
500
|
},
|
|
501
501
|
{
|
|
502
502
|
"name": "pc-material",
|
|
503
|
-
"description": "The
|
|
504
|
-
"doc-url": "",
|
|
503
|
+
"description": "The `<pc-material>` element defines a physically based material, which\n`<pc-render>` elements apply by naming its `id`. It is metal/rough by default, with `metalness`\nstarting at 0. Must be a direct child of `<pc-app>`.\n\n---\n",
|
|
504
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-material/",
|
|
505
505
|
"attributes": [
|
|
506
506
|
{
|
|
507
507
|
"name": "alpha-test",
|
|
@@ -1293,8 +1293,8 @@
|
|
|
1293
1293
|
},
|
|
1294
1294
|
{
|
|
1295
1295
|
"name": "pc-model",
|
|
1296
|
-
"description": "The
|
|
1297
|
-
"doc-url": "",
|
|
1296
|
+
"description": "The `<pc-model>` element instantiates a 3D model from a container asset\n(typically a GLB) beneath an entity of its own, so the element's transform and tags place the\ninstance in the scene. Its `<pc-node>` children override what the asset authored. Place it in the\n`<pc-scene>`, or nest it under a `<pc-entity>`, another `<pc-model>` or a `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **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.",
|
|
1297
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-model/",
|
|
1298
1298
|
"attributes": [
|
|
1299
1299
|
{
|
|
1300
1300
|
"name": "asset",
|
|
@@ -1491,8 +1491,8 @@
|
|
|
1491
1491
|
},
|
|
1492
1492
|
{
|
|
1493
1493
|
"name": "pc-node",
|
|
1494
|
-
"description": "The
|
|
1495
|
-
"doc-url": "",
|
|
1494
|
+
"description": "The `<pc-node>` element binds to a node inside the hierarchy a `<pc-model>`\ninstantiated and declares overrides against it: a transform, an enabled state, tags, components\nto add, or content to attach. Its `name` is a lookup, never a rename. Must be a descendant of\n`<pc-model>`.\n\n---\n\n\n### **Events:**\n - **pointerdown** - Fired when a pointer button is pressed over the node.\n- **pointerenter** - Fired when the pointer moves onto the node.\n- **pointerleave** - Fired when the pointer moves off the node.\n- **pointermove** - Fired when the pointer moves over the node.\n- **pointerup** - Fired when a pointer button is released over the node.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
1495
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-node/",
|
|
1496
1496
|
"attributes": [
|
|
1497
1497
|
{
|
|
1498
1498
|
"name": "enabled",
|
|
@@ -1696,8 +1696,8 @@
|
|
|
1696
1696
|
},
|
|
1697
1697
|
{
|
|
1698
1698
|
"name": "pc-scene",
|
|
1699
|
-
"description": "The
|
|
1700
|
-
"doc-url": "",
|
|
1699
|
+
"description": "The `<pc-scene>` element holds the entity hierarchy the application renders,\nalong with the scene-wide fog and gravity settings. Must be a direct child of `<pc-app>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
1700
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-scene/",
|
|
1701
1701
|
"attributes": [
|
|
1702
1702
|
{
|
|
1703
1703
|
"name": "fog",
|
|
@@ -1793,8 +1793,8 @@
|
|
|
1793
1793
|
},
|
|
1794
1794
|
{
|
|
1795
1795
|
"name": "pc-sky",
|
|
1796
|
-
"description": "The
|
|
1797
|
-
"doc-url": "",
|
|
1796
|
+
"description": "The `<pc-sky>` element renders a skybox from a texture asset, projected as an\ninfinite background, a box or a dome, and optionally lights the scene from it. Must be a direct\nchild of `<pc-scene>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
1797
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-sky/",
|
|
1798
1798
|
"attributes": [
|
|
1799
1799
|
{
|
|
1800
1800
|
"name": "asset",
|
|
@@ -1900,8 +1900,8 @@
|
|
|
1900
1900
|
},
|
|
1901
1901
|
{
|
|
1902
1902
|
"name": "pc-wasm",
|
|
1903
|
-
"description": "The
|
|
1904
|
-
"doc-url": "",
|
|
1903
|
+
"description": "The `<pc-wasm>` element loads a WebAssembly module the engine needs before the\napplication starts — `Ammo` for physics, `Basis` or `DracoDecoderModule` for compressed assets.\nMust be a direct child of `<pc-app>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
1904
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-wasm/",
|
|
1905
1905
|
"attributes": [
|
|
1906
1906
|
{
|
|
1907
1907
|
"name": "fallback",
|
|
@@ -1955,8 +1955,8 @@
|
|
|
1955
1955
|
},
|
|
1956
1956
|
{
|
|
1957
1957
|
"name": "pc-anim-clip",
|
|
1958
|
-
"description": "The
|
|
1959
|
-
"doc-url": "",
|
|
1958
|
+
"description": "The `<pc-anim-clip>` element declares one named animation clip on its parent\n`<pc-anim>`, taken from the `asset` it names or, without one, from the enclosing `<pc-model>`'s\nown animations. Must be a direct child of `<pc-anim>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
1959
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-anim-clip/",
|
|
1960
1960
|
"attributes": [
|
|
1961
1961
|
{
|
|
1962
1962
|
"name": "asset",
|
|
@@ -2020,8 +2020,8 @@
|
|
|
2020
2020
|
},
|
|
2021
2021
|
{
|
|
2022
2022
|
"name": "pc-anim",
|
|
2023
|
-
"description": "The
|
|
2024
|
-
"doc-url": "",
|
|
2023
|
+
"description": "The `<pc-anim>` element plays animation clips over its entity's hierarchy, taken\nfrom `<pc-anim-clip>` children or from the enclosing `<pc-model>`'s own animations. The first\nclip plays automatically, and the `clip` attribute switches between them. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
2024
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-anim/",
|
|
2025
2025
|
"attributes": [
|
|
2026
2026
|
{
|
|
2027
2027
|
"name": "activate",
|
|
@@ -2110,8 +2110,8 @@
|
|
|
2110
2110
|
},
|
|
2111
2111
|
{
|
|
2112
2112
|
"name": "pc-audio-listener",
|
|
2113
|
-
"description": "The
|
|
2114
|
-
"doc-url": "",
|
|
2113
|
+
"description": "The `<pc-audio-listener>` element makes its entity the point from which\npositional sounds are heard, typically the entity holding the `<pc-camera>`. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
2114
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-audio-listener/",
|
|
2115
2115
|
"attributes": [
|
|
2116
2116
|
{
|
|
2117
2117
|
"name": "enabled",
|
|
@@ -2159,8 +2159,8 @@
|
|
|
2159
2159
|
},
|
|
2160
2160
|
{
|
|
2161
2161
|
"name": "pc-button",
|
|
2162
|
-
"description": "The
|
|
2163
|
-
"doc-url": "",
|
|
2162
|
+
"description": "The `<pc-button>` element makes its entity respond to pointer input, tinting or\nswapping its image as the pointer hovers, presses and releases it. The entity also needs a\n`<pc-element>` with `use-input` set. Must be a child of a `<pc-entity>`, `<pc-model>` or\n`<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
2163
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-button/",
|
|
2164
2164
|
"attributes": [
|
|
2165
2165
|
{
|
|
2166
2166
|
"name": "active",
|
|
@@ -2334,8 +2334,8 @@
|
|
|
2334
2334
|
},
|
|
2335
2335
|
{
|
|
2336
2336
|
"name": "pc-camera",
|
|
2337
|
-
"description": "The
|
|
2338
|
-
"doc-url": "",
|
|
2337
|
+
"description": "The `<pc-camera>` element renders the scene from its entity's transform, with\nattributes for the projection, field of view, clip planes, clear color and tonemapping. Must be a\nchild of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
2338
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-camera/",
|
|
2339
2339
|
"attributes": [
|
|
2340
2340
|
{
|
|
2341
2341
|
"name": "clear-color",
|
|
@@ -2347,6 +2347,11 @@
|
|
|
2347
2347
|
"description": "The clear color buffer of the camera.",
|
|
2348
2348
|
"value": { "type": "boolean", "default": "true" }
|
|
2349
2349
|
},
|
|
2350
|
+
{
|
|
2351
|
+
"name": "clear-depth",
|
|
2352
|
+
"description": "The depth value the depth buffer is cleared to.",
|
|
2353
|
+
"value": { "type": "number", "default": "1" }
|
|
2354
|
+
},
|
|
2350
2355
|
{
|
|
2351
2356
|
"name": "clear-depth-buffer",
|
|
2352
2357
|
"description": "The clear depth buffer of the camera.",
|
|
@@ -2355,7 +2360,7 @@
|
|
|
2355
2360
|
{
|
|
2356
2361
|
"name": "clear-stencil-buffer",
|
|
2357
2362
|
"description": "The clear stencil buffer of the camera.",
|
|
2358
|
-
"value": { "type": "boolean", "default": "
|
|
2363
|
+
"value": { "type": "boolean", "default": "true" }
|
|
2359
2364
|
},
|
|
2360
2365
|
{
|
|
2361
2366
|
"name": "cull-faces",
|
|
@@ -2448,6 +2453,11 @@
|
|
|
2448
2453
|
],
|
|
2449
2454
|
"js": {
|
|
2450
2455
|
"properties": [
|
|
2456
|
+
{
|
|
2457
|
+
"name": "arAvailable",
|
|
2458
|
+
"description": "Whether immersive AR is available. Independent of vrAvailable: a device can offer\neither mode without the other.",
|
|
2459
|
+
"type": "boolean"
|
|
2460
|
+
},
|
|
2451
2461
|
{
|
|
2452
2462
|
"name": "clearColor",
|
|
2453
2463
|
"description": "Gets the clear color of the camera.",
|
|
@@ -2458,6 +2468,11 @@
|
|
|
2458
2468
|
"description": "Gets the clear color buffer of the camera.",
|
|
2459
2469
|
"type": "boolean"
|
|
2460
2470
|
},
|
|
2471
|
+
{
|
|
2472
|
+
"name": "clearDepth",
|
|
2473
|
+
"description": "Gets the depth value the depth buffer is cleared to.",
|
|
2474
|
+
"type": "number"
|
|
2475
|
+
},
|
|
2461
2476
|
{
|
|
2462
2477
|
"name": "clearDepthBuffer",
|
|
2463
2478
|
"description": "Gets the clear depth buffer of the camera.",
|
|
@@ -2555,7 +2570,11 @@
|
|
|
2555
2570
|
"description": "Gets the tone mapping of the camera.",
|
|
2556
2571
|
"type": "'none' | 'linear' | 'filmic' | 'hejl' | 'aces' | 'aces2' | 'neutral'"
|
|
2557
2572
|
},
|
|
2558
|
-
{
|
|
2573
|
+
{
|
|
2574
|
+
"name": "vrAvailable",
|
|
2575
|
+
"description": "Whether immersive VR is available. Independent of arAvailable: a device can offer\neither mode without the other.",
|
|
2576
|
+
"type": "boolean"
|
|
2577
|
+
}
|
|
2559
2578
|
],
|
|
2560
2579
|
"events": [
|
|
2561
2580
|
{
|
|
@@ -2568,8 +2587,8 @@
|
|
|
2568
2587
|
},
|
|
2569
2588
|
{
|
|
2570
2589
|
"name": "pc-collision",
|
|
2571
|
-
"description": "The
|
|
2572
|
-
"doc-url": "",
|
|
2590
|
+
"description": "The `<pc-collision>` element gives its entity a collision shape — a box, sphere,\ncapsule, cone, cylinder or mesh — for the physics simulation to collide against. Pair it with a\n`<pc-rigid-body>`. Must be a child of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
2591
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-collision/",
|
|
2573
2592
|
"attributes": [
|
|
2574
2593
|
{
|
|
2575
2594
|
"name": "angular-offset",
|
|
@@ -2657,8 +2676,8 @@
|
|
|
2657
2676
|
},
|
|
2658
2677
|
{
|
|
2659
2678
|
"name": "pc-element",
|
|
2660
|
-
"description": "The
|
|
2661
|
-
"doc-url": "",
|
|
2679
|
+
"description": "The `<pc-element>` element gives its entity a 2D UI rectangle inside a\n`<pc-screen>` hierarchy, drawing an image, a line of text or nothing (`type=\"image\"`, `\"text\"` or\n`\"group\"`). Must be a child of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
2680
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-element/",
|
|
2662
2681
|
"attributes": [
|
|
2663
2682
|
{
|
|
2664
2683
|
"name": "anchor",
|
|
@@ -2944,8 +2963,8 @@
|
|
|
2944
2963
|
},
|
|
2945
2964
|
{
|
|
2946
2965
|
"name": "pc-gsplat",
|
|
2947
|
-
"description": "The
|
|
2948
|
-
"doc-url": "",
|
|
2966
|
+
"description": "The `<pc-gsplat>` element renders the 3D Gaussian splats of a `gsplat` asset at\nits entity, with attributes for shadow casting and level of detail. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
2967
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-gsplat/",
|
|
2949
2968
|
"attributes": [
|
|
2950
2969
|
{
|
|
2951
2970
|
"name": "asset",
|
|
@@ -3047,8 +3066,8 @@
|
|
|
3047
3066
|
},
|
|
3048
3067
|
{
|
|
3049
3068
|
"name": "pc-joint",
|
|
3050
|
-
"description": "The
|
|
3051
|
-
"doc-url": "",
|
|
3069
|
+
"description": "The `<pc-joint>` element constrains two rigid bodies to each other — a hinged\ndoor, a swinging chain, a sliding drawer. Its entity's transform is the joint frame, and\n`entity-a` and `entity-b` name the bodies. Must be a child of a `<pc-entity>`, `<pc-model>` or\n`<pc-node>`.\n\n---\n\n\n### **Events:**\n - **break** - Fired when the impulse on the joint exceeds `break-impulse` and the constraint breaks. A broken joint no longer constrains its bodies; calling `refreshFrames()` on the underlying component re-attaches it. Bubbles and is composed. Engine component: `JointComponent` (`joint`).\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
3070
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-joint/",
|
|
3052
3071
|
"attributes": [
|
|
3053
3072
|
{
|
|
3054
3073
|
"name": "angular-damping",
|
|
@@ -3394,8 +3413,8 @@
|
|
|
3394
3413
|
},
|
|
3395
3414
|
{
|
|
3396
3415
|
"name": "pc-layout-child",
|
|
3397
|
-
"description": "The
|
|
3398
|
-
"doc-url": "",
|
|
3416
|
+
"description": "The `<pc-layout-child>` element controls how its entity is sized by the\n`<pc-layout-group>` above it, through minimum and maximum sizes and fit proportions. Must be a\nchild of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
3417
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-layout-child/",
|
|
3399
3418
|
"attributes": [
|
|
3400
3419
|
{
|
|
3401
3420
|
"name": "enabled",
|
|
@@ -3506,8 +3525,8 @@
|
|
|
3506
3525
|
},
|
|
3507
3526
|
{
|
|
3508
3527
|
"name": "pc-layout-group",
|
|
3509
|
-
"description": "The
|
|
3510
|
-
"doc-url": "",
|
|
3528
|
+
"description": "The `<pc-layout-group>` element arranges its entity's children in a row or\ncolumn, with spacing, padding, alignment and fitting. Must be a child of a `<pc-entity>`,\n`<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
3529
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-layout-group/",
|
|
3511
3530
|
"attributes": [
|
|
3512
3531
|
{
|
|
3513
3532
|
"name": "alignment",
|
|
@@ -3645,9 +3664,19 @@
|
|
|
3645
3664
|
},
|
|
3646
3665
|
{
|
|
3647
3666
|
"name": "pc-light",
|
|
3648
|
-
"description": "The
|
|
3649
|
-
"doc-url": "",
|
|
3667
|
+
"description": "The `<pc-light>` element lights the scene from its entity — as a directional,\nomni or spot light — with attributes for color, intensity, range and shadows. Must be a child of\na `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
3668
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-light/",
|
|
3650
3669
|
"attributes": [
|
|
3670
|
+
{
|
|
3671
|
+
"name": "cascade-blend",
|
|
3672
|
+
"description": "The cascade blend factor of the light, from 0 (no blending) to 1, which applies only to `directional` lights with `num-cascades` greater than 1.",
|
|
3673
|
+
"value": { "type": "number", "default": "0" }
|
|
3674
|
+
},
|
|
3675
|
+
{
|
|
3676
|
+
"name": "cascade-distribution",
|
|
3677
|
+
"description": "The cascade distribution of the light, from 0 (linear split) to 1 (logarithmic split, concentrating shadow resolution near the camera), which applies only to `directional` lights with `num-cascades` greater than 1.",
|
|
3678
|
+
"value": { "type": "number", "default": "0.5" }
|
|
3679
|
+
},
|
|
3651
3680
|
{
|
|
3652
3681
|
"name": "cast-shadows",
|
|
3653
3682
|
"description": "The cast shadows flag of the light.",
|
|
@@ -3676,7 +3705,12 @@
|
|
|
3676
3705
|
{
|
|
3677
3706
|
"name": "normal-offset-bias",
|
|
3678
3707
|
"description": "The normal offset bias of the light.",
|
|
3679
|
-
"value": { "type": "number", "default": "0
|
|
3708
|
+
"value": { "type": "number", "default": "0" }
|
|
3709
|
+
},
|
|
3710
|
+
{
|
|
3711
|
+
"name": "num-cascades",
|
|
3712
|
+
"description": "The number of shadow cascades of the light, an integer from 1 (no cascades) to 4, which applies only to `directional` lights.",
|
|
3713
|
+
"value": { "type": "number", "default": "1" }
|
|
3680
3714
|
},
|
|
3681
3715
|
{
|
|
3682
3716
|
"name": "outer-cone-angle",
|
|
@@ -3701,7 +3735,7 @@
|
|
|
3701
3735
|
{
|
|
3702
3736
|
"name": "shadow-bias",
|
|
3703
3737
|
"description": "The shadow bias of the light.",
|
|
3704
|
-
"value": { "type": "number", "default": "0.
|
|
3738
|
+
"value": { "type": "number", "default": "0.05" }
|
|
3705
3739
|
},
|
|
3706
3740
|
{
|
|
3707
3741
|
"name": "shadow-blocker-samples",
|
|
@@ -3711,7 +3745,7 @@
|
|
|
3711
3745
|
{
|
|
3712
3746
|
"name": "shadow-distance",
|
|
3713
3747
|
"description": "The shadow distance of the light.",
|
|
3714
|
-
"value": { "type": "number", "default": "
|
|
3748
|
+
"value": { "type": "number", "default": "40" }
|
|
3715
3749
|
},
|
|
3716
3750
|
{
|
|
3717
3751
|
"name": "shadow-intensity",
|
|
@@ -3747,7 +3781,7 @@
|
|
|
3747
3781
|
{
|
|
3748
3782
|
"name": "vsm-bias",
|
|
3749
3783
|
"description": "The VSM bias of the light.",
|
|
3750
|
-
"value": { "type": "number", "default": "0.
|
|
3784
|
+
"value": { "type": "number", "default": "0.0025" }
|
|
3751
3785
|
},
|
|
3752
3786
|
{
|
|
3753
3787
|
"name": "vsm-blur-size",
|
|
@@ -3764,6 +3798,14 @@
|
|
|
3764
3798
|
],
|
|
3765
3799
|
"js": {
|
|
3766
3800
|
"properties": [
|
|
3801
|
+
{
|
|
3802
|
+
"name": "cascadeBlend",
|
|
3803
|
+
"description": "Gets the cascade blend factor of the light, from 0 (no blending) to 1, which applies only to\n`directional` lights with `num-cascades` greater than 1."
|
|
3804
|
+
},
|
|
3805
|
+
{
|
|
3806
|
+
"name": "cascadeDistribution",
|
|
3807
|
+
"description": "Gets the cascade distribution of the light, from 0 (linear split) to 1 (logarithmic split,\nconcentrating shadow resolution near the camera), which applies only to `directional` lights\nwith `num-cascades` greater than 1."
|
|
3808
|
+
},
|
|
3767
3809
|
{
|
|
3768
3810
|
"name": "castShadows",
|
|
3769
3811
|
"description": "Gets the cast shadows flag of the light."
|
|
@@ -3803,6 +3845,10 @@
|
|
|
3803
3845
|
"name": "normalOffsetBias",
|
|
3804
3846
|
"description": "Gets the normal offset bias of the light."
|
|
3805
3847
|
},
|
|
3848
|
+
{
|
|
3849
|
+
"name": "numCascades",
|
|
3850
|
+
"description": "Gets the number of shadow cascades of the light, an integer from 1 (no cascades) to 4, which\napplies only to `directional` lights."
|
|
3851
|
+
},
|
|
3806
3852
|
{
|
|
3807
3853
|
"name": "outerConeAngle",
|
|
3808
3854
|
"description": "Gets the outer cone angle of the light."
|
|
@@ -3868,8 +3914,8 @@
|
|
|
3868
3914
|
},
|
|
3869
3915
|
{
|
|
3870
3916
|
"name": "pc-particle-system",
|
|
3871
|
-
"description": "The
|
|
3872
|
-
"doc-url": "",
|
|
3917
|
+
"description": "The `<pc-particle-system>` element emits particles from its entity, with\nattributes for the emitter's shape, rate, lifetime, textures and blending. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
3918
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-particle-system/",
|
|
3873
3919
|
"attributes": [
|
|
3874
3920
|
{
|
|
3875
3921
|
"name": "asset",
|
|
@@ -3927,8 +3973,8 @@
|
|
|
3927
3973
|
},
|
|
3928
3974
|
{
|
|
3929
3975
|
"name": "pc-render",
|
|
3930
|
-
"description": "The
|
|
3931
|
-
"doc-url": "",
|
|
3976
|
+
"description": "The `<pc-render>` element renders one of the engine's built-in primitives at its\nentity — box, sphere, capsule, cone, cylinder or plane — shaded by the `<pc-material>` its\n`material` attribute names. For glTF content, use `<pc-model>` instead. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
3977
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-render/",
|
|
3932
3978
|
"attributes": [
|
|
3933
3979
|
{
|
|
3934
3980
|
"name": "cast-shadows",
|
|
@@ -4018,8 +4064,8 @@
|
|
|
4018
4064
|
},
|
|
4019
4065
|
{
|
|
4020
4066
|
"name": "pc-rigid-body",
|
|
4021
|
-
"description": "The
|
|
4022
|
-
"doc-url": "",
|
|
4067
|
+
"description": "The `<pc-rigid-body>` element hands its entity to the physics simulation, with\nattributes for its type, mass, friction and restitution. It needs a sibling `<pc-collision>` for\nits shape, and `Ammo` loaded through `<pc-wasm>`. Must be a child of a `<pc-entity>`,\n`<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
4068
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-rigid-body/",
|
|
4023
4069
|
"attributes": [
|
|
4024
4070
|
{
|
|
4025
4071
|
"name": "angular-damping",
|
|
@@ -4114,8 +4160,8 @@
|
|
|
4114
4160
|
},
|
|
4115
4161
|
{
|
|
4116
4162
|
"name": "pc-screen",
|
|
4117
|
-
"description": "The
|
|
4118
|
-
"doc-url": "",
|
|
4163
|
+
"description": "The `<pc-screen>` element gives its entity a 2D space — in screen space or in the\nworld — that a hierarchy of `<pc-element>` descendants lays out inside. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
4164
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-screen/",
|
|
4119
4165
|
"attributes": [
|
|
4120
4166
|
{
|
|
4121
4167
|
"name": "enabled",
|
|
@@ -4203,8 +4249,8 @@
|
|
|
4203
4249
|
},
|
|
4204
4250
|
{
|
|
4205
4251
|
"name": "pc-script",
|
|
4206
|
-
"description": "The
|
|
4207
|
-
"doc-url": "",
|
|
4252
|
+
"description": "The `<pc-script>` element holds the `<pc-script-instance>` children that attach\nscripts to its entity. Must be a child of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
4253
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-script/",
|
|
4208
4254
|
"attributes": [
|
|
4209
4255
|
{
|
|
4210
4256
|
"name": "enabled",
|
|
@@ -4252,8 +4298,8 @@
|
|
|
4252
4298
|
},
|
|
4253
4299
|
{
|
|
4254
4300
|
"name": "pc-script-instance",
|
|
4255
|
-
"description": "The
|
|
4256
|
-
"doc-url": "",
|
|
4301
|
+
"description": "The `<pc-script-instance>` element attaches one script class, named by `name`, to\nthe entity of its parent `<pc-script>`. Its other attributes set script attributes of the same\nname, and `attributes` takes a JSON object instead. Must be a direct child of `<pc-script>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n- **scriptattributeschange** - Fired when the script's attributes change. The `detail` carries the new `attributes` object. Bubbles.\n- **scriptenablechange** - Fired when the script's enabled state changes. The `detail` carries the new `enabled` state. Bubbles.\n- **scriptnamechange** - Fired when the script is renamed on a live element. The `detail` carries `oldName` and `newName`. Bubbles.",
|
|
4302
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-script-instance/",
|
|
4257
4303
|
"attributes": [
|
|
4258
4304
|
{
|
|
4259
4305
|
"name": "attributes",
|
|
@@ -4347,8 +4393,8 @@
|
|
|
4347
4393
|
},
|
|
4348
4394
|
{
|
|
4349
4395
|
"name": "pc-scroll-view",
|
|
4350
|
-
"description": "The
|
|
4351
|
-
"doc-url": "",
|
|
4396
|
+
"description": "The `<pc-scroll-view>` element scrolls a larger content entity within a clipped\nviewport at its entity, optionally driven by the `<pc-scrollbar>` elements it references. Must be\na child of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
4397
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-scroll-view/",
|
|
4352
4398
|
"attributes": [
|
|
4353
4399
|
{
|
|
4354
4400
|
"name": "bounce-amount",
|
|
@@ -4519,8 +4565,8 @@
|
|
|
4519
4565
|
},
|
|
4520
4566
|
{
|
|
4521
4567
|
"name": "pc-scrollbar",
|
|
4522
|
-
"description": "The
|
|
4523
|
-
"doc-url": "",
|
|
4568
|
+
"description": "The `<pc-scrollbar>` element gives its entity a draggable handle reporting a\nposition from 0 to 1, which a `<pc-scroll-view>` references to scroll its content. Must be a\nchild of a `<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
4569
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-scrollbar/",
|
|
4524
4570
|
"attributes": [
|
|
4525
4571
|
{
|
|
4526
4572
|
"name": "enabled",
|
|
@@ -4607,8 +4653,8 @@
|
|
|
4607
4653
|
},
|
|
4608
4654
|
{
|
|
4609
4655
|
"name": "pc-sound",
|
|
4610
|
-
"description": "The
|
|
4611
|
-
"doc-url": "",
|
|
4656
|
+
"description": "The `<pc-sound>` element holds the `<pc-sound-slot>` children that play sounds at\nits entity, along with the positional audio settings they share. Must be a child of a\n`<pc-entity>`, `<pc-model>` or `<pc-node>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
4657
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-sound/",
|
|
4612
4658
|
"attributes": [
|
|
4613
4659
|
{
|
|
4614
4660
|
"name": "distance-model",
|
|
@@ -4723,8 +4769,8 @@
|
|
|
4723
4769
|
},
|
|
4724
4770
|
{
|
|
4725
4771
|
"name": "pc-sound-slot",
|
|
4726
|
-
"description": "The
|
|
4727
|
-
"doc-url": "",
|
|
4772
|
+
"description": "The `<pc-sound-slot>` element declares one named sound on its parent `<pc-sound>`\n— its asset, volume, pitch, looping and autoplay. Must be a direct child of `<pc-sound>`.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.",
|
|
4773
|
+
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-sound-slot/",
|
|
4728
4774
|
"attributes": [
|
|
4729
4775
|
{
|
|
4730
4776
|
"name": "asset",
|