@playcanvas/web-components 0.18.0 → 0.20.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 +38 -3
- package/dist/app.d.ts +38 -3
- package/dist/components/anim-clip.d.cts +0 -2
- package/dist/components/anim-clip.d.ts +0 -2
- package/dist/components/button-component.d.cts +9 -5
- package/dist/components/button-component.d.ts +9 -5
- package/dist/components/joint-component.d.cts +24 -10
- package/dist/components/joint-component.d.ts +24 -10
- package/dist/components/script-component.d.cts +4 -2
- package/dist/components/script-component.d.ts +4 -2
- package/dist/components/script-instance.d.cts +14 -6
- package/dist/components/script-instance.d.ts +14 -6
- package/dist/components/scroll-view-component.d.cts +24 -12
- package/dist/components/scroll-view-component.d.ts +24 -12
- package/dist/components/scrollbar-component.d.cts +6 -3
- package/dist/components/scrollbar-component.d.ts +6 -3
- package/dist/custom-elements.json +93 -23
- 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/parse.d.cts +7 -2
- package/dist/parse.d.ts +7 -2
- package/dist/pwc.cjs +706 -289
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +706 -289
- 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 +706 -289
- 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 +34 -14
- package/dist/web-types.json +78 -24
- package/package.json +3 -3
- package/src/app.ts +197 -87
- package/src/components/anim-clip.ts +0 -2
- package/src/components/button-component.ts +18 -10
- package/src/components/joint-component.ts +29 -15
- package/src/components/script-component.ts +25 -12
- package/src/components/script-instance.ts +14 -6
- package/src/components/scroll-view-component.ts +49 -29
- package/src/components/scrollbar-component.ts +13 -8
- 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/parse.ts +213 -16
- package/src/scene.ts +33 -2
|
@@ -59,13 +59,16 @@ declare class ScrollbarComponentElement extends ComponentElement {
|
|
|
59
59
|
*/
|
|
60
60
|
get handleSize(): number;
|
|
61
61
|
/**
|
|
62
|
-
* Sets the reference (
|
|
63
|
-
* scrollbar handle.
|
|
62
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
63
|
+
* selector) to the entity used as the scrollbar handle. An exact name resolves against the
|
|
64
|
+
* nearest enclosing entity first, then outward, then the document. A non-empty reference that
|
|
65
|
+
* does not resolve warns and is ignored.
|
|
64
66
|
* @param value - The handle entity reference.
|
|
65
67
|
*/
|
|
66
68
|
set handle(value: string);
|
|
67
69
|
/**
|
|
68
|
-
* Gets the reference
|
|
70
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
71
|
+
* selector) to the entity used as the scrollbar handle.
|
|
69
72
|
* @returns The handle entity reference.
|
|
70
73
|
*/
|
|
71
74
|
get handle(): string;
|
|
@@ -1378,9 +1378,16 @@
|
|
|
1378
1378
|
"declarations": [
|
|
1379
1379
|
{
|
|
1380
1380
|
"kind": "class",
|
|
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 `
|
|
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\nattribute (`onpointerdown`, `onclick`, ...).\n",
|
|
1382
1382
|
"name": "EntityElement",
|
|
1383
1383
|
"events": [
|
|
1384
|
+
{
|
|
1385
|
+
"type": {
|
|
1386
|
+
"text": "PointerEvent"
|
|
1387
|
+
},
|
|
1388
|
+
"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.",
|
|
1389
|
+
"name": "click"
|
|
1390
|
+
},
|
|
1384
1391
|
{
|
|
1385
1392
|
"type": {
|
|
1386
1393
|
"text": "PointerEvent"
|
|
@@ -1446,6 +1453,14 @@
|
|
|
1446
1453
|
"description": "The name of the entity.",
|
|
1447
1454
|
"fieldName": "name"
|
|
1448
1455
|
},
|
|
1456
|
+
{
|
|
1457
|
+
"type": {
|
|
1458
|
+
"text": "string"
|
|
1459
|
+
},
|
|
1460
|
+
"description": "Script to run when the entity is clicked: a primary pointer button pressed and then released over it.",
|
|
1461
|
+
"name": "onclick",
|
|
1462
|
+
"fieldName": "onclick"
|
|
1463
|
+
},
|
|
1449
1464
|
{
|
|
1450
1465
|
"type": {
|
|
1451
1466
|
"text": "string"
|
|
@@ -4711,6 +4726,13 @@
|
|
|
4711
4726
|
}
|
|
4712
4727
|
],
|
|
4713
4728
|
"events": [
|
|
4729
|
+
{
|
|
4730
|
+
"type": {
|
|
4731
|
+
"text": "PointerEvent"
|
|
4732
|
+
},
|
|
4733
|
+
"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.",
|
|
4734
|
+
"name": "click"
|
|
4735
|
+
},
|
|
4714
4736
|
{
|
|
4715
4737
|
"name": "error",
|
|
4716
4738
|
"type": {
|
|
@@ -4798,6 +4820,14 @@
|
|
|
4798
4820
|
"description": "The name of the model.",
|
|
4799
4821
|
"fieldName": "name"
|
|
4800
4822
|
},
|
|
4823
|
+
{
|
|
4824
|
+
"type": {
|
|
4825
|
+
"text": "string"
|
|
4826
|
+
},
|
|
4827
|
+
"description": "Script to run when the model is clicked: a primary pointer button pressed and then released over it.",
|
|
4828
|
+
"name": "onclick",
|
|
4829
|
+
"fieldName": "onclick"
|
|
4830
|
+
},
|
|
4801
4831
|
{
|
|
4802
4832
|
"type": {
|
|
4803
4833
|
"text": "string"
|
|
@@ -5235,6 +5265,13 @@
|
|
|
5235
5265
|
}
|
|
5236
5266
|
],
|
|
5237
5267
|
"events": [
|
|
5268
|
+
{
|
|
5269
|
+
"type": {
|
|
5270
|
+
"text": "PointerEvent"
|
|
5271
|
+
},
|
|
5272
|
+
"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.",
|
|
5273
|
+
"name": "click"
|
|
5274
|
+
},
|
|
5238
5275
|
{
|
|
5239
5276
|
"type": {
|
|
5240
5277
|
"text": "PointerEvent"
|
|
@@ -5315,6 +5352,14 @@
|
|
|
5315
5352
|
"description": "The name of the node to bind, resolved within the nearest ancestor `pc-model` (or `pc-node`) once it has instantiated.",
|
|
5316
5353
|
"fieldName": "name"
|
|
5317
5354
|
},
|
|
5355
|
+
{
|
|
5356
|
+
"type": {
|
|
5357
|
+
"text": "string"
|
|
5358
|
+
},
|
|
5359
|
+
"description": "Script to run when the node is clicked: a primary pointer button pressed and then released over it.",
|
|
5360
|
+
"name": "onclick",
|
|
5361
|
+
"fieldName": "onclick"
|
|
5362
|
+
},
|
|
5318
5363
|
{
|
|
5319
5364
|
"type": {
|
|
5320
5365
|
"text": "string"
|
|
@@ -5469,6 +5514,22 @@
|
|
|
5469
5514
|
"module": "src/async-element.ts"
|
|
5470
5515
|
}
|
|
5471
5516
|
},
|
|
5517
|
+
{
|
|
5518
|
+
"kind": "field",
|
|
5519
|
+
"name": "exposure",
|
|
5520
|
+
"description": "Gets the exposure of the scene.",
|
|
5521
|
+
"parameters": [
|
|
5522
|
+
{
|
|
5523
|
+
"description": "The exposure.",
|
|
5524
|
+
"name": "value"
|
|
5525
|
+
}
|
|
5526
|
+
],
|
|
5527
|
+
"return": {
|
|
5528
|
+
"type": {
|
|
5529
|
+
"text": ""
|
|
5530
|
+
}
|
|
5531
|
+
}
|
|
5532
|
+
},
|
|
5472
5533
|
{
|
|
5473
5534
|
"kind": "field",
|
|
5474
5535
|
"name": "fog",
|
|
@@ -5595,6 +5656,15 @@
|
|
|
5595
5656
|
}
|
|
5596
5657
|
],
|
|
5597
5658
|
"attributes": [
|
|
5659
|
+
{
|
|
5660
|
+
"name": "exposure",
|
|
5661
|
+
"type": {
|
|
5662
|
+
"text": "number"
|
|
5663
|
+
},
|
|
5664
|
+
"fieldName": "exposure",
|
|
5665
|
+
"default": "1",
|
|
5666
|
+
"description": "The exposure of the scene."
|
|
5667
|
+
},
|
|
5598
5668
|
{
|
|
5599
5669
|
"name": "fog",
|
|
5600
5670
|
"type": {
|
|
@@ -5654,7 +5724,7 @@
|
|
|
5654
5724
|
"name": "AsyncElement",
|
|
5655
5725
|
"module": "/src/async-element"
|
|
5656
5726
|
},
|
|
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
|
|
5727
|
+
"summary": "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",
|
|
5658
5728
|
"tagName": "pc-scene",
|
|
5659
5729
|
"customElement": true,
|
|
5660
5730
|
"events": [
|
|
@@ -6978,7 +7048,7 @@
|
|
|
6978
7048
|
{
|
|
6979
7049
|
"kind": "field",
|
|
6980
7050
|
"name": "image",
|
|
6981
|
-
"description": "Gets the reference to the
|
|
7051
|
+
"description": "Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`\nselector) to the entity whose image element is used for visual transitions, or empty for\nthe button's own entity.",
|
|
6982
7052
|
"parameters": [
|
|
6983
7053
|
{
|
|
6984
7054
|
"description": "The image entity reference.",
|
|
@@ -7191,7 +7261,7 @@
|
|
|
7191
7261
|
"text": "string"
|
|
7192
7262
|
},
|
|
7193
7263
|
"fieldName": "image",
|
|
7194
|
-
"description": "The reference to the
|
|
7264
|
+
"description": "The reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#` selector) to the entity whose image element is used for visual transitions, or empty for the button's own entity."
|
|
7195
7265
|
},
|
|
7196
7266
|
{
|
|
7197
7267
|
"name": "inactive-sprite-asset",
|
|
@@ -9524,7 +9594,7 @@
|
|
|
9524
9594
|
"declarations": [
|
|
9525
9595
|
{
|
|
9526
9596
|
"kind": "class",
|
|
9527
|
-
"description": "The JointComponentElement interface provides properties and methods for manipulating\n[`<pc-joint>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-joint/) elements.\nThe JointComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe entity holding the joint is not itself constrained. Its world transform defines the joint\nframe — the anchor point and axes the constraint operates about — with the local X axis as the\nprimary axis: a hinge rotates about it, a slider translates along it and a ball joint twists\nabout it. The constrained bodies are referenced by `entity-a` and `entity-b`, both of which need\na rigid body component; leaving `entity-b` empty constrains `entity-a` to a fixed point in world\nspace.
|
|
9597
|
+
"description": "The JointComponentElement interface provides properties and methods for manipulating\n[`<pc-joint>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-joint/) elements.\nThe JointComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\nThe entity holding the joint is not itself constrained. Its world transform defines the joint\nframe — the anchor point and axes the constraint operates about — with the local X axis as the\nprimary axis: a hinge rotates about it, a slider translates along it and a ball joint twists\nabout it. The constrained bodies are referenced by `entity-a` and `entity-b`, both of which need\na rigid body component; leaving `entity-b` empty constrains `entity-a` to a fixed point in world\nspace. A reference can name any entity-fronting element — `<pc-entity>`, `<pc-model>` or\n`<pc-node>`, so a ragdoll can join a model's own skeleton nodes by name — and a name resolves\nagainst the nearest enclosing entity first, then outward through the entity hierarchy, then the\ndocument, while a `#` selector resolves document-wide. A `<template>` prefab with one\nentity-fronting root can therefore wire its joints by name and stay self-contained when cloned.\nThe underlying engine component is in alpha, so its API may change.\n",
|
|
9528
9598
|
"name": "JointComponentElement",
|
|
9529
9599
|
"members": [
|
|
9530
9600
|
{
|
|
@@ -9796,7 +9866,7 @@
|
|
|
9796
9866
|
{
|
|
9797
9867
|
"kind": "field",
|
|
9798
9868
|
"name": "entityA",
|
|
9799
|
-
"description": "Gets the reference
|
|
9869
|
+
"description": "Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`\nselector) to the element providing the first constrained body.",
|
|
9800
9870
|
"parameters": [
|
|
9801
9871
|
{
|
|
9802
9872
|
"description": "The first body's entity reference.",
|
|
@@ -9812,7 +9882,7 @@
|
|
|
9812
9882
|
{
|
|
9813
9883
|
"kind": "field",
|
|
9814
9884
|
"name": "entityB",
|
|
9815
|
-
"description": "Gets the reference
|
|
9885
|
+
"description": "Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`\nselector) to the element providing the second constrained body, or empty for the\nworld-space case.",
|
|
9816
9886
|
"parameters": [
|
|
9817
9887
|
{
|
|
9818
9888
|
"description": "The second body's entity reference.",
|
|
@@ -10244,7 +10314,7 @@
|
|
|
10244
10314
|
"text": "string"
|
|
10245
10315
|
},
|
|
10246
10316
|
"fieldName": "entityA",
|
|
10247
|
-
"description": "The reference
|
|
10317
|
+
"description": "The reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#` selector) to the element providing the first constrained body."
|
|
10248
10318
|
},
|
|
10249
10319
|
{
|
|
10250
10320
|
"name": "entity-b",
|
|
@@ -10252,7 +10322,7 @@
|
|
|
10252
10322
|
"text": "string"
|
|
10253
10323
|
},
|
|
10254
10324
|
"fieldName": "entityB",
|
|
10255
|
-
"description": "The reference
|
|
10325
|
+
"description": "The reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#` selector) to the element providing the second constrained body, or empty for the world-space case."
|
|
10256
10326
|
},
|
|
10257
10327
|
{
|
|
10258
10328
|
"name": "limits",
|
|
@@ -12978,7 +13048,7 @@
|
|
|
12978
13048
|
"declarations": [
|
|
12979
13049
|
{
|
|
12980
13050
|
"kind": "class",
|
|
12981
|
-
"description": "The ScriptInstanceElement interface provides properties and methods for manipulating\n`<pc-script-instance>` elements. The ScriptInstanceElement interface also inherits the properties and\nmethods of the AsyncElement interface.\n\nScript attributes can be supplied through two channels:\n\n- **Per-property attributes**: any non-reserved attribute on the element maps to the script\n attribute of the same name (kebab-case to camelCase, e.g. `focus-point` → `focusPoint`).\n Values are parsed according to the type of the attribute's current value — initially the\n script's declared default (numbers, booleans, strings, Vec2/3/4, Color, Quat as Euler\n angles) — and the `asset:`/`entity:`/`vec2:`/`vec3:`/`vec4:`/`color:` prefixes may be used\n to be explicit.\n- **The `attributes` JSON attribute**: an object supporting nested structures and attribute\n names that collide with reserved HTML attribute names (e.g. `title`).\n\nWhen both specify the same attribute, the per-property attribute wins — at creation and\nwhenever either channel changes at runtime. The element's own `name` and `enabled`\nattributes configure the element itself and are not script attributes.\n\nChanging `name` on a live element destroys the old-name script instance and creates the\nnew-name one, re-applying both attribute channels to it.\n\nThe element becomes ready once its script instance has been created by the parent\n`<pc-script>` element.\n",
|
|
13051
|
+
"description": "The ScriptInstanceElement interface provides properties and methods for manipulating\n`<pc-script-instance>` elements. The ScriptInstanceElement interface also inherits the properties and\nmethods of the AsyncElement interface.\n\nScript attributes can be supplied through two channels:\n\n- **Per-property attributes**: any non-reserved attribute on the element maps to the script\n attribute of the same name (kebab-case to camelCase, e.g. `focus-point` → `focusPoint`).\n Values are parsed according to the type of the attribute's current value — initially the\n script's declared default (numbers, booleans, strings, Vec2/3/4, Color, Quat as Euler\n angles) — and the `asset:`/`entity:`/`vec2:`/`vec3:`/`vec4:`/`color:` prefixes may be used\n to be explicit. An `entity:` reference is an entity name — resolved against the nearest\n enclosing entity first, then outward, then the document — or a document-wide `#` selector\n (`entity:#id`); a bare value is always a name, never an element id.\n- **The `attributes` JSON attribute**: an object supporting nested structures and attribute\n names that collide with reserved HTML attribute names (e.g. `title`).\n\nWhen both specify the same attribute, the per-property attribute wins — at creation and\nwhenever either channel changes at runtime. The element's own `name` and `enabled`\nattributes configure the element itself and are not script attributes.\n\nChanging `name` on a live element destroys the old-name script instance and creates the\nnew-name one, re-applying both attribute channels to it.\n\nThe element becomes ready once its script instance has been created by the parent\n`<pc-script>` element.\n",
|
|
12982
13052
|
"name": "ScriptInstanceElement",
|
|
12983
13053
|
"members": [
|
|
12984
13054
|
{
|
|
@@ -13080,7 +13150,7 @@
|
|
|
13080
13150
|
{
|
|
13081
13151
|
"kind": "field",
|
|
13082
13152
|
"name": "scriptAttributes",
|
|
13083
|
-
"description": "Gets the attributes of the script.",
|
|
13153
|
+
"description": "Gets the attributes of the script as an object whose `asset:`, `entity:`, `vec2:`, `vec3:`,\n`vec4:` and `color:` prefixed values are resolved when applied — an `entity:` value being\nan entity name (nearest enclosing entity first, then outward, then the document) or a\ndocument-wide `#` selector (`entity:#id`), never a bare element id.",
|
|
13084
13154
|
"parameters": [
|
|
13085
13155
|
{
|
|
13086
13156
|
"description": "The attributes of the script.",
|
|
@@ -13138,7 +13208,7 @@
|
|
|
13138
13208
|
"text": "string"
|
|
13139
13209
|
},
|
|
13140
13210
|
"fieldName": "scriptAttributes",
|
|
13141
|
-
"description": "The attributes of the script."
|
|
13211
|
+
"description": "The attributes of the script as an object whose `asset:`, `entity:`, `vec2:`, `vec3:`, `vec4:` and `color:` prefixed values are resolved when applied — an `entity:` value being an entity name (nearest enclosing entity first, then outward, then the document) or a document-wide `#` selector (`entity:#id`), never a bare element id."
|
|
13142
13212
|
},
|
|
13143
13213
|
{
|
|
13144
13214
|
"name": "enabled",
|
|
@@ -13162,7 +13232,7 @@
|
|
|
13162
13232
|
"name": "AsyncElement",
|
|
13163
13233
|
"module": "/src/async-element"
|
|
13164
13234
|
},
|
|
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",
|
|
13235
|
+
"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. An `entity:` value is an entity name —\nwrite `entity:#id` for an element id. Must be a direct child of `<pc-script>`.\n",
|
|
13166
13236
|
"tagName": "pc-script-instance",
|
|
13167
13237
|
"customElement": true
|
|
13168
13238
|
}
|
|
@@ -13268,7 +13338,7 @@
|
|
|
13268
13338
|
{
|
|
13269
13339
|
"kind": "field",
|
|
13270
13340
|
"name": "content",
|
|
13271
|
-
"description": "Gets the reference to the
|
|
13341
|
+
"description": "Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`\nselector) to the entity used as the content.",
|
|
13272
13342
|
"parameters": [
|
|
13273
13343
|
{
|
|
13274
13344
|
"description": "The content entity reference.",
|
|
@@ -13336,7 +13406,7 @@
|
|
|
13336
13406
|
{
|
|
13337
13407
|
"kind": "field",
|
|
13338
13408
|
"name": "horizontalScrollbar",
|
|
13339
|
-
"description": "Gets the reference to the
|
|
13409
|
+
"description": "Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`\nselector) to the entity containing the horizontal scrollbar.",
|
|
13340
13410
|
"parameters": [
|
|
13341
13411
|
{
|
|
13342
13412
|
"description": "The horizontal scrollbar entity reference.",
|
|
@@ -13446,7 +13516,7 @@
|
|
|
13446
13516
|
{
|
|
13447
13517
|
"kind": "field",
|
|
13448
13518
|
"name": "verticalScrollbar",
|
|
13449
|
-
"description": "Gets the reference to the
|
|
13519
|
+
"description": "Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`\nselector) to the entity containing the vertical scrollbar.",
|
|
13450
13520
|
"parameters": [
|
|
13451
13521
|
{
|
|
13452
13522
|
"description": "The vertical scrollbar entity reference.",
|
|
@@ -13478,7 +13548,7 @@
|
|
|
13478
13548
|
{
|
|
13479
13549
|
"kind": "field",
|
|
13480
13550
|
"name": "viewport",
|
|
13481
|
-
"description": "Gets the reference to the
|
|
13551
|
+
"description": "Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`\nselector) to the entity used as the viewport.",
|
|
13482
13552
|
"parameters": [
|
|
13483
13553
|
{
|
|
13484
13554
|
"description": "The viewport entity reference.",
|
|
@@ -13508,7 +13578,7 @@
|
|
|
13508
13578
|
"text": "string"
|
|
13509
13579
|
},
|
|
13510
13580
|
"fieldName": "content",
|
|
13511
|
-
"description": "The reference to the
|
|
13581
|
+
"description": "The reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#` selector) to the entity used as the content."
|
|
13512
13582
|
},
|
|
13513
13583
|
{
|
|
13514
13584
|
"name": "enabled",
|
|
@@ -13547,7 +13617,7 @@
|
|
|
13547
13617
|
"text": "string"
|
|
13548
13618
|
},
|
|
13549
13619
|
"fieldName": "horizontalScrollbar",
|
|
13550
|
-
"description": "The reference to the
|
|
13620
|
+
"description": "The reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#` selector) to the entity containing the horizontal scrollbar."
|
|
13551
13621
|
},
|
|
13552
13622
|
{
|
|
13553
13623
|
"name": "horizontal-scrollbar-visibility",
|
|
@@ -13600,7 +13670,7 @@
|
|
|
13600
13670
|
"text": "string"
|
|
13601
13671
|
},
|
|
13602
13672
|
"fieldName": "verticalScrollbar",
|
|
13603
|
-
"description": "The reference to the
|
|
13673
|
+
"description": "The reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#` selector) to the entity containing the vertical scrollbar."
|
|
13604
13674
|
},
|
|
13605
13675
|
{
|
|
13606
13676
|
"name": "vertical-scrollbar-visibility",
|
|
@@ -13617,7 +13687,7 @@
|
|
|
13617
13687
|
"text": "string"
|
|
13618
13688
|
},
|
|
13619
13689
|
"fieldName": "viewport",
|
|
13620
|
-
"description": "The reference to the
|
|
13690
|
+
"description": "The reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#` selector) to the entity used as the viewport."
|
|
13621
13691
|
}
|
|
13622
13692
|
],
|
|
13623
13693
|
"superclass": {
|
|
@@ -13747,7 +13817,7 @@
|
|
|
13747
13817
|
{
|
|
13748
13818
|
"kind": "field",
|
|
13749
13819
|
"name": "handle",
|
|
13750
|
-
"description": "Gets the reference to the
|
|
13820
|
+
"description": "Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`\nselector) to the entity used as the scrollbar handle.",
|
|
13751
13821
|
"parameters": [
|
|
13752
13822
|
{
|
|
13753
13823
|
"description": "The handle entity reference.",
|
|
@@ -13843,7 +13913,7 @@
|
|
|
13843
13913
|
"text": "string"
|
|
13844
13914
|
},
|
|
13845
13915
|
"fieldName": "handle",
|
|
13846
|
-
"description": "The reference to the
|
|
13916
|
+
"description": "The reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#` selector) to the entity used as the scrollbar handle."
|
|
13847
13917
|
},
|
|
13848
13918
|
{
|
|
13849
13919
|
"name": "handle-size",
|
package/dist/entity-base.d.cts
CHANGED
|
@@ -17,11 +17,12 @@ declare class EntityBaseElement extends AsyncElement {
|
|
|
17
17
|
*/
|
|
18
18
|
protected _appElement: AppElement | null;
|
|
19
19
|
/**
|
|
20
|
-
* The
|
|
20
|
+
* The event listeners registered on the element, by type.
|
|
21
21
|
*/
|
|
22
22
|
private _listeners;
|
|
23
23
|
/**
|
|
24
|
-
* The event types for which an inline
|
|
24
|
+
* The event types for which an inline handler attribute (`onpointerdown`, `onclick`, ...)
|
|
25
|
+
* is currently present.
|
|
25
26
|
*/
|
|
26
27
|
private _inlineHandlerTypes;
|
|
27
28
|
/**
|
|
@@ -45,7 +46,7 @@ declare class EntityBaseElement extends AsyncElement {
|
|
|
45
46
|
*/
|
|
46
47
|
protected _unregisterEntity(entity: Entity): void;
|
|
47
48
|
/**
|
|
48
|
-
* Tracks whether an inline
|
|
49
|
+
* Tracks whether an inline handler attribute is present. The browser itself compiles and
|
|
49
50
|
* runs these attributes — they are standard `GlobalEventHandlers`, so setting one replaces
|
|
50
51
|
* the previous handler and removing it removes the handler, exactly like `onclick` on any
|
|
51
52
|
* HTML element. But because they bypass {@link EventTarget.addEventListener}, the connect/disconnect
|
package/dist/entity-base.d.ts
CHANGED
|
@@ -17,11 +17,12 @@ declare class EntityBaseElement extends AsyncElement {
|
|
|
17
17
|
*/
|
|
18
18
|
protected _appElement: AppElement | null;
|
|
19
19
|
/**
|
|
20
|
-
* The
|
|
20
|
+
* The event listeners registered on the element, by type.
|
|
21
21
|
*/
|
|
22
22
|
private _listeners;
|
|
23
23
|
/**
|
|
24
|
-
* The event types for which an inline
|
|
24
|
+
* The event types for which an inline handler attribute (`onpointerdown`, `onclick`, ...)
|
|
25
|
+
* is currently present.
|
|
25
26
|
*/
|
|
26
27
|
private _inlineHandlerTypes;
|
|
27
28
|
/**
|
|
@@ -45,7 +46,7 @@ declare class EntityBaseElement extends AsyncElement {
|
|
|
45
46
|
*/
|
|
46
47
|
protected _unregisterEntity(entity: Entity): void;
|
|
47
48
|
/**
|
|
48
|
-
* Tracks whether an inline
|
|
49
|
+
* Tracks whether an inline handler attribute is present. The browser itself compiles and
|
|
49
50
|
* runs these attributes — they are standard `GlobalEventHandlers`, so setting one replaces
|
|
50
51
|
* the previous handler and removing it removes the handler, exactly like `onclick` on any
|
|
51
52
|
* HTML element. But because they bypass {@link EventTarget.addEventListener}, the connect/disconnect
|
package/dist/entity.d.cts
CHANGED
|
@@ -7,8 +7,8 @@ import { EntityOwnerElement } from './entity-owner.cjs';
|
|
|
7
7
|
*
|
|
8
8
|
* The pointer events below are dispatched by the containing `<pc-app>` element when the pointer
|
|
9
9
|
* intersects this entity's geometry. They are only generated while the entity has a listener for
|
|
10
|
-
* them, registered either with {@link EventTarget.addEventListener} or with the matching inline
|
|
11
|
-
* attribute.
|
|
10
|
+
* them, registered either with {@link EventTarget.addEventListener} or with the matching inline
|
|
11
|
+
* attribute (`onpointerdown`, `onclick`, ...).
|
|
12
12
|
*
|
|
13
13
|
* @elementSummary The `<pc-entity>` element creates an entity: a named, transformable node of the
|
|
14
14
|
* scene hierarchy, and the host for component elements such as `<pc-camera>`, `<pc-light>` and
|
|
@@ -28,11 +28,17 @@ import { EntityOwnerElement } from './entity-owner.cjs';
|
|
|
28
28
|
* entity.
|
|
29
29
|
* @attribute {string} onpointerup - Script to run when a pointer button is released over the
|
|
30
30
|
* entity.
|
|
31
|
+
* @attribute {string} onclick - Script to run when the entity is clicked: a primary pointer
|
|
32
|
+
* button pressed and then released over it.
|
|
31
33
|
* @fires {PointerEvent} pointerenter - Fired when the pointer moves onto the entity.
|
|
32
34
|
* @fires {PointerEvent} pointerleave - Fired when the pointer moves off the entity.
|
|
33
35
|
* @fires {PointerEvent} pointermove - Fired when the pointer moves over the entity.
|
|
34
36
|
* @fires {PointerEvent} pointerdown - Fired when a pointer button is pressed over the entity.
|
|
35
37
|
* @fires {PointerEvent} pointerup - Fired when a pointer button is released over the entity.
|
|
38
|
+
* @fires {PointerEvent} click - Fired when a primary pointer button is pressed and then released
|
|
39
|
+
* over the entity. A press and release that picked different entities fires on their nearest
|
|
40
|
+
* common ancestor instead, as in the DOM. `detail` carries the click count, so a double click
|
|
41
|
+
* arrives as a click whose `detail` is 2.
|
|
36
42
|
*/
|
|
37
43
|
declare class EntityElement extends EntityOwnerElement {
|
|
38
44
|
connectedCallback(): void;
|
package/dist/entity.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { EntityOwnerElement } from './entity-owner.js';
|
|
|
7
7
|
*
|
|
8
8
|
* The pointer events below are dispatched by the containing `<pc-app>` element when the pointer
|
|
9
9
|
* intersects this entity's geometry. They are only generated while the entity has a listener for
|
|
10
|
-
* them, registered either with {@link EventTarget.addEventListener} or with the matching inline
|
|
11
|
-
* attribute.
|
|
10
|
+
* them, registered either with {@link EventTarget.addEventListener} or with the matching inline
|
|
11
|
+
* attribute (`onpointerdown`, `onclick`, ...).
|
|
12
12
|
*
|
|
13
13
|
* @elementSummary The `<pc-entity>` element creates an entity: a named, transformable node of the
|
|
14
14
|
* scene hierarchy, and the host for component elements such as `<pc-camera>`, `<pc-light>` and
|
|
@@ -28,11 +28,17 @@ import { EntityOwnerElement } from './entity-owner.js';
|
|
|
28
28
|
* entity.
|
|
29
29
|
* @attribute {string} onpointerup - Script to run when a pointer button is released over the
|
|
30
30
|
* entity.
|
|
31
|
+
* @attribute {string} onclick - Script to run when the entity is clicked: a primary pointer
|
|
32
|
+
* button pressed and then released over it.
|
|
31
33
|
* @fires {PointerEvent} pointerenter - Fired when the pointer moves onto the entity.
|
|
32
34
|
* @fires {PointerEvent} pointerleave - Fired when the pointer moves off the entity.
|
|
33
35
|
* @fires {PointerEvent} pointermove - Fired when the pointer moves over the entity.
|
|
34
36
|
* @fires {PointerEvent} pointerdown - Fired when a pointer button is pressed over the entity.
|
|
35
37
|
* @fires {PointerEvent} pointerup - Fired when a pointer button is released over the entity.
|
|
38
|
+
* @fires {PointerEvent} click - Fired when a primary pointer button is pressed and then released
|
|
39
|
+
* over the entity. A press and release that picked different entities fires on their nearest
|
|
40
|
+
* common ancestor instead, as in the DOM. `detail` carries the click count, so a double click
|
|
41
|
+
* arrives as a click whose `detail` is 2.
|
|
36
42
|
*/
|
|
37
43
|
declare class EntityElement extends EntityOwnerElement {
|
|
38
44
|
connectedCallback(): void;
|
package/dist/model.d.cts
CHANGED
|
@@ -97,11 +97,17 @@ type HierarchyNode = {
|
|
|
97
97
|
* model.
|
|
98
98
|
* @attribute {string} onpointerup - Script to run when a pointer button is released over the
|
|
99
99
|
* model.
|
|
100
|
+
* @attribute {string} onclick - Script to run when the model is clicked: a primary pointer
|
|
101
|
+
* button pressed and then released over it.
|
|
100
102
|
* @fires {PointerEvent} pointerenter - Fired when the pointer moves onto the model.
|
|
101
103
|
* @fires {PointerEvent} pointerleave - Fired when the pointer moves off the model.
|
|
102
104
|
* @fires {PointerEvent} pointermove - Fired when the pointer moves over the model.
|
|
103
105
|
* @fires {PointerEvent} pointerdown - Fired when a pointer button is pressed over the model.
|
|
104
106
|
* @fires {PointerEvent} pointerup - Fired when a pointer button is released over the model.
|
|
107
|
+
* @fires {PointerEvent} click - Fired when a primary pointer button is pressed and then released
|
|
108
|
+
* over the model. A press and release that picked different entities fires on their nearest
|
|
109
|
+
* common ancestor instead, as in the DOM. `detail` carries the click count, so a double click
|
|
110
|
+
* arrives as a click whose `detail` is 2.
|
|
105
111
|
* @fires {Event} load - Fired each time a container asset finishes instantiating, including
|
|
106
112
|
* re-instantiation after `asset` changes. Does not bubble — listen on this element, or use a
|
|
107
113
|
* capture-phase listener on an ancestor.
|
package/dist/model.d.ts
CHANGED
|
@@ -97,11 +97,17 @@ type HierarchyNode = {
|
|
|
97
97
|
* model.
|
|
98
98
|
* @attribute {string} onpointerup - Script to run when a pointer button is released over the
|
|
99
99
|
* model.
|
|
100
|
+
* @attribute {string} onclick - Script to run when the model is clicked: a primary pointer
|
|
101
|
+
* button pressed and then released over it.
|
|
100
102
|
* @fires {PointerEvent} pointerenter - Fired when the pointer moves onto the model.
|
|
101
103
|
* @fires {PointerEvent} pointerleave - Fired when the pointer moves off the model.
|
|
102
104
|
* @fires {PointerEvent} pointermove - Fired when the pointer moves over the model.
|
|
103
105
|
* @fires {PointerEvent} pointerdown - Fired when a pointer button is pressed over the model.
|
|
104
106
|
* @fires {PointerEvent} pointerup - Fired when a pointer button is released over the model.
|
|
107
|
+
* @fires {PointerEvent} click - Fired when a primary pointer button is pressed and then released
|
|
108
|
+
* over the model. A press and release that picked different entities fires on their nearest
|
|
109
|
+
* common ancestor instead, as in the DOM. `detail` carries the click count, so a double click
|
|
110
|
+
* arrives as a click whose `detail` is 2.
|
|
105
111
|
* @fires {Event} load - Fired each time a container asset finishes instantiating, including
|
|
106
112
|
* re-instantiation after `asset` changes. Does not bubble — listen on this element, or use a
|
|
107
113
|
* capture-phase listener on an ancestor.
|
package/dist/node.d.cts
CHANGED
|
@@ -67,11 +67,17 @@ type MaterialOverrides = Readonly<Record<string, string>>;
|
|
|
67
67
|
* node.
|
|
68
68
|
* @attribute {string} onpointerup - Script to run when a pointer button is released over the
|
|
69
69
|
* node.
|
|
70
|
+
* @attribute {string} onclick - Script to run when the node is clicked: a primary pointer
|
|
71
|
+
* button pressed and then released over it.
|
|
70
72
|
* @fires {PointerEvent} pointerenter - Fired when the pointer moves onto the node.
|
|
71
73
|
* @fires {PointerEvent} pointerleave - Fired when the pointer moves off the node.
|
|
72
74
|
* @fires {PointerEvent} pointermove - Fired when the pointer moves over the node.
|
|
73
75
|
* @fires {PointerEvent} pointerdown - Fired when a pointer button is pressed over the node.
|
|
74
76
|
* @fires {PointerEvent} pointerup - Fired when a pointer button is released over the node.
|
|
77
|
+
* @fires {PointerEvent} click - Fired when a primary pointer button is pressed and then released
|
|
78
|
+
* over the node. A press and release that picked different entities fires on their nearest
|
|
79
|
+
* common ancestor instead, as in the DOM. `detail` carries the click count, so a double click
|
|
80
|
+
* arrives as a click whose `detail` is 2.
|
|
75
81
|
*/
|
|
76
82
|
declare class NodeElement extends EntityBaseElement {
|
|
77
83
|
private _name;
|
package/dist/node.d.ts
CHANGED
|
@@ -67,11 +67,17 @@ type MaterialOverrides = Readonly<Record<string, string>>;
|
|
|
67
67
|
* node.
|
|
68
68
|
* @attribute {string} onpointerup - Script to run when a pointer button is released over the
|
|
69
69
|
* node.
|
|
70
|
+
* @attribute {string} onclick - Script to run when the node is clicked: a primary pointer
|
|
71
|
+
* button pressed and then released over it.
|
|
70
72
|
* @fires {PointerEvent} pointerenter - Fired when the pointer moves onto the node.
|
|
71
73
|
* @fires {PointerEvent} pointerleave - Fired when the pointer moves off the node.
|
|
72
74
|
* @fires {PointerEvent} pointermove - Fired when the pointer moves over the node.
|
|
73
75
|
* @fires {PointerEvent} pointerdown - Fired when a pointer button is pressed over the node.
|
|
74
76
|
* @fires {PointerEvent} pointerup - Fired when a pointer button is released over the node.
|
|
77
|
+
* @fires {PointerEvent} click - Fired when a primary pointer button is pressed and then released
|
|
78
|
+
* over the node. A press and release that picked different entities fires on their nearest
|
|
79
|
+
* common ancestor instead, as in the DOM. `detail` carries the click count, so a double click
|
|
80
|
+
* arrives as a click whose `detail` is 2.
|
|
75
81
|
*/
|
|
76
82
|
declare class NodeElement extends EntityBaseElement {
|
|
77
83
|
private _name;
|
package/dist/parse.d.cts
CHANGED
|
@@ -12,7 +12,12 @@
|
|
|
12
12
|
* - `parseBool` and `parseTags` take no attribute name, because every value is valid for them and
|
|
13
13
|
* so they never warn.
|
|
14
14
|
*
|
|
15
|
-
* `getEntity`
|
|
16
|
-
* literal, and
|
|
15
|
+
* `findEntityElement` and `getEntity` are the exceptions: they resolve a reference rather than
|
|
16
|
+
* parsing a literal, and return `null` instead of falling back to a default. A reference
|
|
17
|
+
* beginning with `#` is a document-wide selector (an element id, or any selector rooted in one);
|
|
18
|
+
* anything else is an entity name, resolved lexically through the entity hierarchy first and
|
|
19
|
+
* against the document after — never as a selector or an id. They also do not warn - what an
|
|
20
|
+
* unresolved reference means depends on the element holding it - so elements report through
|
|
21
|
+
* `resolveEntity`, which takes that meaning as parameters.
|
|
17
22
|
*/
|
|
18
23
|
export {};
|
package/dist/parse.d.ts
CHANGED
|
@@ -12,7 +12,12 @@
|
|
|
12
12
|
* - `parseBool` and `parseTags` take no attribute name, because every value is valid for them and
|
|
13
13
|
* so they never warn.
|
|
14
14
|
*
|
|
15
|
-
* `getEntity`
|
|
16
|
-
* literal, and
|
|
15
|
+
* `findEntityElement` and `getEntity` are the exceptions: they resolve a reference rather than
|
|
16
|
+
* parsing a literal, and return `null` instead of falling back to a default. A reference
|
|
17
|
+
* beginning with `#` is a document-wide selector (an element id, or any selector rooted in one);
|
|
18
|
+
* anything else is an entity name, resolved lexically through the entity hierarchy first and
|
|
19
|
+
* against the document after — never as a selector or an id. They also do not warn - what an
|
|
20
|
+
* unresolved reference means depends on the element holding it - so elements report through
|
|
21
|
+
* `resolveEntity`, which takes that meaning as parameters.
|
|
17
22
|
*/
|
|
18
23
|
export {};
|