@playcanvas/web-components 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.cts +24 -3
- package/dist/app.d.ts +24 -3
- package/dist/components/anim-clip.d.cts +0 -2
- package/dist/components/anim-clip.d.ts +0 -2
- package/dist/custom-elements.json +72 -2
- package/dist/entity-base.d.cts +4 -3
- package/dist/entity-base.d.ts +4 -3
- package/dist/entity.d.cts +8 -2
- package/dist/entity.d.ts +8 -2
- package/dist/model.d.cts +6 -0
- package/dist/model.d.ts +6 -0
- package/dist/node.d.cts +6 -0
- package/dist/node.d.ts +6 -0
- package/dist/pwc.cjs +322 -183
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +322 -183
- 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 +322 -183
- package/dist/pwc.mjs.map +1 -1
- package/dist/scene.d.cts +17 -1
- package/dist/scene.d.ts +17 -1
- package/dist/vscode.html-custom-data.json +24 -4
- package/dist/web-types.json +59 -5
- package/package.json +3 -3
- package/src/app.ts +146 -71
- package/src/components/anim-clip.ts +0 -2
- package/src/entity-base.ts +27 -15
- package/src/entity.ts +11 -4
- package/src/model.ts +9 -2
- package/src/node.ts +9 -2
- package/src/scene.ts +33 -2
package/dist/scene.d.cts
CHANGED
|
@@ -8,9 +8,14 @@ import { AsyncElement } from './async-element.cjs';
|
|
|
8
8
|
* {@link HTMLElement} interface.
|
|
9
9
|
*
|
|
10
10
|
* @elementSummary The `<pc-scene>` element holds the entity hierarchy the application renders,
|
|
11
|
-
* along with the scene-wide fog and gravity settings. Must be a direct child of
|
|
11
|
+
* along with the scene-wide fog, exposure and gravity settings. Must be a direct child of
|
|
12
|
+
* `<pc-app>`.
|
|
12
13
|
*/
|
|
13
14
|
declare class SceneElement extends AsyncElement {
|
|
15
|
+
/**
|
|
16
|
+
* The exposure of the scene.
|
|
17
|
+
*/
|
|
18
|
+
private _exposure;
|
|
14
19
|
/**
|
|
15
20
|
* The fog type of the scene.
|
|
16
21
|
*/
|
|
@@ -53,6 +58,17 @@ declare class SceneElement extends AsyncElement {
|
|
|
53
58
|
* @param value - The gravity to apply.
|
|
54
59
|
*/
|
|
55
60
|
private _applyGravity;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the exposure of the scene, which tweaks the overall brightness of the rendered image.
|
|
63
|
+
* Ignored if the scene is using physical units. Defaults to 1.
|
|
64
|
+
* @param value - The exposure.
|
|
65
|
+
*/
|
|
66
|
+
set exposure(value: number);
|
|
67
|
+
/**
|
|
68
|
+
* Gets the exposure of the scene.
|
|
69
|
+
* @returns The exposure.
|
|
70
|
+
*/
|
|
71
|
+
get exposure(): number;
|
|
56
72
|
/**
|
|
57
73
|
* Sets the fog type of the scene. Can be `none`, `linear`, `exp` or `exp2`. Defaults to
|
|
58
74
|
* `none`.
|
package/dist/scene.d.ts
CHANGED
|
@@ -8,9 +8,14 @@ import { AsyncElement } from './async-element.js';
|
|
|
8
8
|
* {@link HTMLElement} interface.
|
|
9
9
|
*
|
|
10
10
|
* @elementSummary The `<pc-scene>` element holds the entity hierarchy the application renders,
|
|
11
|
-
* along with the scene-wide fog and gravity settings. Must be a direct child of
|
|
11
|
+
* along with the scene-wide fog, exposure and gravity settings. Must be a direct child of
|
|
12
|
+
* `<pc-app>`.
|
|
12
13
|
*/
|
|
13
14
|
declare class SceneElement extends AsyncElement {
|
|
15
|
+
/**
|
|
16
|
+
* The exposure of the scene.
|
|
17
|
+
*/
|
|
18
|
+
private _exposure;
|
|
14
19
|
/**
|
|
15
20
|
* The fog type of the scene.
|
|
16
21
|
*/
|
|
@@ -53,6 +58,17 @@ declare class SceneElement extends AsyncElement {
|
|
|
53
58
|
* @param value - The gravity to apply.
|
|
54
59
|
*/
|
|
55
60
|
private _applyGravity;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the exposure of the scene, which tweaks the overall brightness of the rendered image.
|
|
63
|
+
* Ignored if the scene is using physical units. Defaults to 1.
|
|
64
|
+
* @param value - The exposure.
|
|
65
|
+
*/
|
|
66
|
+
set exposure(value: number);
|
|
67
|
+
/**
|
|
68
|
+
* Gets the exposure of the scene.
|
|
69
|
+
* @returns The exposure.
|
|
70
|
+
*/
|
|
71
|
+
get exposure(): number;
|
|
56
72
|
/**
|
|
57
73
|
* Sets the fog type of the scene. Can be `none`, `linear`, `exp` or `exp2`. Defaults to
|
|
58
74
|
* `none`.
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
"name": "pc-entity",
|
|
174
|
-
"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.",
|
|
174
|
+
"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 - **click** - Fired when a primary pointer button is pressed and then released over the entity. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2.\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.",
|
|
175
175
|
"attributes": [
|
|
176
176
|
{
|
|
177
177
|
"name": "enabled",
|
|
@@ -183,6 +183,11 @@
|
|
|
183
183
|
"description": "The name of the entity.",
|
|
184
184
|
"values": []
|
|
185
185
|
},
|
|
186
|
+
{
|
|
187
|
+
"name": "onclick",
|
|
188
|
+
"description": "Script to run when the entity is clicked: a primary pointer button pressed and then released over it.",
|
|
189
|
+
"values": []
|
|
190
|
+
},
|
|
186
191
|
{
|
|
187
192
|
"name": "onpointerdown",
|
|
188
193
|
"description": "Script to run when a pointer button is pressed over the entity.",
|
|
@@ -723,7 +728,7 @@
|
|
|
723
728
|
},
|
|
724
729
|
{
|
|
725
730
|
"name": "pc-model",
|
|
726
|
-
"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.",
|
|
731
|
+
"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 - **click** - Fired when a primary pointer button is pressed and then released over the model. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2.\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.",
|
|
727
732
|
"attributes": [
|
|
728
733
|
{
|
|
729
734
|
"name": "asset",
|
|
@@ -740,6 +745,11 @@
|
|
|
740
745
|
"description": "The name of the model.",
|
|
741
746
|
"values": []
|
|
742
747
|
},
|
|
748
|
+
{
|
|
749
|
+
"name": "onclick",
|
|
750
|
+
"description": "Script to run when the model is clicked: a primary pointer button pressed and then released over it.",
|
|
751
|
+
"values": []
|
|
752
|
+
},
|
|
743
753
|
{
|
|
744
754
|
"name": "onpointerdown",
|
|
745
755
|
"description": "Script to run when a pointer button is pressed over the model.",
|
|
@@ -795,7 +805,7 @@
|
|
|
795
805
|
},
|
|
796
806
|
{
|
|
797
807
|
"name": "pc-node",
|
|
798
|
-
"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.",
|
|
808
|
+
"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 - **click** - Fired when a primary pointer button is pressed and then released over the node. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2.\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.",
|
|
799
809
|
"attributes": [
|
|
800
810
|
{
|
|
801
811
|
"name": "enabled",
|
|
@@ -817,6 +827,11 @@
|
|
|
817
827
|
"description": "The name of the node to bind, resolved within the nearest ancestor `pc-model` (or `pc-node`) once it has instantiated.",
|
|
818
828
|
"values": []
|
|
819
829
|
},
|
|
830
|
+
{
|
|
831
|
+
"name": "onclick",
|
|
832
|
+
"description": "Script to run when the node is clicked: a primary pointer button pressed and then released over it.",
|
|
833
|
+
"values": []
|
|
834
|
+
},
|
|
820
835
|
{
|
|
821
836
|
"name": "onpointerdown",
|
|
822
837
|
"description": "Script to run when a pointer button is pressed over the node.",
|
|
@@ -872,8 +887,13 @@
|
|
|
872
887
|
},
|
|
873
888
|
{
|
|
874
889
|
"name": "pc-scene",
|
|
875
|
-
"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
|
|
890
|
+
"description": "The `<pc-scene>` element holds the entity hierarchy the application renders,\nalong with the scene-wide fog, exposure and gravity settings. Must be a direct child of\n`<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.",
|
|
876
891
|
"attributes": [
|
|
892
|
+
{
|
|
893
|
+
"name": "exposure",
|
|
894
|
+
"description": "The exposure of the scene.",
|
|
895
|
+
"values": []
|
|
896
|
+
},
|
|
877
897
|
{
|
|
878
898
|
"name": "fog",
|
|
879
899
|
"description": "The fog type of the scene.",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.19.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
339
|
"name": "pc-entity",
|
|
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.",
|
|
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 - **click** - Fired when a primary pointer button is pressed and then released over the entity. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2.\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
341
|
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-entity/",
|
|
342
342
|
"attributes": [
|
|
343
343
|
{
|
|
@@ -350,6 +350,11 @@
|
|
|
350
350
|
"description": "The name of the entity.",
|
|
351
351
|
"value": { "type": "string" }
|
|
352
352
|
},
|
|
353
|
+
{
|
|
354
|
+
"name": "onclick",
|
|
355
|
+
"description": "Script to run when the entity is clicked: a primary pointer button pressed and then released over it.",
|
|
356
|
+
"value": { "type": "string" }
|
|
357
|
+
},
|
|
353
358
|
{
|
|
354
359
|
"name": "onpointerdown",
|
|
355
360
|
"description": "Script to run when a pointer button is pressed over the entity.",
|
|
@@ -397,6 +402,11 @@
|
|
|
397
402
|
}
|
|
398
403
|
],
|
|
399
404
|
"events": [
|
|
405
|
+
{
|
|
406
|
+
"name": "click",
|
|
407
|
+
"type": "PointerEvent",
|
|
408
|
+
"description": "Fired when a primary pointer button is pressed and then released over the entity. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
|
|
409
|
+
},
|
|
400
410
|
{
|
|
401
411
|
"name": "pointerdown",
|
|
402
412
|
"type": "PointerEvent",
|
|
@@ -465,6 +475,11 @@
|
|
|
465
475
|
{ "name": "tags", "description": "Gets the tags of the entity." }
|
|
466
476
|
],
|
|
467
477
|
"events": [
|
|
478
|
+
{
|
|
479
|
+
"name": "click",
|
|
480
|
+
"type": "PointerEvent",
|
|
481
|
+
"description": "Fired when a primary pointer button is pressed and then released over the entity. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
|
|
482
|
+
},
|
|
468
483
|
{
|
|
469
484
|
"name": "pointerdown",
|
|
470
485
|
"type": "PointerEvent",
|
|
@@ -1293,7 +1308,7 @@
|
|
|
1293
1308
|
},
|
|
1294
1309
|
{
|
|
1295
1310
|
"name": "pc-model",
|
|
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.",
|
|
1311
|
+
"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 - **click** - Fired when a primary pointer button is pressed and then released over the model. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2.\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
1312
|
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-model/",
|
|
1298
1313
|
"attributes": [
|
|
1299
1314
|
{
|
|
@@ -1311,6 +1326,11 @@
|
|
|
1311
1326
|
"description": "The name of the model.",
|
|
1312
1327
|
"value": { "type": "string" }
|
|
1313
1328
|
},
|
|
1329
|
+
{
|
|
1330
|
+
"name": "onclick",
|
|
1331
|
+
"description": "Script to run when the model is clicked: a primary pointer button pressed and then released over it.",
|
|
1332
|
+
"value": { "type": "string" }
|
|
1333
|
+
},
|
|
1314
1334
|
{
|
|
1315
1335
|
"name": "onpointerdown",
|
|
1316
1336
|
"description": "Script to run when a pointer button is pressed over the model.",
|
|
@@ -1358,6 +1378,11 @@
|
|
|
1358
1378
|
}
|
|
1359
1379
|
],
|
|
1360
1380
|
"events": [
|
|
1381
|
+
{
|
|
1382
|
+
"name": "click",
|
|
1383
|
+
"type": "PointerEvent",
|
|
1384
|
+
"description": "Fired when a primary pointer button is pressed and then released over the model. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
|
|
1385
|
+
},
|
|
1361
1386
|
{
|
|
1362
1387
|
"name": "error",
|
|
1363
1388
|
"type": "ErrorEvent",
|
|
@@ -1446,6 +1471,11 @@
|
|
|
1446
1471
|
{ "name": "tags", "description": "Gets the tags of the entity." }
|
|
1447
1472
|
],
|
|
1448
1473
|
"events": [
|
|
1474
|
+
{
|
|
1475
|
+
"name": "click",
|
|
1476
|
+
"type": "PointerEvent",
|
|
1477
|
+
"description": "Fired when a primary pointer button is pressed and then released over the model. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
|
|
1478
|
+
},
|
|
1449
1479
|
{
|
|
1450
1480
|
"name": "error",
|
|
1451
1481
|
"type": "ErrorEvent",
|
|
@@ -1491,7 +1521,7 @@
|
|
|
1491
1521
|
},
|
|
1492
1522
|
{
|
|
1493
1523
|
"name": "pc-node",
|
|
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.",
|
|
1524
|
+
"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 - **click** - Fired when a primary pointer button is pressed and then released over the node. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2.\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
1525
|
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-node/",
|
|
1496
1526
|
"attributes": [
|
|
1497
1527
|
{
|
|
@@ -1514,6 +1544,11 @@
|
|
|
1514
1544
|
"description": "The name of the node to bind, resolved within the nearest ancestor `pc-model` (or `pc-node`) once it has instantiated.",
|
|
1515
1545
|
"value": { "type": "string" }
|
|
1516
1546
|
},
|
|
1547
|
+
{
|
|
1548
|
+
"name": "onclick",
|
|
1549
|
+
"description": "Script to run when the node is clicked: a primary pointer button pressed and then released over it.",
|
|
1550
|
+
"value": { "type": "string" }
|
|
1551
|
+
},
|
|
1517
1552
|
{
|
|
1518
1553
|
"name": "onpointerdown",
|
|
1519
1554
|
"description": "Script to run when a pointer button is pressed over the node.",
|
|
@@ -1561,6 +1596,11 @@
|
|
|
1561
1596
|
}
|
|
1562
1597
|
],
|
|
1563
1598
|
"events": [
|
|
1599
|
+
{
|
|
1600
|
+
"name": "click",
|
|
1601
|
+
"type": "PointerEvent",
|
|
1602
|
+
"description": "Fired when a primary pointer button is pressed and then released over the node. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
|
|
1603
|
+
},
|
|
1564
1604
|
{
|
|
1565
1605
|
"name": "pointerdown",
|
|
1566
1606
|
"type": "PointerEvent",
|
|
@@ -1661,6 +1701,11 @@
|
|
|
1661
1701
|
}
|
|
1662
1702
|
],
|
|
1663
1703
|
"events": [
|
|
1704
|
+
{
|
|
1705
|
+
"name": "click",
|
|
1706
|
+
"type": "PointerEvent",
|
|
1707
|
+
"description": "Fired when a primary pointer button is pressed and then released over the node. A press and release that picked different entities fires on their nearest common ancestor instead, as in the DOM. `detail` carries the click count, so a double click arrives as a click whose `detail` is 2."
|
|
1708
|
+
},
|
|
1664
1709
|
{
|
|
1665
1710
|
"name": "pointerdown",
|
|
1666
1711
|
"type": "PointerEvent",
|
|
@@ -1696,9 +1741,14 @@
|
|
|
1696
1741
|
},
|
|
1697
1742
|
{
|
|
1698
1743
|
"name": "pc-scene",
|
|
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
|
|
1744
|
+
"description": "The `<pc-scene>` element holds the entity hierarchy the application renders,\nalong with the scene-wide fog, exposure and gravity settings. Must be a direct child of\n`<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
1745
|
"doc-url": "https://developer.playcanvas.com/user-manual/web-components/tags/pc-scene/",
|
|
1701
1746
|
"attributes": [
|
|
1747
|
+
{
|
|
1748
|
+
"name": "exposure",
|
|
1749
|
+
"description": "The exposure of the scene.",
|
|
1750
|
+
"value": { "type": "number", "default": "1" }
|
|
1751
|
+
},
|
|
1702
1752
|
{
|
|
1703
1753
|
"name": "fog",
|
|
1704
1754
|
"description": "The fog type of the scene.",
|
|
@@ -1752,6 +1802,10 @@
|
|
|
1752
1802
|
"description": "The nearest ancestor element that fronts an entity — `<pc-entity>`, `<pc-model>` or\n`<pc-node>` — or `null` if this element has no such ancestor. The search starts at the\nparent, so an element never resolves to itself.",
|
|
1753
1803
|
"type": "EntityBaseElement | null"
|
|
1754
1804
|
},
|
|
1805
|
+
{
|
|
1806
|
+
"name": "exposure",
|
|
1807
|
+
"description": "Gets the exposure of the scene."
|
|
1808
|
+
},
|
|
1755
1809
|
{
|
|
1756
1810
|
"name": "fog",
|
|
1757
1811
|
"description": "Gets the fog type of the scene."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcanvas/web-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"author": "PlayCanvas <support@playcanvas.com>",
|
|
5
5
|
"homepage": "https://playcanvas.com",
|
|
6
6
|
"description": "Web Components for the PlayCanvas Engine",
|
|
@@ -99,12 +99,12 @@
|
|
|
99
99
|
"eslint": "9.39.5",
|
|
100
100
|
"globals": "17.11.0",
|
|
101
101
|
"jsdom": "30.0.1",
|
|
102
|
-
"mediabunny": "1.55.
|
|
102
|
+
"mediabunny": "1.55.3",
|
|
103
103
|
"opentype.js": "2.0.0",
|
|
104
104
|
"playcanvas": "2.21.4",
|
|
105
105
|
"prettier": "3.9.6",
|
|
106
106
|
"publint": "0.3.24",
|
|
107
|
-
"rollup": "4.
|
|
107
|
+
"rollup": "4.63.0",
|
|
108
108
|
"serve": "14.2.6",
|
|
109
109
|
"tslib": "2.8.1",
|
|
110
110
|
"typedoc": "0.28.20",
|