@playcanvas/web-components 0.11.1 → 0.12.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.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@playcanvas/web-components",
4
- "version": "0.11.1",
4
+ "version": "0.12.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "pc-app",
11
- "description": "The AppElement interface provides properties and methods for manipulating\n[`<pc-app>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/) elements.\nThe AppElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\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.",
11
+ "description": "The AppElement interface provides properties and methods for manipulating\n[`<pc-app>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/) elements.\nThe AppElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\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>` or `<pc-node>` element whose backing entity is `entity`, or\n`null` if the entity is not fronted by an element of this application - for example, an\nunbound node inside a model's instantiated hierarchy, or an entity created through the\nengine API.\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
12
12
  "doc-url": "",
13
13
  "attributes": [
14
14
  {
@@ -88,8 +88,8 @@
88
88
  },
89
89
  {
90
90
  "name": "closestEntity",
91
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
92
- "type": "EntityElement | null"
91
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
92
+ "type": "EntityBaseElement | null"
93
93
  },
94
94
  {
95
95
  "name": "depthBuffer",
@@ -129,9 +129,30 @@
129
129
  },
130
130
  {
131
131
  "name": "pc-asset",
132
- "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.",
132
+ "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\nFor `texture` and `textureatlas` assets, the texture options (`address-u`, `address-v`,\n`min-filter`, `mag-filter`, `anisotropy`, `mipmaps`, `srgb`, `flip-y`) apply when the texture is\ncreated and — like `lazy` — are observed: changing one updates a texture that has already\nloaded, and removing one restores the engine default. Changing `srgb` or `mipmaps` on a loaded\ntexture recreates the underlying GPU resource, so prefer declaring those up front. Each option\noverrides the matching key in the `data` JSON; options left unset write nothing, leaving the\nengine's per-format defaults in force.\n\nApart from `lazy` and the texture options, these attributes are read once when the asset is\ncreated, so changing them later has no effect.\n\n---\n\n\n### **Events:**\n - **error** - Fired when the asset fails to load, with the engine's error in `message`. Does not bubble. The element still becomes ready — readiness means the load settled, not that it succeeded.\n- **load** - Fired each time the asset finishes loading, including a `lazy` asset loaded later and any subsequent reloads. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor to observe every asset.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **get(id: _string_): __** - Returns the Asset created by the `<pc-asset>` element with the given `id`, or\n`undefined` if there is no such element or its asset has not been created yet.\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
133
133
  "doc-url": "",
134
134
  "attributes": [
135
+ {
136
+ "name": "address-u",
137
+ "description": "The texture's horizontal (U) address mode.",
138
+ "value": {
139
+ "type": "'repeat' | 'clamp' | 'mirror'",
140
+ "default": "repeat"
141
+ }
142
+ },
143
+ {
144
+ "name": "address-v",
145
+ "description": "The texture's vertical (V) address mode.",
146
+ "value": {
147
+ "type": "'repeat' | 'clamp' | 'mirror'",
148
+ "default": "repeat"
149
+ }
150
+ },
151
+ {
152
+ "name": "anisotropy",
153
+ "description": "The texture's maximum anisotropic filtering level.",
154
+ "value": { "type": "number", "default": "1" }
155
+ },
135
156
  {
136
157
  "name": "atlas",
137
158
  "description": "For a `sprite` asset, the `id` of the texture atlas asset it uses. The atlas must be declared before the sprite.",
@@ -142,6 +163,11 @@
142
163
  "description": "Additional asset data, as a JSON object.",
143
164
  "value": { "type": "string" }
144
165
  },
166
+ {
167
+ "name": "flip-y",
168
+ "description": "Whether the texture's image data is flipped vertically at upload.",
169
+ "value": { "type": "boolean", "default": "false" }
170
+ },
145
171
  {
146
172
  "name": "frame-keys",
147
173
  "description": "For a `sprite` asset, the atlas frame keys it uses, separated by spaces or commas.",
@@ -157,6 +183,24 @@
157
183
  "description": "Whether the asset should be loaded lazily.",
158
184
  "value": { "type": "boolean", "default": "false" }
159
185
  },
186
+ {
187
+ "name": "mag-filter",
188
+ "description": "The texture's magnification filter.",
189
+ "value": { "type": "'nearest' | 'linear'", "default": "linear" }
190
+ },
191
+ {
192
+ "name": "min-filter",
193
+ "description": "The texture's minification filter.",
194
+ "value": {
195
+ "type": "'nearest' | 'linear' | 'nearest-mip-nearest' | 'linear-mip-nearest' | 'nearest-mip-linear' | 'linear-mip-linear'",
196
+ "default": "linear-mip-linear"
197
+ }
198
+ },
199
+ {
200
+ "name": "mipmaps",
201
+ "description": "Whether the texture generates and uses mipmaps.",
202
+ "value": { "type": "boolean", "default": "true" }
203
+ },
160
204
  {
161
205
  "name": "pixels-per-unit",
162
206
  "description": "For a `sprite` asset, the number of pixels per world unit.",
@@ -172,6 +216,11 @@
172
216
  "description": "The URL of the asset to load.",
173
217
  "value": { "type": "string" }
174
218
  },
219
+ {
220
+ "name": "srgb",
221
+ "description": "Whether the texture holds sRGB (gamma-encoded) color data.",
222
+ "value": { "type": "boolean", "default": "false" }
223
+ },
175
224
  {
176
225
  "name": "type",
177
226
  "description": "The asset type. Inferred from the `src` file extension when omitted.",
@@ -197,6 +246,21 @@
197
246
  ],
198
247
  "js": {
199
248
  "properties": [
249
+ {
250
+ "name": "addressU",
251
+ "description": "Gets the texture's horizontal (U) address mode.",
252
+ "type": "AddressMode | null"
253
+ },
254
+ {
255
+ "name": "addressV",
256
+ "description": "Gets the texture's vertical (V) address mode.",
257
+ "type": "AddressMode | null"
258
+ },
259
+ {
260
+ "name": "anisotropy",
261
+ "description": "Gets the texture's maximum anisotropic filtering level.",
262
+ "type": "number | null"
263
+ },
200
264
  {
201
265
  "name": "asset",
202
266
  "description": "The asset that is loaded. Available once the element is ready — await\nwhenReady or the element's `ready()` promise before accessing it.",
@@ -209,12 +273,37 @@
209
273
  },
210
274
  {
211
275
  "name": "closestEntity",
212
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
213
- "type": "EntityElement | null"
276
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
277
+ "type": "EntityBaseElement | null"
278
+ },
279
+ {
280
+ "name": "flipY",
281
+ "description": "Gets whether the texture's image data is flipped vertically at upload.",
282
+ "type": "boolean | null"
214
283
  },
215
284
  {
216
285
  "name": "lazy",
217
286
  "description": "Gets whether the asset should be loaded lazily."
287
+ },
288
+ {
289
+ "name": "magFilter",
290
+ "description": "Gets the texture's magnification filter.",
291
+ "type": "MagFilterMode | null"
292
+ },
293
+ {
294
+ "name": "minFilter",
295
+ "description": "Gets the texture's minification filter.",
296
+ "type": "MinFilterMode | null"
297
+ },
298
+ {
299
+ "name": "mipmaps",
300
+ "description": "Gets whether the texture generates and uses mipmaps.",
301
+ "type": "boolean | null"
302
+ },
303
+ {
304
+ "name": "srgb",
305
+ "description": "Gets whether the texture holds sRGB (gamma-encoded) color data.",
306
+ "type": "boolean | null"
218
307
  }
219
308
  ],
220
309
  "events": [
@@ -338,8 +427,8 @@
338
427
  },
339
428
  {
340
429
  "name": "closestEntity",
341
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
342
- "type": "EntityElement | null"
430
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
431
+ "type": "EntityBaseElement | null"
343
432
  },
344
433
  {
345
434
  "name": "enabled",
@@ -347,7 +436,7 @@
347
436
  },
348
437
  {
349
438
  "name": "entity",
350
- "description": "The PlayCanvas entity instance. `null` until the element is ready, and again once it has\nbeen removed from the document — await whenReady or the element's `ready()`\npromise before accessing it.",
439
+ "description": "The PlayCanvas entity instance. `null` until the element is ready, and again once the\nentity is gone — await whenReady or the element's `ready()` promise before\naccessing it.",
351
440
  "type": "Entity | null"
352
441
  },
353
442
  { "name": "name", "description": "Gets the name of the entity." },
@@ -1185,7 +1274,7 @@
1185
1274
  },
1186
1275
  {
1187
1276
  "name": "pc-model",
1188
- "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.",
1277
+ "description": "The ModelElement interface provides properties and methods for manipulating\n[`<pc-model>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-model/) elements.\nThe ModelElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe element becomes ready once its container asset has loaded and the instantiated hierarchy has\nbeen added to the scene — `entity` is non-null by then. A failed load also settles readiness,\nwith `entity` remaining `null`: readiness means the load settled, not that it succeeded — listen\nfor `error`, or check `entity`, to tell the outcomes apart. Changing `asset` re-arms readiness\nand instantiates anew, so a `ready()` obtained after the change resolves against the new\nhierarchy. A `pc-model` outside a `pc-app`, or referencing an unknown asset id, warns and never\nbecomes ready.\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- **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.",
1189
1278
  "doc-url": "",
1190
1279
  "attributes": [
1191
1280
  {
@@ -1195,6 +1284,16 @@
1195
1284
  }
1196
1285
  ],
1197
1286
  "events": [
1287
+ {
1288
+ "name": "error",
1289
+ "type": "ErrorEvent",
1290
+ "description": "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."
1291
+ },
1292
+ {
1293
+ "name": "load",
1294
+ "type": "Event",
1295
+ "description": "Fired each time a container asset finishes instantiating, including re-instantiation after `asset` changes. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor."
1296
+ },
1198
1297
  {
1199
1298
  "name": "ready",
1200
1299
  "type": "CustomEvent",
@@ -1215,8 +1314,8 @@
1215
1314
  },
1216
1315
  {
1217
1316
  "name": "closestEntity",
1218
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
1219
- "type": "EntityElement | null"
1317
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
1318
+ "type": "EntityBaseElement | null"
1220
1319
  },
1221
1320
  {
1222
1321
  "name": "entity",
@@ -1225,6 +1324,16 @@
1225
1324
  }
1226
1325
  ],
1227
1326
  "events": [
1327
+ {
1328
+ "name": "error",
1329
+ "type": "ErrorEvent",
1330
+ "description": "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."
1331
+ },
1332
+ {
1333
+ "name": "load",
1334
+ "type": "Event",
1335
+ "description": "Fired each time a container asset finishes instantiating, including re-instantiation after `asset` changes. Does not bubble — listen on this element, or use a capture-phase listener on an ancestor."
1336
+ },
1228
1337
  {
1229
1338
  "name": "ready",
1230
1339
  "type": "CustomEvent",
@@ -1262,6 +1371,201 @@
1262
1371
  "events": [],
1263
1372
  "js": { "properties": [], "events": [] }
1264
1373
  },
1374
+ {
1375
+ "name": "pc-node",
1376
+ "description": "The NodeElement interface provides properties and methods for manipulating\n[`<pc-node>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-node/)\nelements. The NodeElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nA `pc-node` is an override element: where `pc-entity` creates an entity, `pc-node` binds to a\nnode a `pc-model` loaded and declares overrides against the authored asset — components to\nadd, properties to change, content to attach. Attributes present apply as overrides; attributes\nabsent leave authored values untouched, and removing an attribute (or assigning `null` to the\nmatching property) restores the authored value.\n\n`name` selects among the host model's nodes (first match in depth-first order), nesting a\n`pc-node` inside another scopes the search to that subtree, and `index` picks among identically\nnamed matches. When `name` matches more than one node and no `index` is given, the element\nwarns and binds nothing.\n\nThe element becomes ready once bound, and never while unresolved — a missing or ambiguous\nname warns and records the failure in `state`, readiness stays unresolved, and descendants\nwait with it.\n\nThe pointer events below are dispatched by the containing `<pc-app>` element when the pointer\nintersects the bound node's geometry, exactly as for `<pc-entity>`.\n\n---\n\n\n### **Events:**\n - **pointerdown** - Fired when a pointer button is pressed over the node.\n- **pointerenter** - Fired when the pointer moves onto the node.\n- **pointerleave** - Fired when the pointer moves off the node.\n- **pointermove** - Fired when the pointer moves over the node.\n- **pointerup** - Fired when a pointer button is released over the node.\n- **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
1377
+ "doc-url": "",
1378
+ "attributes": [
1379
+ {
1380
+ "name": "enabled",
1381
+ "description": "Overrides the node's enabled state.",
1382
+ "value": { "type": "string" }
1383
+ },
1384
+ {
1385
+ "name": "index",
1386
+ "description": "Which match to bind when `name` matches more than one node, 0-based in depth-first order. Optional for a unique match; required for an ambiguous one.",
1387
+ "value": { "type": "string" }
1388
+ },
1389
+ {
1390
+ "name": "name",
1391
+ "description": "The name of the node to bind, resolved within the nearest ancestor `pc-model` (or `pc-node`) once it has instantiated.",
1392
+ "value": { "type": "string" }
1393
+ },
1394
+ {
1395
+ "name": "onpointerdown",
1396
+ "description": "Script to run when a pointer button is pressed over the node.",
1397
+ "value": { "type": "string" }
1398
+ },
1399
+ {
1400
+ "name": "onpointerenter",
1401
+ "description": "Script to run when the pointer moves onto the node.",
1402
+ "value": { "type": "string" }
1403
+ },
1404
+ {
1405
+ "name": "onpointerleave",
1406
+ "description": "Script to run when the pointer moves off the node.",
1407
+ "value": { "type": "string" }
1408
+ },
1409
+ {
1410
+ "name": "onpointermove",
1411
+ "description": "Script to run when the pointer moves over the node.",
1412
+ "value": { "type": "string" }
1413
+ },
1414
+ {
1415
+ "name": "onpointerup",
1416
+ "description": "Script to run when a pointer button is released over the node.",
1417
+ "value": { "type": "string" }
1418
+ },
1419
+ {
1420
+ "name": "position",
1421
+ "description": "Overrides the node's local position, as an \"x y z\" triple.",
1422
+ "value": { "type": "string" }
1423
+ },
1424
+ {
1425
+ "name": "rotation",
1426
+ "description": "Overrides the node's local rotation (Euler angles), as an \"x y z\" triple.",
1427
+ "value": { "type": "string" }
1428
+ },
1429
+ {
1430
+ "name": "scale",
1431
+ "description": "Overrides the node's local scale, as an \"x y z\" triple.",
1432
+ "value": { "type": "string" }
1433
+ },
1434
+ {
1435
+ "name": "tags",
1436
+ "description": "Overrides the node's tags, separated by spaces or commas.",
1437
+ "value": { "type": "string" }
1438
+ }
1439
+ ],
1440
+ "events": [
1441
+ {
1442
+ "name": "pointerdown",
1443
+ "type": "PointerEvent",
1444
+ "description": "Fired when a pointer button is pressed over the node."
1445
+ },
1446
+ {
1447
+ "name": "pointerenter",
1448
+ "type": "PointerEvent",
1449
+ "description": "Fired when the pointer moves onto the node."
1450
+ },
1451
+ {
1452
+ "name": "pointerleave",
1453
+ "type": "PointerEvent",
1454
+ "description": "Fired when the pointer moves off the node."
1455
+ },
1456
+ {
1457
+ "name": "pointermove",
1458
+ "type": "PointerEvent",
1459
+ "description": "Fired when the pointer moves over the node."
1460
+ },
1461
+ {
1462
+ "name": "pointerup",
1463
+ "type": "PointerEvent",
1464
+ "description": "Fired when a pointer button is released over the node."
1465
+ },
1466
+ {
1467
+ "name": "ready",
1468
+ "type": "CustomEvent",
1469
+ "description": "Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed."
1470
+ }
1471
+ ],
1472
+ "js": {
1473
+ "properties": [
1474
+ {
1475
+ "name": "closestApp",
1476
+ "description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
1477
+ "type": "AppElement | null"
1478
+ },
1479
+ {
1480
+ "name": "closestEntity",
1481
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
1482
+ "type": "EntityBaseElement | null"
1483
+ },
1484
+ {
1485
+ "name": "enabled",
1486
+ "description": "Gets the enabled override.",
1487
+ "type": "boolean | null"
1488
+ },
1489
+ {
1490
+ "name": "entity",
1491
+ "description": "The PlayCanvas entity instance. `null` until the element is ready, and again once the\nentity is gone — await whenReady or the element's `ready()` promise before\naccessing it.",
1492
+ "type": "Entity | null"
1493
+ },
1494
+ {
1495
+ "name": "index",
1496
+ "description": "Gets which match to bind.",
1497
+ "type": "number | null"
1498
+ },
1499
+ {
1500
+ "name": "name",
1501
+ "description": "Gets the name of the node to bind.",
1502
+ "type": "string"
1503
+ },
1504
+ {
1505
+ "name": "path",
1506
+ "description": "The path of the bound node below the search root, `/`-separated, or `null` while not\nbound.",
1507
+ "type": "string | null"
1508
+ },
1509
+ {
1510
+ "name": "position",
1511
+ "description": "Gets the local position override.",
1512
+ "type": "Vec3 | null"
1513
+ },
1514
+ {
1515
+ "name": "rotation",
1516
+ "description": "Gets the local rotation override.",
1517
+ "type": "Vec3 | null"
1518
+ },
1519
+ {
1520
+ "name": "scale",
1521
+ "description": "Gets the local scale override.",
1522
+ "type": "Vec3 | null"
1523
+ },
1524
+ {
1525
+ "name": "state",
1526
+ "description": "The binding state: `pending` until the host instantiates and `name` resolves, `bound`\nonce decorated, `missing`/`ambiguous`/`duplicate` when resolution failed (each also\nwarns). Useful for asserting a document's bindings programmatically.",
1527
+ "type": "NodeBindingState"
1528
+ },
1529
+ {
1530
+ "name": "tags",
1531
+ "description": "Gets the tags override.",
1532
+ "type": "string[] | null"
1533
+ }
1534
+ ],
1535
+ "events": [
1536
+ {
1537
+ "name": "pointerdown",
1538
+ "type": "PointerEvent",
1539
+ "description": "Fired when a pointer button is pressed over the node."
1540
+ },
1541
+ {
1542
+ "name": "pointerenter",
1543
+ "type": "PointerEvent",
1544
+ "description": "Fired when the pointer moves onto the node."
1545
+ },
1546
+ {
1547
+ "name": "pointerleave",
1548
+ "type": "PointerEvent",
1549
+ "description": "Fired when the pointer moves off the node."
1550
+ },
1551
+ {
1552
+ "name": "pointermove",
1553
+ "type": "PointerEvent",
1554
+ "description": "Fired when the pointer moves over the node."
1555
+ },
1556
+ {
1557
+ "name": "pointerup",
1558
+ "type": "PointerEvent",
1559
+ "description": "Fired when a pointer button is released over the node."
1560
+ },
1561
+ {
1562
+ "name": "ready",
1563
+ "type": "CustomEvent",
1564
+ "description": "Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed."
1565
+ }
1566
+ ]
1567
+ }
1568
+ },
1265
1569
  {
1266
1570
  "name": "pc-scene",
1267
1571
  "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.",
@@ -1317,8 +1621,8 @@
1317
1621
  },
1318
1622
  {
1319
1623
  "name": "closestEntity",
1320
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
1321
- "type": "EntityElement | null"
1624
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
1625
+ "type": "EntityBaseElement | null"
1322
1626
  },
1323
1627
  {
1324
1628
  "name": "fog",
@@ -1432,8 +1736,8 @@
1432
1736
  },
1433
1737
  {
1434
1738
  "name": "closestEntity",
1435
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
1436
- "type": "EntityElement | null"
1739
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
1740
+ "type": "EntityBaseElement | null"
1437
1741
  },
1438
1742
  {
1439
1743
  "name": "intensity",
@@ -1567,8 +1871,8 @@
1567
1871
  },
1568
1872
  {
1569
1873
  "name": "closestEntity",
1570
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
1571
- "type": "EntityElement | null"
1874
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
1875
+ "type": "EntityBaseElement | null"
1572
1876
  },
1573
1877
  {
1574
1878
  "name": "component",
@@ -1784,8 +2088,8 @@
1784
2088
  },
1785
2089
  {
1786
2090
  "name": "closestEntity",
1787
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
1788
- "type": "EntityElement | null"
2091
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
2092
+ "type": "EntityBaseElement | null"
1789
2093
  },
1790
2094
  {
1791
2095
  "name": "component",
@@ -1877,7 +2181,7 @@
1877
2181
  },
1878
2182
  {
1879
2183
  "name": "pc-collision",
1880
- "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.",
2184
+ "description": "The CollisionComponentElement interface provides properties and methods for manipulating\n[`<pc-collision>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-collision/) elements.\nThe CollisionComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nFor `type=\"mesh\"`, the collision geometry defaults to the host entity's own render component\n(its render asset) — a collider matching the visible mesh, which is what a mesh collider on a\nglTF node means. The default resolves each time the component applies, so a `pc-node` that\nretargets or rebinds picks up the new node's geometry. An entity with no asset-backed render\ncomponent warns, and the collider has no shape.\n\n---\n\n\n### **Events:**\n - **ready** - Fired when the element is fully initialized — once per readiness cycle, so an element that is torn down and re-initialized (for example by removing and re-inserting it) fires it again. Bubbles and is composed.\n\n### **Methods:**\n - **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.\n\nReadiness tracks the element's current lifecycle: once a ready element is torn down (for\nexample by removing it from the document), this returns a fresh promise that resolves when\nthe element is next ready. A promise obtained earlier stays resolved — call this again\nafter re-inserting an element rather than reusing a promise from before its removal.",
1881
2185
  "doc-url": "",
1882
2186
  "attributes": [
1883
2187
  {
@@ -1936,8 +2240,8 @@
1936
2240
  },
1937
2241
  {
1938
2242
  "name": "closestEntity",
1939
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
1940
- "type": "EntityElement | null"
2243
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
2244
+ "type": "EntityBaseElement | null"
1941
2245
  },
1942
2246
  {
1943
2247
  "name": "component",
@@ -2144,8 +2448,8 @@
2144
2448
  },
2145
2449
  {
2146
2450
  "name": "closestEntity",
2147
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
2148
- "type": "EntityElement | null"
2451
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
2452
+ "type": "EntityBaseElement | null"
2149
2453
  },
2150
2454
  {
2151
2455
  "name": "color",
@@ -2316,8 +2620,8 @@
2316
2620
  },
2317
2621
  {
2318
2622
  "name": "closestEntity",
2319
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
2320
- "type": "EntityElement | null"
2623
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
2624
+ "type": "EntityBaseElement | null"
2321
2625
  },
2322
2626
  {
2323
2627
  "name": "component",
@@ -2416,8 +2720,8 @@
2416
2720
  },
2417
2721
  {
2418
2722
  "name": "closestEntity",
2419
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
2420
- "type": "EntityElement | null"
2723
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
2724
+ "type": "EntityBaseElement | null"
2421
2725
  },
2422
2726
  {
2423
2727
  "name": "component",
@@ -2551,8 +2855,8 @@
2551
2855
  },
2552
2856
  {
2553
2857
  "name": "closestEntity",
2554
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
2555
- "type": "EntityElement | null"
2858
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
2859
+ "type": "EntityBaseElement | null"
2556
2860
  },
2557
2861
  {
2558
2862
  "name": "component",
@@ -2737,8 +3041,8 @@
2737
3041
  },
2738
3042
  {
2739
3043
  "name": "closestEntity",
2740
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
2741
- "type": "EntityElement | null"
3044
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3045
+ "type": "EntityBaseElement | null"
2742
3046
  },
2743
3047
  {
2744
3048
  "name": "color",
@@ -2855,8 +3159,8 @@
2855
3159
  },
2856
3160
  {
2857
3161
  "name": "closestEntity",
2858
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
2859
- "type": "EntityElement | null"
3162
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3163
+ "type": "EntityBaseElement | null"
2860
3164
  },
2861
3165
  {
2862
3166
  "name": "component",
@@ -2914,8 +3218,8 @@
2914
3218
  },
2915
3219
  {
2916
3220
  "name": "closestEntity",
2917
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
2918
- "type": "EntityElement | null"
3221
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3222
+ "type": "EntityBaseElement | null"
2919
3223
  },
2920
3224
  {
2921
3225
  "name": "component",
@@ -2991,8 +3295,8 @@
2991
3295
  },
2992
3296
  {
2993
3297
  "name": "closestEntity",
2994
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
2995
- "type": "EntityElement | null"
3298
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3299
+ "type": "EntityBaseElement | null"
2996
3300
  },
2997
3301
  {
2998
3302
  "name": "component",
@@ -3094,8 +3398,8 @@
3094
3398
  },
3095
3399
  {
3096
3400
  "name": "closestEntity",
3097
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
3098
- "type": "EntityElement | null"
3401
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3402
+ "type": "EntityBaseElement | null"
3099
3403
  },
3100
3404
  {
3101
3405
  "name": "component",
@@ -3178,8 +3482,8 @@
3178
3482
  },
3179
3483
  {
3180
3484
  "name": "closestEntity",
3181
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
3182
- "type": "EntityElement | null"
3485
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3486
+ "type": "EntityBaseElement | null"
3183
3487
  },
3184
3488
  {
3185
3489
  "name": "component",
@@ -3239,8 +3543,8 @@
3239
3543
  },
3240
3544
  {
3241
3545
  "name": "closestEntity",
3242
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
3243
- "type": "EntityElement | null"
3546
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3547
+ "type": "EntityBaseElement | null"
3244
3548
  },
3245
3549
  {
3246
3550
  "name": "component",
@@ -3313,8 +3617,8 @@
3313
3617
  },
3314
3618
  {
3315
3619
  "name": "closestEntity",
3316
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
3317
- "type": "EntityElement | null"
3620
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3621
+ "type": "EntityBaseElement | null"
3318
3622
  },
3319
3623
  {
3320
3624
  "name": "enabled",
@@ -3406,8 +3710,8 @@
3406
3710
  },
3407
3711
  {
3408
3712
  "name": "closestEntity",
3409
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
3410
- "type": "EntityElement | null"
3713
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3714
+ "type": "EntityBaseElement | null"
3411
3715
  },
3412
3716
  {
3413
3717
  "name": "component",
@@ -3549,8 +3853,8 @@
3549
3853
  },
3550
3854
  {
3551
3855
  "name": "closestEntity",
3552
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
3553
- "type": "EntityElement | null"
3856
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3857
+ "type": "EntityBaseElement | null"
3554
3858
  },
3555
3859
  {
3556
3860
  "name": "component",
@@ -3681,8 +3985,8 @@
3681
3985
  },
3682
3986
  {
3683
3987
  "name": "closestEntity",
3684
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
3685
- "type": "EntityElement | null"
3988
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
3989
+ "type": "EntityBaseElement | null"
3686
3990
  },
3687
3991
  {
3688
3992
  "name": "component",
@@ -3807,8 +4111,8 @@
3807
4111
  },
3808
4112
  {
3809
4113
  "name": "closestEntity",
3810
- "description": "The nearest ancestor `<pc-entity>` element, or `null` if this element has no `<pc-entity>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
3811
- "type": "EntityElement | null"
4114
+ "description": "The nearest ancestor element that fronts an entity — `<pc-entity>` or `<pc-node>` — or\n`null` if this element has no such ancestor. The search starts at the parent, so an element\nnever resolves to itself.",
4115
+ "type": "EntityBaseElement | null"
3812
4116
  },
3813
4117
  {
3814
4118
  "name": "duration",