@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
|
@@ -317,6 +317,7 @@
|
|
|
317
317
|
"name": "AsyncElement",
|
|
318
318
|
"module": "/src/async-element"
|
|
319
319
|
},
|
|
320
|
+
"summary": "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",
|
|
320
321
|
"tagName": "pc-app",
|
|
321
322
|
"customElement": true
|
|
322
323
|
}
|
|
@@ -767,6 +768,7 @@
|
|
|
767
768
|
"name": "AsyncElement",
|
|
768
769
|
"module": "/src/async-element"
|
|
769
770
|
},
|
|
771
|
+
"summary": "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",
|
|
770
772
|
"tagName": "pc-asset",
|
|
771
773
|
"customElement": true
|
|
772
774
|
}
|
|
@@ -1376,7 +1378,7 @@
|
|
|
1376
1378
|
"declarations": [
|
|
1377
1379
|
{
|
|
1378
1380
|
"kind": "class",
|
|
1379
|
-
"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",
|
|
1381
|
+
"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 EventTarget.addEventListener or with the matching inline `onpointer*`\nattribute.\n",
|
|
1380
1382
|
"name": "EntityElement",
|
|
1381
1383
|
"events": [
|
|
1382
1384
|
{
|
|
@@ -1524,6 +1526,7 @@
|
|
|
1524
1526
|
"name": "EntityOwnerElement",
|
|
1525
1527
|
"module": "/src/entity-owner"
|
|
1526
1528
|
},
|
|
1529
|
+
"summary": "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",
|
|
1527
1530
|
"tagName": "pc-entity",
|
|
1528
1531
|
"customElement": true,
|
|
1529
1532
|
"members": [
|
|
@@ -2088,6 +2091,30 @@
|
|
|
2088
2091
|
"module": "src/index.ts"
|
|
2089
2092
|
}
|
|
2090
2093
|
},
|
|
2094
|
+
{
|
|
2095
|
+
"kind": "js",
|
|
2096
|
+
"name": "AddressMode",
|
|
2097
|
+
"declaration": {
|
|
2098
|
+
"name": "AddressMode",
|
|
2099
|
+
"module": "./asset"
|
|
2100
|
+
}
|
|
2101
|
+
},
|
|
2102
|
+
{
|
|
2103
|
+
"kind": "js",
|
|
2104
|
+
"name": "MagFilterMode",
|
|
2105
|
+
"declaration": {
|
|
2106
|
+
"name": "MagFilterMode",
|
|
2107
|
+
"module": "./asset"
|
|
2108
|
+
}
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
"kind": "js",
|
|
2112
|
+
"name": "MinFilterMode",
|
|
2113
|
+
"declaration": {
|
|
2114
|
+
"name": "MinFilterMode",
|
|
2115
|
+
"module": "./asset"
|
|
2116
|
+
}
|
|
2117
|
+
},
|
|
2091
2118
|
{
|
|
2092
2119
|
"kind": "js",
|
|
2093
2120
|
"name": "AsyncElementTagName",
|
|
@@ -2096,6 +2123,78 @@
|
|
|
2096
2123
|
"module": "./async-element"
|
|
2097
2124
|
}
|
|
2098
2125
|
},
|
|
2126
|
+
{
|
|
2127
|
+
"kind": "js",
|
|
2128
|
+
"name": "JointType",
|
|
2129
|
+
"declaration": {
|
|
2130
|
+
"name": "JointType",
|
|
2131
|
+
"module": "./components/joint-component"
|
|
2132
|
+
}
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
"kind": "js",
|
|
2136
|
+
"name": "MotionMode",
|
|
2137
|
+
"declaration": {
|
|
2138
|
+
"name": "MotionMode",
|
|
2139
|
+
"module": "./components/joint-component"
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
"kind": "js",
|
|
2144
|
+
"name": "BlendType",
|
|
2145
|
+
"declaration": {
|
|
2146
|
+
"name": "BlendType",
|
|
2147
|
+
"module": "./material"
|
|
2148
|
+
}
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
"kind": "js",
|
|
2152
|
+
"name": "ColorChannel",
|
|
2153
|
+
"declaration": {
|
|
2154
|
+
"name": "ColorChannel",
|
|
2155
|
+
"module": "./material"
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
"kind": "js",
|
|
2160
|
+
"name": "CullMode",
|
|
2161
|
+
"declaration": {
|
|
2162
|
+
"name": "CullMode",
|
|
2163
|
+
"module": "./material"
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
"kind": "js",
|
|
2168
|
+
"name": "FresnelModel",
|
|
2169
|
+
"declaration": {
|
|
2170
|
+
"name": "FresnelModel",
|
|
2171
|
+
"module": "./material"
|
|
2172
|
+
}
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
"kind": "js",
|
|
2176
|
+
"name": "OccludeSpecular",
|
|
2177
|
+
"declaration": {
|
|
2178
|
+
"name": "OccludeSpecular",
|
|
2179
|
+
"module": "./material"
|
|
2180
|
+
}
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
"kind": "js",
|
|
2184
|
+
"name": "OpacityDither",
|
|
2185
|
+
"declaration": {
|
|
2186
|
+
"name": "OpacityDither",
|
|
2187
|
+
"module": "./material"
|
|
2188
|
+
}
|
|
2189
|
+
},
|
|
2190
|
+
{
|
|
2191
|
+
"kind": "js",
|
|
2192
|
+
"name": "ScalarChannel",
|
|
2193
|
+
"declaration": {
|
|
2194
|
+
"name": "ScalarChannel",
|
|
2195
|
+
"module": "./material"
|
|
2196
|
+
}
|
|
2197
|
+
},
|
|
2099
2198
|
{
|
|
2100
2199
|
"kind": "js",
|
|
2101
2200
|
"name": "HierarchyMaterial",
|
|
@@ -2119,6 +2218,14 @@
|
|
|
2119
2218
|
"name": "MaterialOverrides",
|
|
2120
2219
|
"module": "./node"
|
|
2121
2220
|
}
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
"kind": "js",
|
|
2224
|
+
"name": "NodeBindingState",
|
|
2225
|
+
"declaration": {
|
|
2226
|
+
"name": "NodeBindingState",
|
|
2227
|
+
"module": "./node"
|
|
2228
|
+
}
|
|
2122
2229
|
}
|
|
2123
2230
|
]
|
|
2124
2231
|
},
|
|
@@ -4276,6 +4383,7 @@
|
|
|
4276
4383
|
"superclass": {
|
|
4277
4384
|
"name": "HTMLElement"
|
|
4278
4385
|
},
|
|
4386
|
+
"summary": "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",
|
|
4279
4387
|
"tagName": "pc-material",
|
|
4280
4388
|
"customElement": true
|
|
4281
4389
|
}
|
|
@@ -4770,6 +4878,7 @@
|
|
|
4770
4878
|
"name": "EntityOwnerElement",
|
|
4771
4879
|
"module": "/src/entity-owner"
|
|
4772
4880
|
},
|
|
4881
|
+
"summary": "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",
|
|
4773
4882
|
"tagName": "pc-model",
|
|
4774
4883
|
"customElement": true
|
|
4775
4884
|
}
|
|
@@ -5283,6 +5392,7 @@
|
|
|
5283
5392
|
"name": "EntityBaseElement",
|
|
5284
5393
|
"module": "/src/entity-base"
|
|
5285
5394
|
},
|
|
5395
|
+
"summary": "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",
|
|
5286
5396
|
"tagName": "pc-node",
|
|
5287
5397
|
"customElement": true
|
|
5288
5398
|
}
|
|
@@ -5544,6 +5654,7 @@
|
|
|
5544
5654
|
"name": "AsyncElement",
|
|
5545
5655
|
"module": "/src/async-element"
|
|
5546
5656
|
},
|
|
5657
|
+
"summary": "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",
|
|
5547
5658
|
"tagName": "pc-scene",
|
|
5548
5659
|
"customElement": true,
|
|
5549
5660
|
"events": [
|
|
@@ -5845,6 +5956,7 @@
|
|
|
5845
5956
|
"name": "AsyncElement",
|
|
5846
5957
|
"module": "/src/async-element"
|
|
5847
5958
|
},
|
|
5959
|
+
"summary": "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",
|
|
5848
5960
|
"tagName": "pc-sky",
|
|
5849
5961
|
"customElement": true,
|
|
5850
5962
|
"events": [
|
|
@@ -5975,6 +6087,7 @@
|
|
|
5975
6087
|
"name": "AsyncElement",
|
|
5976
6088
|
"module": "/src/async-element"
|
|
5977
6089
|
},
|
|
6090
|
+
"summary": "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",
|
|
5978
6091
|
"tagName": "pc-wasm",
|
|
5979
6092
|
"customElement": true,
|
|
5980
6093
|
"events": [
|
|
@@ -6175,6 +6288,7 @@
|
|
|
6175
6288
|
"name": "AsyncElement",
|
|
6176
6289
|
"module": "/src/async-element"
|
|
6177
6290
|
},
|
|
6291
|
+
"summary": "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",
|
|
6178
6292
|
"tagName": "pc-anim-clip",
|
|
6179
6293
|
"customElement": true,
|
|
6180
6294
|
"events": [
|
|
@@ -6483,6 +6597,7 @@
|
|
|
6483
6597
|
"name": "ComponentElement",
|
|
6484
6598
|
"module": "/src/components/component"
|
|
6485
6599
|
},
|
|
6600
|
+
"summary": "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",
|
|
6486
6601
|
"tagName": "pc-anim",
|
|
6487
6602
|
"customElement": true,
|
|
6488
6603
|
"events": [
|
|
@@ -6629,6 +6744,7 @@
|
|
|
6629
6744
|
"name": "ComponentElement",
|
|
6630
6745
|
"module": "/src/components/component"
|
|
6631
6746
|
},
|
|
6747
|
+
"summary": "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",
|
|
6632
6748
|
"tagName": "pc-audio-listener",
|
|
6633
6749
|
"customElement": true,
|
|
6634
6750
|
"attributes": [
|
|
@@ -7143,6 +7259,7 @@
|
|
|
7143
7259
|
"name": "ComponentElement",
|
|
7144
7260
|
"module": "/src/components/component"
|
|
7145
7261
|
},
|
|
7262
|
+
"summary": "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",
|
|
7146
7263
|
"tagName": "pc-button",
|
|
7147
7264
|
"customElement": true,
|
|
7148
7265
|
"events": [
|
|
@@ -7188,6 +7305,20 @@
|
|
|
7188
7305
|
"description": "The CameraComponentElement interface provides properties and methods for manipulating\n[`<pc-camera>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-camera/) elements.\nThe CameraComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: CameraComponent (`camera`).\n",
|
|
7189
7306
|
"name": "CameraComponentElement",
|
|
7190
7307
|
"members": [
|
|
7308
|
+
{
|
|
7309
|
+
"kind": "field",
|
|
7310
|
+
"name": "arAvailable",
|
|
7311
|
+
"type": {
|
|
7312
|
+
"text": "boolean"
|
|
7313
|
+
},
|
|
7314
|
+
"description": "Whether immersive AR is available. Independent of vrAvailable: a device can offer\neither mode without the other.",
|
|
7315
|
+
"return": {
|
|
7316
|
+
"type": {
|
|
7317
|
+
"text": ""
|
|
7318
|
+
}
|
|
7319
|
+
},
|
|
7320
|
+
"readonly": true
|
|
7321
|
+
},
|
|
7191
7322
|
{
|
|
7192
7323
|
"kind": "field",
|
|
7193
7324
|
"name": "clearColor",
|
|
@@ -7226,6 +7357,25 @@
|
|
|
7226
7357
|
}
|
|
7227
7358
|
}
|
|
7228
7359
|
},
|
|
7360
|
+
{
|
|
7361
|
+
"kind": "field",
|
|
7362
|
+
"name": "clearDepth",
|
|
7363
|
+
"description": "Gets the depth value the depth buffer is cleared to.",
|
|
7364
|
+
"parameters": [
|
|
7365
|
+
{
|
|
7366
|
+
"description": "The clear depth value.",
|
|
7367
|
+
"name": "value"
|
|
7368
|
+
}
|
|
7369
|
+
],
|
|
7370
|
+
"type": {
|
|
7371
|
+
"text": "number"
|
|
7372
|
+
},
|
|
7373
|
+
"return": {
|
|
7374
|
+
"type": {
|
|
7375
|
+
"text": ""
|
|
7376
|
+
}
|
|
7377
|
+
}
|
|
7378
|
+
},
|
|
7229
7379
|
{
|
|
7230
7380
|
"kind": "field",
|
|
7231
7381
|
"name": "clearDepthBuffer",
|
|
@@ -7640,7 +7790,16 @@
|
|
|
7640
7790
|
},
|
|
7641
7791
|
{
|
|
7642
7792
|
"kind": "field",
|
|
7643
|
-
"name": "
|
|
7793
|
+
"name": "vrAvailable",
|
|
7794
|
+
"type": {
|
|
7795
|
+
"text": "boolean"
|
|
7796
|
+
},
|
|
7797
|
+
"description": "Whether immersive VR is available. Independent of arAvailable: a device can offer\neither mode without the other.",
|
|
7798
|
+
"return": {
|
|
7799
|
+
"type": {
|
|
7800
|
+
"text": ""
|
|
7801
|
+
}
|
|
7802
|
+
},
|
|
7644
7803
|
"readonly": true
|
|
7645
7804
|
}
|
|
7646
7805
|
],
|
|
@@ -7663,6 +7822,15 @@
|
|
|
7663
7822
|
"default": "true",
|
|
7664
7823
|
"description": "The clear color buffer of the camera."
|
|
7665
7824
|
},
|
|
7825
|
+
{
|
|
7826
|
+
"name": "clear-depth",
|
|
7827
|
+
"type": {
|
|
7828
|
+
"text": "number"
|
|
7829
|
+
},
|
|
7830
|
+
"fieldName": "clearDepth",
|
|
7831
|
+
"default": "1",
|
|
7832
|
+
"description": "The depth value the depth buffer is cleared to."
|
|
7833
|
+
},
|
|
7666
7834
|
{
|
|
7667
7835
|
"name": "clear-depth-buffer",
|
|
7668
7836
|
"type": {
|
|
@@ -7678,7 +7846,7 @@
|
|
|
7678
7846
|
"text": "boolean"
|
|
7679
7847
|
},
|
|
7680
7848
|
"fieldName": "clearStencilBuffer",
|
|
7681
|
-
"default": "
|
|
7849
|
+
"default": "true",
|
|
7682
7850
|
"description": "The clear stencil buffer of the camera."
|
|
7683
7851
|
},
|
|
7684
7852
|
{
|
|
@@ -7825,6 +7993,7 @@
|
|
|
7825
7993
|
"name": "ComponentElement",
|
|
7826
7994
|
"module": "/src/components/component"
|
|
7827
7995
|
},
|
|
7996
|
+
"summary": "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",
|
|
7828
7997
|
"tagName": "pc-camera",
|
|
7829
7998
|
"customElement": true,
|
|
7830
7999
|
"events": [
|
|
@@ -8077,6 +8246,7 @@
|
|
|
8077
8246
|
"name": "ComponentElement",
|
|
8078
8247
|
"module": "/src/components/component"
|
|
8079
8248
|
},
|
|
8249
|
+
"summary": "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",
|
|
8080
8250
|
"tagName": "pc-collision",
|
|
8081
8251
|
"customElement": true,
|
|
8082
8252
|
"events": [
|
|
@@ -9008,6 +9178,7 @@
|
|
|
9008
9178
|
"name": "ComponentElement",
|
|
9009
9179
|
"module": "/src/components/component"
|
|
9010
9180
|
},
|
|
9181
|
+
"summary": "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",
|
|
9011
9182
|
"tagName": "pc-element",
|
|
9012
9183
|
"customElement": true,
|
|
9013
9184
|
"events": [
|
|
@@ -9310,6 +9481,7 @@
|
|
|
9310
9481
|
"name": "ComponentElement",
|
|
9311
9482
|
"module": "/src/components/component"
|
|
9312
9483
|
},
|
|
9484
|
+
"summary": "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",
|
|
9313
9485
|
"tagName": "pc-gsplat",
|
|
9314
9486
|
"customElement": true,
|
|
9315
9487
|
"events": [
|
|
@@ -10231,6 +10403,7 @@
|
|
|
10231
10403
|
"name": "ComponentElement",
|
|
10232
10404
|
"module": "/src/components/component"
|
|
10233
10405
|
},
|
|
10406
|
+
"summary": "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",
|
|
10234
10407
|
"tagName": "pc-joint",
|
|
10235
10408
|
"customElement": true
|
|
10236
10409
|
}
|
|
@@ -10544,6 +10717,7 @@
|
|
|
10544
10717
|
"name": "ComponentElement",
|
|
10545
10718
|
"module": "/src/components/component"
|
|
10546
10719
|
},
|
|
10720
|
+
"summary": "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",
|
|
10547
10721
|
"tagName": "pc-layout-child",
|
|
10548
10722
|
"customElement": true,
|
|
10549
10723
|
"events": [
|
|
@@ -10922,6 +11096,7 @@
|
|
|
10922
11096
|
"name": "ComponentElement",
|
|
10923
11097
|
"module": "/src/components/component"
|
|
10924
11098
|
},
|
|
11099
|
+
"summary": "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",
|
|
10925
11100
|
"tagName": "pc-layout-group",
|
|
10926
11101
|
"customElement": true,
|
|
10927
11102
|
"events": [
|
|
@@ -10967,6 +11142,38 @@
|
|
|
10967
11142
|
"description": "The LightComponentElement interface provides properties and methods for manipulating\n[`<pc-light>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-light/) elements.\nThe LightComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nEngine component: LightComponent (`light`).\n",
|
|
10968
11143
|
"name": "LightComponentElement",
|
|
10969
11144
|
"members": [
|
|
11145
|
+
{
|
|
11146
|
+
"kind": "field",
|
|
11147
|
+
"name": "cascadeBlend",
|
|
11148
|
+
"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.",
|
|
11149
|
+
"parameters": [
|
|
11150
|
+
{
|
|
11151
|
+
"description": "The cascade blend factor.",
|
|
11152
|
+
"name": "value"
|
|
11153
|
+
}
|
|
11154
|
+
],
|
|
11155
|
+
"return": {
|
|
11156
|
+
"type": {
|
|
11157
|
+
"text": ""
|
|
11158
|
+
}
|
|
11159
|
+
}
|
|
11160
|
+
},
|
|
11161
|
+
{
|
|
11162
|
+
"kind": "field",
|
|
11163
|
+
"name": "cascadeDistribution",
|
|
11164
|
+
"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.",
|
|
11165
|
+
"parameters": [
|
|
11166
|
+
{
|
|
11167
|
+
"description": "The cascade distribution.",
|
|
11168
|
+
"name": "value"
|
|
11169
|
+
}
|
|
11170
|
+
],
|
|
11171
|
+
"return": {
|
|
11172
|
+
"type": {
|
|
11173
|
+
"text": ""
|
|
11174
|
+
}
|
|
11175
|
+
}
|
|
11176
|
+
},
|
|
10970
11177
|
{
|
|
10971
11178
|
"kind": "field",
|
|
10972
11179
|
"name": "castShadows",
|
|
@@ -11121,6 +11328,22 @@
|
|
|
11121
11328
|
}
|
|
11122
11329
|
}
|
|
11123
11330
|
},
|
|
11331
|
+
{
|
|
11332
|
+
"kind": "field",
|
|
11333
|
+
"name": "numCascades",
|
|
11334
|
+
"description": "Gets the number of shadow cascades of the light, an integer from 1 (no cascades) to 4, which\napplies only to `directional` lights.",
|
|
11335
|
+
"parameters": [
|
|
11336
|
+
{
|
|
11337
|
+
"description": "The number of shadow cascades.",
|
|
11338
|
+
"name": "value"
|
|
11339
|
+
}
|
|
11340
|
+
],
|
|
11341
|
+
"return": {
|
|
11342
|
+
"type": {
|
|
11343
|
+
"text": ""
|
|
11344
|
+
}
|
|
11345
|
+
}
|
|
11346
|
+
},
|
|
11124
11347
|
{
|
|
11125
11348
|
"kind": "field",
|
|
11126
11349
|
"name": "outerConeAngle",
|
|
@@ -11361,6 +11584,24 @@
|
|
|
11361
11584
|
}
|
|
11362
11585
|
],
|
|
11363
11586
|
"attributes": [
|
|
11587
|
+
{
|
|
11588
|
+
"name": "cascade-blend",
|
|
11589
|
+
"type": {
|
|
11590
|
+
"text": "number"
|
|
11591
|
+
},
|
|
11592
|
+
"fieldName": "cascadeBlend",
|
|
11593
|
+
"default": "0",
|
|
11594
|
+
"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."
|
|
11595
|
+
},
|
|
11596
|
+
{
|
|
11597
|
+
"name": "cascade-distribution",
|
|
11598
|
+
"type": {
|
|
11599
|
+
"text": "number"
|
|
11600
|
+
},
|
|
11601
|
+
"fieldName": "cascadeDistribution",
|
|
11602
|
+
"default": "0.5",
|
|
11603
|
+
"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."
|
|
11604
|
+
},
|
|
11364
11605
|
{
|
|
11365
11606
|
"name": "cast-shadows",
|
|
11366
11607
|
"type": {
|
|
@@ -11416,9 +11657,18 @@
|
|
|
11416
11657
|
"text": "number"
|
|
11417
11658
|
},
|
|
11418
11659
|
"fieldName": "normalOffsetBias",
|
|
11419
|
-
"default": "0
|
|
11660
|
+
"default": "0",
|
|
11420
11661
|
"description": "The normal offset bias of the light."
|
|
11421
11662
|
},
|
|
11663
|
+
{
|
|
11664
|
+
"name": "num-cascades",
|
|
11665
|
+
"type": {
|
|
11666
|
+
"text": "number"
|
|
11667
|
+
},
|
|
11668
|
+
"fieldName": "numCascades",
|
|
11669
|
+
"default": "1",
|
|
11670
|
+
"description": "The number of shadow cascades of the light, an integer from 1 (no cascades) to 4, which applies only to `directional` lights."
|
|
11671
|
+
},
|
|
11422
11672
|
{
|
|
11423
11673
|
"name": "outer-cone-angle",
|
|
11424
11674
|
"type": {
|
|
@@ -11461,7 +11711,7 @@
|
|
|
11461
11711
|
"text": "number"
|
|
11462
11712
|
},
|
|
11463
11713
|
"fieldName": "shadowBias",
|
|
11464
|
-
"default": "0.
|
|
11714
|
+
"default": "0.05",
|
|
11465
11715
|
"description": "The shadow bias of the light."
|
|
11466
11716
|
},
|
|
11467
11717
|
{
|
|
@@ -11479,7 +11729,7 @@
|
|
|
11479
11729
|
"text": "number"
|
|
11480
11730
|
},
|
|
11481
11731
|
"fieldName": "shadowDistance",
|
|
11482
|
-
"default": "
|
|
11732
|
+
"default": "40",
|
|
11483
11733
|
"description": "The shadow distance of the light."
|
|
11484
11734
|
},
|
|
11485
11735
|
{
|
|
@@ -11533,7 +11783,7 @@
|
|
|
11533
11783
|
"text": "number"
|
|
11534
11784
|
},
|
|
11535
11785
|
"fieldName": "vsmBias",
|
|
11536
|
-
"default": "0.
|
|
11786
|
+
"default": "0.0025",
|
|
11537
11787
|
"description": "The VSM bias of the light."
|
|
11538
11788
|
},
|
|
11539
11789
|
{
|
|
@@ -11550,6 +11800,7 @@
|
|
|
11550
11800
|
"name": "ComponentElement",
|
|
11551
11801
|
"module": "/src/components/component"
|
|
11552
11802
|
},
|
|
11803
|
+
"summary": "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",
|
|
11553
11804
|
"tagName": "pc-light",
|
|
11554
11805
|
"customElement": true,
|
|
11555
11806
|
"events": [
|
|
@@ -11750,6 +12001,7 @@
|
|
|
11750
12001
|
"name": "ComponentElement",
|
|
11751
12002
|
"module": "/src/components/component"
|
|
11752
12003
|
},
|
|
12004
|
+
"summary": "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",
|
|
11753
12005
|
"tagName": "pc-particle-system",
|
|
11754
12006
|
"customElement": true,
|
|
11755
12007
|
"events": [
|
|
@@ -12011,6 +12263,7 @@
|
|
|
12011
12263
|
"name": "ComponentElement",
|
|
12012
12264
|
"module": "/src/components/component"
|
|
12013
12265
|
},
|
|
12266
|
+
"summary": "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",
|
|
12014
12267
|
"tagName": "pc-render",
|
|
12015
12268
|
"customElement": true,
|
|
12016
12269
|
"events": [
|
|
@@ -12274,6 +12527,7 @@
|
|
|
12274
12527
|
"name": "ComponentElement",
|
|
12275
12528
|
"module": "/src/components/component"
|
|
12276
12529
|
},
|
|
12530
|
+
"summary": "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",
|
|
12277
12531
|
"tagName": "pc-rigid-body",
|
|
12278
12532
|
"customElement": true,
|
|
12279
12533
|
"events": [
|
|
@@ -12527,6 +12781,7 @@
|
|
|
12527
12781
|
"name": "ComponentElement",
|
|
12528
12782
|
"module": "/src/components/component"
|
|
12529
12783
|
},
|
|
12784
|
+
"summary": "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",
|
|
12530
12785
|
"tagName": "pc-screen",
|
|
12531
12786
|
"customElement": true,
|
|
12532
12787
|
"events": [
|
|
@@ -12665,6 +12920,7 @@
|
|
|
12665
12920
|
"name": "ComponentElement",
|
|
12666
12921
|
"module": "/src/components/component"
|
|
12667
12922
|
},
|
|
12923
|
+
"summary": "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",
|
|
12668
12924
|
"tagName": "pc-script",
|
|
12669
12925
|
"customElement": true,
|
|
12670
12926
|
"attributes": [
|
|
@@ -12906,6 +13162,7 @@
|
|
|
12906
13162
|
"name": "AsyncElement",
|
|
12907
13163
|
"module": "/src/async-element"
|
|
12908
13164
|
},
|
|
13165
|
+
"summary": "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",
|
|
12909
13166
|
"tagName": "pc-script-instance",
|
|
12910
13167
|
"customElement": true
|
|
12911
13168
|
}
|
|
@@ -13367,6 +13624,7 @@
|
|
|
13367
13624
|
"name": "ComponentElement",
|
|
13368
13625
|
"module": "/src/components/component"
|
|
13369
13626
|
},
|
|
13627
|
+
"summary": "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",
|
|
13370
13628
|
"tagName": "pc-scroll-view",
|
|
13371
13629
|
"customElement": true,
|
|
13372
13630
|
"events": [
|
|
@@ -13619,6 +13877,7 @@
|
|
|
13619
13877
|
"name": "ComponentElement",
|
|
13620
13878
|
"module": "/src/components/component"
|
|
13621
13879
|
},
|
|
13880
|
+
"summary": "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",
|
|
13622
13881
|
"tagName": "pc-scrollbar",
|
|
13623
13882
|
"customElement": true,
|
|
13624
13883
|
"events": [
|
|
@@ -13950,6 +14209,7 @@
|
|
|
13950
14209
|
"name": "ComponentElement",
|
|
13951
14210
|
"module": "/src/components/component"
|
|
13952
14211
|
},
|
|
14212
|
+
"summary": "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",
|
|
13953
14213
|
"tagName": "pc-sound",
|
|
13954
14214
|
"customElement": true,
|
|
13955
14215
|
"events": [
|
|
@@ -14286,6 +14546,7 @@
|
|
|
14286
14546
|
"name": "AsyncElement",
|
|
14287
14547
|
"module": "/src/async-element"
|
|
14288
14548
|
},
|
|
14549
|
+
"summary": "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",
|
|
14289
14550
|
"tagName": "pc-sound-slot",
|
|
14290
14551
|
"customElement": true,
|
|
14291
14552
|
"events": [
|
package/dist/entity-base.d.cts
CHANGED
|
@@ -48,7 +48,7 @@ declare class EntityBaseElement extends AsyncElement {
|
|
|
48
48
|
* Tracks whether an inline `onpointer*` attribute is present. The browser itself compiles and
|
|
49
49
|
* runs these attributes — they are standard `GlobalEventHandlers`, so setting one replaces
|
|
50
50
|
* the previous handler and removing it removes the handler, exactly like `onclick` on any
|
|
51
|
-
* HTML element. But because they bypass {@link addEventListener}, the connect/disconnect
|
|
51
|
+
* HTML element. But because they bypass {@link EventTarget.addEventListener}, the connect/disconnect
|
|
52
52
|
* bookkeeping that lets the application lazily attach its canvas pointer handlers must be
|
|
53
53
|
* kept in sync here.
|
|
54
54
|
*
|
package/dist/entity-base.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ declare class EntityBaseElement extends AsyncElement {
|
|
|
48
48
|
* Tracks whether an inline `onpointer*` attribute is present. The browser itself compiles and
|
|
49
49
|
* runs these attributes — they are standard `GlobalEventHandlers`, so setting one replaces
|
|
50
50
|
* the previous handler and removing it removes the handler, exactly like `onclick` on any
|
|
51
|
-
* HTML element. But because they bypass {@link addEventListener}, the connect/disconnect
|
|
51
|
+
* HTML element. But because they bypass {@link EventTarget.addEventListener}, the connect/disconnect
|
|
52
52
|
* bookkeeping that lets the application lazily attach its canvas pointer handlers must be
|
|
53
53
|
* kept in sync here.
|
|
54
54
|
*
|
package/dist/entity-owner.d.cts
CHANGED
|
@@ -33,7 +33,7 @@ declare class EntityOwnerElement extends EntityBaseElement {
|
|
|
33
33
|
*/
|
|
34
34
|
private _tags;
|
|
35
35
|
/**
|
|
36
|
-
* Whether the hierarchy has been built for this entity — set once
|
|
36
|
+
* Whether the hierarchy has been built for this entity — set once `_buildHierarchy` has
|
|
37
37
|
* parented it. Read by subclasses that gate work on the entity being in the scene graph.
|
|
38
38
|
*/
|
|
39
39
|
protected _built: boolean;
|
|
@@ -48,7 +48,7 @@ declare class EntityOwnerElement extends EntityBaseElement {
|
|
|
48
48
|
*/
|
|
49
49
|
protected _onEntityDestroy(entity: Entity): void;
|
|
50
50
|
/**
|
|
51
|
-
* Called by
|
|
51
|
+
* Called by `_buildHierarchy` once the backing entity has been parented — exactly once
|
|
52
52
|
* per build cycle. The default announces readiness, which is what a parented `<pc-entity>`
|
|
53
53
|
* means; `<pc-model>` overrides it to start loading content instead, because its readiness
|
|
54
54
|
* tracks the content settling rather than the host entering the scene graph.
|
package/dist/entity-owner.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare class EntityOwnerElement extends EntityBaseElement {
|
|
|
33
33
|
*/
|
|
34
34
|
private _tags;
|
|
35
35
|
/**
|
|
36
|
-
* Whether the hierarchy has been built for this entity — set once
|
|
36
|
+
* Whether the hierarchy has been built for this entity — set once `_buildHierarchy` has
|
|
37
37
|
* parented it. Read by subclasses that gate work on the entity being in the scene graph.
|
|
38
38
|
*/
|
|
39
39
|
protected _built: boolean;
|
|
@@ -48,7 +48,7 @@ declare class EntityOwnerElement extends EntityBaseElement {
|
|
|
48
48
|
*/
|
|
49
49
|
protected _onEntityDestroy(entity: Entity): void;
|
|
50
50
|
/**
|
|
51
|
-
* Called by
|
|
51
|
+
* Called by `_buildHierarchy` once the backing entity has been parented — exactly once
|
|
52
52
|
* per build cycle. The default announces readiness, which is what a parented `<pc-entity>`
|
|
53
53
|
* means; `<pc-model>` overrides it to start loading content instead, because its readiness
|
|
54
54
|
* tracks the content settling rather than the host entering the scene graph.
|