@playcanvas/web-components 0.20.0 → 0.21.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.
Files changed (100) hide show
  1. package/dist/app.d.cts +5 -113
  2. package/dist/app.d.ts +5 -113
  3. package/dist/asset-binding.d.cts +1 -0
  4. package/dist/asset-binding.d.ts +1 -0
  5. package/dist/components/anim-clip.d.cts +8 -10
  6. package/dist/components/anim-clip.d.ts +8 -10
  7. package/dist/components/anim-component.d.cts +5 -4
  8. package/dist/components/anim-component.d.ts +5 -4
  9. package/dist/components/audio-listener-component.d.cts +5 -4
  10. package/dist/components/audio-listener-component.d.ts +5 -4
  11. package/dist/components/button-component.d.cts +5 -4
  12. package/dist/components/button-component.d.ts +5 -4
  13. package/dist/components/camera-component.d.cts +5 -4
  14. package/dist/components/camera-component.d.ts +5 -4
  15. package/dist/components/collision-component.d.cts +5 -4
  16. package/dist/components/collision-component.d.ts +5 -4
  17. package/dist/components/component.d.cts +2 -2
  18. package/dist/components/component.d.ts +2 -2
  19. package/dist/components/element-component.d.cts +5 -4
  20. package/dist/components/element-component.d.ts +5 -4
  21. package/dist/components/gsplat-component.d.cts +5 -4
  22. package/dist/components/gsplat-component.d.ts +5 -4
  23. package/dist/components/joint-component.d.cts +5 -4
  24. package/dist/components/joint-component.d.ts +5 -4
  25. package/dist/components/layout-child-component.d.cts +5 -4
  26. package/dist/components/layout-child-component.d.ts +5 -4
  27. package/dist/components/layout-group-component.d.cts +5 -4
  28. package/dist/components/layout-group-component.d.ts +5 -4
  29. package/dist/components/light-component.d.cts +5 -4
  30. package/dist/components/light-component.d.ts +5 -4
  31. package/dist/components/particle-system-component.d.cts +22 -5
  32. package/dist/components/particle-system-component.d.ts +22 -5
  33. package/dist/components/render-component.d.cts +5 -4
  34. package/dist/components/render-component.d.ts +5 -4
  35. package/dist/components/rigid-body-component.d.cts +5 -4
  36. package/dist/components/rigid-body-component.d.ts +5 -4
  37. package/dist/components/screen-component.d.cts +5 -4
  38. package/dist/components/screen-component.d.ts +5 -4
  39. package/dist/components/script-component.d.cts +5 -4
  40. package/dist/components/script-component.d.ts +5 -4
  41. package/dist/components/scroll-view-component.d.cts +5 -4
  42. package/dist/components/scroll-view-component.d.ts +5 -4
  43. package/dist/components/scrollbar-component.d.cts +5 -4
  44. package/dist/components/scrollbar-component.d.ts +5 -4
  45. package/dist/components/sound-component.d.cts +5 -4
  46. package/dist/components/sound-component.d.ts +5 -4
  47. package/dist/custom-elements.json +38 -38
  48. package/dist/entity-reference.d.cts +13 -0
  49. package/dist/entity-reference.d.ts +13 -0
  50. package/dist/material.d.cts +8 -6
  51. package/dist/material.d.ts +8 -6
  52. package/dist/model.d.cts +8 -9
  53. package/dist/model.d.ts +8 -9
  54. package/dist/parse.d.cts +0 -8
  55. package/dist/parse.d.ts +0 -8
  56. package/dist/pointer-controller.d.cts +1 -0
  57. package/dist/pointer-controller.d.ts +1 -0
  58. package/dist/pwc.cjs +1360 -1186
  59. package/dist/pwc.cjs.map +1 -1
  60. package/dist/pwc.js +1360 -1186
  61. package/dist/pwc.js.map +1 -1
  62. package/dist/pwc.min.js +1 -1
  63. package/dist/pwc.min.js.map +1 -1
  64. package/dist/pwc.min.mjs +1 -1
  65. package/dist/pwc.min.mjs.map +1 -1
  66. package/dist/pwc.mjs +1361 -1187
  67. package/dist/pwc.mjs.map +1 -1
  68. package/dist/sky.d.cts +6 -7
  69. package/dist/sky.d.ts +6 -7
  70. package/dist/web-types.json +39 -39
  71. package/package.json +2 -2
  72. package/src/app.ts +16 -451
  73. package/src/asset-binding.ts +141 -0
  74. package/src/components/anim-clip.ts +22 -45
  75. package/src/components/anim-component.ts +10 -6
  76. package/src/components/audio-listener-component.ts +6 -5
  77. package/src/components/button-component.ts +8 -6
  78. package/src/components/camera-component.ts +6 -5
  79. package/src/components/collision-component.ts +6 -5
  80. package/src/components/component.ts +6 -4
  81. package/src/components/element-component.ts +6 -5
  82. package/src/components/gsplat-component.ts +6 -5
  83. package/src/components/joint-component.ts +8 -6
  84. package/src/components/layout-child-component.ts +6 -5
  85. package/src/components/layout-group-component.ts +6 -5
  86. package/src/components/light-component.ts +6 -5
  87. package/src/components/particle-system-component.ts +56 -30
  88. package/src/components/render-component.ts +6 -5
  89. package/src/components/rigid-body-component.ts +6 -5
  90. package/src/components/screen-component.ts +6 -5
  91. package/src/components/script-component.ts +8 -10
  92. package/src/components/scroll-view-component.ts +8 -6
  93. package/src/components/scrollbar-component.ts +8 -6
  94. package/src/components/sound-component.ts +6 -5
  95. package/src/entity-reference.ts +237 -0
  96. package/src/material.ts +25 -29
  97. package/src/model.ts +24 -48
  98. package/src/parse.ts +0 -232
  99. package/src/pointer-controller.ts +550 -0
  100. package/src/sky.ts +19 -30
@@ -14,7 +14,7 @@ import { ComponentElement } from './component.js';
14
14
  *
15
15
  * @category Components
16
16
  */
17
- declare class ScrollbarComponentElement extends ComponentElement {
17
+ declare class ScrollbarComponentElement extends ComponentElement<ScrollbarComponent> {
18
18
  private _orientation;
19
19
  private _value;
20
20
  private _handleSize;
@@ -23,10 +23,11 @@ declare class ScrollbarComponentElement extends ComponentElement {
23
23
  constructor();
24
24
  protected getInitialComponentData(): Record<string, any>;
25
25
  /**
26
- * Gets the underlying PlayCanvas scrollbar component.
27
- * @returns The scrollbar component.
26
+ * Gets the underlying PlayCanvas scrollbar component. `null` until the element is
27
+ * ready see {@link ComponentElement.component}.
28
+ * @returns The scrollbar component, or `null`.
28
29
  */
29
- get component(): ScrollbarComponent;
30
+ get component(): ScrollbarComponent | null;
30
31
  /**
31
32
  * Sets the orientation of the scrollbar. Can be `horizontal` or `vertical`. Defaults to
32
33
  * `horizontal`.
@@ -14,7 +14,7 @@ import { ComponentElement } from './component.cjs';
14
14
  *
15
15
  * @category Components
16
16
  */
17
- declare class SoundComponentElement extends ComponentElement {
17
+ declare class SoundComponentElement extends ComponentElement<SoundComponent> {
18
18
  private _distanceModel;
19
19
  private _maxDistance;
20
20
  private _pitch;
@@ -34,10 +34,11 @@ declare class SoundComponentElement extends ComponentElement {
34
34
  volume: number;
35
35
  };
36
36
  /**
37
- * Gets the underlying PlayCanvas sound component.
38
- * @returns The sound component.
37
+ * Gets the underlying PlayCanvas sound component. `null` until the element is
38
+ * ready see {@link ComponentElement.component}.
39
+ * @returns The sound component, or `null`.
39
40
  */
40
- get component(): SoundComponent;
41
+ get component(): SoundComponent | null;
41
42
  /**
42
43
  * Sets which algorithm to use to reduce the volume of the sound as it moves away from the listener.
43
44
  * @param value - The distance model.
@@ -14,7 +14,7 @@ import { ComponentElement } from './component.js';
14
14
  *
15
15
  * @category Components
16
16
  */
17
- declare class SoundComponentElement extends ComponentElement {
17
+ declare class SoundComponentElement extends ComponentElement<SoundComponent> {
18
18
  private _distanceModel;
19
19
  private _maxDistance;
20
20
  private _pitch;
@@ -34,10 +34,11 @@ declare class SoundComponentElement extends ComponentElement {
34
34
  volume: number;
35
35
  };
36
36
  /**
37
- * Gets the underlying PlayCanvas sound component.
38
- * @returns The sound component.
37
+ * Gets the underlying PlayCanvas sound component. `null` until the element is
38
+ * ready see {@link ComponentElement.component}.
39
+ * @returns The sound component, or `null`.
39
40
  */
40
- get component(): SoundComponent;
41
+ get component(): SoundComponent | null;
41
42
  /**
42
43
  * Sets which algorithm to use to reduce the volume of the sound as it moves away from the listener.
43
44
  * @param value - The distance model.
@@ -6490,9 +6490,9 @@
6490
6490
  "kind": "field",
6491
6491
  "name": "component",
6492
6492
  "type": {
6493
- "text": "Component | null"
6493
+ "text": "AnimComponent | null"
6494
6494
  },
6495
- "description": "Gets the underlying PlayCanvas anim component.",
6495
+ "description": "Gets the underlying PlayCanvas anim component. `null` until the element is\nready — see ComponentElement.component.",
6496
6496
  "return": {
6497
6497
  "type": {
6498
6498
  "text": ""
@@ -6761,9 +6761,9 @@
6761
6761
  "kind": "field",
6762
6762
  "name": "component",
6763
6763
  "type": {
6764
- "text": "Component | null"
6764
+ "text": "AudioListenerComponent | null"
6765
6765
  },
6766
- "description": "Gets the underlying PlayCanvas audio listener component.",
6766
+ "description": "Gets the underlying PlayCanvas audio listener component. `null` until the element is\nready — see ComponentElement.component.",
6767
6767
  "return": {
6768
6768
  "type": {
6769
6769
  "text": ""
@@ -6931,9 +6931,9 @@
6931
6931
  "kind": "field",
6932
6932
  "name": "component",
6933
6933
  "type": {
6934
- "text": "Component | null"
6934
+ "text": "ButtonComponent | null"
6935
6935
  },
6936
- "description": "Gets the underlying PlayCanvas button component.",
6936
+ "description": "Gets the underlying PlayCanvas button component. `null` until the element is\nready — see ComponentElement.component.",
6937
6937
  "return": {
6938
6938
  "type": {
6939
6939
  "text": ""
@@ -7524,9 +7524,9 @@
7524
7524
  "kind": "field",
7525
7525
  "name": "component",
7526
7526
  "type": {
7527
- "text": "Component | null"
7527
+ "text": "CameraComponent | null"
7528
7528
  },
7529
- "description": "Gets the underlying PlayCanvas camera component.",
7529
+ "description": "Gets the underlying PlayCanvas camera component. `null` until the element is\nready — see ComponentElement.component.",
7530
7530
  "return": {
7531
7531
  "type": {
7532
7532
  "text": ""
@@ -8157,9 +8157,9 @@
8157
8157
  "kind": "field",
8158
8158
  "name": "component",
8159
8159
  "type": {
8160
- "text": "Component | null"
8160
+ "text": "CollisionComponent | null"
8161
8161
  },
8162
- "description": "Gets the underlying PlayCanvas collision component.",
8162
+ "description": "Gets the underlying PlayCanvas collision component. `null` until the element is\nready — see ComponentElement.component.",
8163
8163
  "return": {
8164
8164
  "type": {
8165
8165
  "text": ""
@@ -8629,9 +8629,9 @@
8629
8629
  "kind": "field",
8630
8630
  "name": "component",
8631
8631
  "type": {
8632
- "text": "Component | null"
8632
+ "text": "ElementComponent | null"
8633
8633
  },
8634
- "description": "Gets the underlying PlayCanvas element component.",
8634
+ "description": "Gets the underlying PlayCanvas element component. `null` until the element is\nready — see ComponentElement.component.",
8635
8635
  "return": {
8636
8636
  "type": {
8637
8637
  "text": ""
@@ -9366,9 +9366,9 @@
9366
9366
  "kind": "field",
9367
9367
  "name": "component",
9368
9368
  "type": {
9369
- "text": "Component | null"
9369
+ "text": "GSplatComponent | null"
9370
9370
  },
9371
- "description": "Gets the underlying PlayCanvas gsplat component.",
9371
+ "description": "Gets the underlying PlayCanvas gsplat component. `null` until the element is\nready — see ComponentElement.component.",
9372
9372
  "return": {
9373
9373
  "type": {
9374
9374
  "text": ""
@@ -9797,9 +9797,9 @@
9797
9797
  "kind": "field",
9798
9798
  "name": "component",
9799
9799
  "type": {
9800
- "text": "Component | null"
9800
+ "text": "JointComponent | null"
9801
9801
  },
9802
- "description": "Gets the underlying PlayCanvas joint component.",
9802
+ "description": "Gets the underlying PlayCanvas joint component. `null` until the element is\nready — see ComponentElement.component.",
9803
9803
  "return": {
9804
9804
  "type": {
9805
9805
  "text": ""
@@ -10546,9 +10546,9 @@
10546
10546
  "kind": "field",
10547
10547
  "name": "component",
10548
10548
  "type": {
10549
- "text": "Component | null"
10549
+ "text": "LayoutChildComponent | null"
10550
10550
  },
10551
- "description": "Gets the underlying PlayCanvas layout child component.",
10551
+ "description": "Gets the underlying PlayCanvas layout child component. `null` until the element is\nready — see ComponentElement.component.",
10552
10552
  "return": {
10553
10553
  "type": {
10554
10554
  "text": ""
@@ -10889,9 +10889,9 @@
10889
10889
  "kind": "field",
10890
10890
  "name": "component",
10891
10891
  "type": {
10892
- "text": "Component | null"
10892
+ "text": "LayoutGroupComponent | null"
10893
10893
  },
10894
- "description": "Gets the underlying PlayCanvas layout group component.",
10894
+ "description": "Gets the underlying PlayCanvas layout group component. `null` until the element is\nready — see ComponentElement.component.",
10895
10895
  "return": {
10896
10896
  "type": {
10897
10897
  "text": ""
@@ -11316,9 +11316,9 @@
11316
11316
  "kind": "field",
11317
11317
  "name": "component",
11318
11318
  "type": {
11319
- "text": "Component | null"
11319
+ "text": "LightComponent | null"
11320
11320
  },
11321
- "description": "Gets the underlying PlayCanvas light component.",
11321
+ "description": "Gets the underlying PlayCanvas light component. `null` until the element is\nready — see ComponentElement.component.",
11322
11322
  "return": {
11323
11323
  "type": {
11324
11324
  "text": ""
@@ -11975,9 +11975,9 @@
11975
11975
  "kind": "field",
11976
11976
  "name": "component",
11977
11977
  "type": {
11978
- "text": "Component | null"
11978
+ "text": "ParticleSystemComponent | null"
11979
11979
  },
11980
- "description": "Gets the underlying PlayCanvas particle system component.",
11980
+ "description": "Gets the underlying PlayCanvas particle system component. `null` until the element is\nready — see ComponentElement.component.",
11981
11981
  "return": {
11982
11982
  "type": {
11983
11983
  "text": ""
@@ -12176,9 +12176,9 @@
12176
12176
  "kind": "field",
12177
12177
  "name": "component",
12178
12178
  "type": {
12179
- "text": "Component | null"
12179
+ "text": "RenderComponent | null"
12180
12180
  },
12181
- "description": "Gets the underlying PlayCanvas render component.",
12181
+ "description": "Gets the underlying PlayCanvas render component. `null` until the element is\nready — see ComponentElement.component.",
12182
12182
  "return": {
12183
12183
  "type": {
12184
12184
  "text": ""
@@ -12427,9 +12427,9 @@
12427
12427
  "kind": "field",
12428
12428
  "name": "component",
12429
12429
  "type": {
12430
- "text": "Component | null"
12430
+ "text": "RigidBodyComponent | null"
12431
12431
  },
12432
- "description": "Gets the underlying PlayCanvas rigidbody component.",
12432
+ "description": "Gets the underlying PlayCanvas rigidbody component. `null` until the element is\nready — see ComponentElement.component.",
12433
12433
  "return": {
12434
12434
  "type": {
12435
12435
  "text": ""
@@ -12683,9 +12683,9 @@
12683
12683
  "kind": "field",
12684
12684
  "name": "component",
12685
12685
  "type": {
12686
- "text": "Component | null"
12686
+ "text": "ScreenComponent | null"
12687
12687
  },
12688
- "description": "Gets the underlying PlayCanvas screen component.",
12688
+ "description": "Gets the underlying PlayCanvas screen component. `null` until the element is\nready — see ComponentElement.component.",
12689
12689
  "return": {
12690
12690
  "type": {
12691
12691
  "text": ""
@@ -12937,9 +12937,9 @@
12937
12937
  "kind": "field",
12938
12938
  "name": "component",
12939
12939
  "type": {
12940
- "text": "Component | null"
12940
+ "text": "ScriptComponent | null"
12941
12941
  },
12942
- "description": "Gets the underlying PlayCanvas script component.",
12942
+ "description": "Gets the underlying PlayCanvas script component. `null` until the element is\nready — see ComponentElement.component.",
12943
12943
  "return": {
12944
12944
  "type": {
12945
12945
  "text": ""
@@ -13321,9 +13321,9 @@
13321
13321
  "kind": "field",
13322
13322
  "name": "component",
13323
13323
  "type": {
13324
- "text": "Component | null"
13324
+ "text": "ScrollViewComponent | null"
13325
13325
  },
13326
- "description": "Gets the underlying PlayCanvas scroll view component.",
13326
+ "description": "Gets the underlying PlayCanvas scroll view component. `null` until the element is\nready — see ComponentElement.component.",
13327
13327
  "return": {
13328
13328
  "type": {
13329
13329
  "text": ""
@@ -13780,9 +13780,9 @@
13780
13780
  "kind": "field",
13781
13781
  "name": "component",
13782
13782
  "type": {
13783
- "text": "Component | null"
13783
+ "text": "ScrollbarComponent | null"
13784
13784
  },
13785
- "description": "Gets the underlying PlayCanvas scrollbar component.",
13785
+ "description": "Gets the underlying PlayCanvas scrollbar component. `null` until the element is\nready — see ComponentElement.component.",
13786
13786
  "return": {
13787
13787
  "type": {
13788
13788
  "text": ""
@@ -14033,9 +14033,9 @@
14033
14033
  "kind": "field",
14034
14034
  "name": "component",
14035
14035
  "type": {
14036
- "text": "Component | null"
14036
+ "text": "SoundComponent | null"
14037
14037
  },
14038
- "description": "Gets the underlying PlayCanvas sound component.",
14038
+ "description": "Gets the underlying PlayCanvas sound component. `null` until the element is\nready — see ComponentElement.component.",
14039
14039
  "return": {
14040
14040
  "type": {
14041
14041
  "text": ""
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Resolves entity reference strings against the document. A reference beginning with `#` is a
3
+ * document-wide selector (an element id, or any selector rooted in one); anything else is an
4
+ * entity name, resolved lexically through the entity hierarchy first and against the document
5
+ * after — never as a selector or an id.
6
+ *
7
+ * Unlike the attribute parsers in `parse.ts`, these helpers touch the DOM, and `findEntityElement`
8
+ * and `getEntity` return `null` instead of falling back to a default. They also do not warn -
9
+ * what an unresolved reference means depends on the element holding it - so elements report
10
+ * through `resolveEntity`, which takes that meaning as parameters, and `pc-script` builds its own
11
+ * message from the lower-level pieces.
12
+ */
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Resolves entity reference strings against the document. A reference beginning with `#` is a
3
+ * document-wide selector (an element id, or any selector rooted in one); anything else is an
4
+ * entity name, resolved lexically through the entity hierarchy first and against the document
5
+ * after — never as a selector or an id.
6
+ *
7
+ * Unlike the attribute parsers in `parse.ts`, these helpers touch the DOM, and `findEntityElement`
8
+ * and `getEntity` return `null` instead of falling back to a default. They also do not warn -
9
+ * what an unresolved reference means depends on the element holding it - so elements report
10
+ * through `resolveEntity`, which takes that meaning as parameters, and `pc-script` builds its own
11
+ * message from the lower-level pieces.
12
+ */
13
+ export {};
@@ -130,11 +130,12 @@ declare class MaterialElement extends HTMLElement {
130
130
  private _useSkybox;
131
131
  private _useTonemap;
132
132
  /**
133
- * Pending `load` handlers, one per texture slot. A slot's handler is torn down when the slot is
134
- * reassigned or the element disconnects, so a late-arriving asset can never write a texture the
135
- * element no longer wants.
133
+ * One asset binding per texture slot, created on first use and kept for the element's
134
+ * lifetime. A slot's binding is superseded when the slot is reassigned and cancelled when the
135
+ * element disconnects, so a late-arriving asset can never write a texture the element no
136
+ * longer wants.
136
137
  */
137
- private _mapHandles;
138
+ private _mapBindings;
138
139
  private _updateScheduled;
139
140
  private _glossConflictWarned;
140
141
  /**
@@ -163,8 +164,9 @@ declare class MaterialElement extends HTMLElement {
163
164
  */
164
165
  private _warnGlossConflict;
165
166
  /**
166
- * Points a texture slot at the resource of a `pc-asset`, waiting for the asset to load when it
167
- * has not already. An empty id clears the slot.
167
+ * Points a texture slot at the resource of a `pc-asset`, waiting for the asset to load when
168
+ * it has not already. An empty id clears the slot; a slot keeps its current texture while
169
+ * the new asset loads, and also across a failed load - a later reload can still deliver.
168
170
  *
169
171
  * @param id - The id of the `pc-asset`, or an empty string to clear the slot.
170
172
  * @param slot - The material property to write.
@@ -130,11 +130,12 @@ declare class MaterialElement extends HTMLElement {
130
130
  private _useSkybox;
131
131
  private _useTonemap;
132
132
  /**
133
- * Pending `load` handlers, one per texture slot. A slot's handler is torn down when the slot is
134
- * reassigned or the element disconnects, so a late-arriving asset can never write a texture the
135
- * element no longer wants.
133
+ * One asset binding per texture slot, created on first use and kept for the element's
134
+ * lifetime. A slot's binding is superseded when the slot is reassigned and cancelled when the
135
+ * element disconnects, so a late-arriving asset can never write a texture the element no
136
+ * longer wants.
136
137
  */
137
- private _mapHandles;
138
+ private _mapBindings;
138
139
  private _updateScheduled;
139
140
  private _glossConflictWarned;
140
141
  /**
@@ -163,8 +164,9 @@ declare class MaterialElement extends HTMLElement {
163
164
  */
164
165
  private _warnGlossConflict;
165
166
  /**
166
- * Points a texture slot at the resource of a `pc-asset`, waiting for the asset to load when it
167
- * has not already. An empty id clears the slot.
167
+ * Points a texture slot at the resource of a `pc-asset`, waiting for the asset to load when
168
+ * it has not already. An empty id clears the slot; a slot keeps its current texture while
169
+ * the new asset loads, and also across a failed load - a later reload can still deliver.
168
170
  *
169
171
  * @param id - The id of the `pc-asset`, or an empty string to clear the slot.
170
172
  * @param slot - The material property to write.
package/dist/model.d.cts CHANGED
@@ -120,18 +120,18 @@ declare class ModelElement extends EntityOwnerElement {
120
120
  private _contentEntity;
121
121
  /**
122
122
  * Incremented on every new load, on disconnect, and when the host entity dies, and captured
123
- * by a load when it starts. A load that resumes from an await or a load callback abandons
124
- * itself if the value has moved on, so a superseded load can neither instantiate a second
125
- * content root nor parent one under a host a newer cycle has already replaced.
123
+ * by a load when it starts. A load that resumes from an await abandons itself if the value
124
+ * has moved on, so a superseded load can neither instantiate a second content root nor
125
+ * parent one under a host a newer cycle has already replaced. The asset subscription itself
126
+ * is guarded by the binding below.
126
127
  */
127
128
  private _loadGeneration;
128
129
  /**
129
- * The pending asset subscriptions of the current load, if it is waiting for its asset. Held
130
- * so that whatever supersedes the load can detach the handlers from the asset, rather than
131
- * leave them registered until the asset settles (or forever, if it never does).
130
+ * The subscription to the current container asset while it is loading. Whatever supersedes
131
+ * the load a newer load, a disconnect, the host dying — cancels it, so the asset settling
132
+ * later cannot deliver to a load that no longer owns the element.
132
133
  */
133
- private _loadHandle;
134
- private _errorHandle;
134
+ private _binding;
135
135
  /**
136
136
  * The root entity of the instantiated model content, parented beneath the host entity.
137
137
  * `null` until the container asset has loaded and been instantiated, after a failed load,
@@ -170,7 +170,6 @@ declare class ModelElement extends EntityOwnerElement {
170
170
  * @param entity - The host entity that was destroyed.
171
171
  */
172
172
  protected _onEntityDestroy(entity: Entity): void;
173
- private _detachLoadHandlers;
174
173
  /**
175
174
  * Resolves readiness and dispatches the `load` event. Called once the instantiated content
176
175
  * has been parented beneath the host — the host itself is already in the scene graph by
package/dist/model.d.ts CHANGED
@@ -120,18 +120,18 @@ declare class ModelElement extends EntityOwnerElement {
120
120
  private _contentEntity;
121
121
  /**
122
122
  * Incremented on every new load, on disconnect, and when the host entity dies, and captured
123
- * by a load when it starts. A load that resumes from an await or a load callback abandons
124
- * itself if the value has moved on, so a superseded load can neither instantiate a second
125
- * content root nor parent one under a host a newer cycle has already replaced.
123
+ * by a load when it starts. A load that resumes from an await abandons itself if the value
124
+ * has moved on, so a superseded load can neither instantiate a second content root nor
125
+ * parent one under a host a newer cycle has already replaced. The asset subscription itself
126
+ * is guarded by the binding below.
126
127
  */
127
128
  private _loadGeneration;
128
129
  /**
129
- * The pending asset subscriptions of the current load, if it is waiting for its asset. Held
130
- * so that whatever supersedes the load can detach the handlers from the asset, rather than
131
- * leave them registered until the asset settles (or forever, if it never does).
130
+ * The subscription to the current container asset while it is loading. Whatever supersedes
131
+ * the load a newer load, a disconnect, the host dying — cancels it, so the asset settling
132
+ * later cannot deliver to a load that no longer owns the element.
132
133
  */
133
- private _loadHandle;
134
- private _errorHandle;
134
+ private _binding;
135
135
  /**
136
136
  * The root entity of the instantiated model content, parented beneath the host entity.
137
137
  * `null` until the container asset has loaded and been instantiated, after a failed load,
@@ -170,7 +170,6 @@ declare class ModelElement extends EntityOwnerElement {
170
170
  * @param entity - The host entity that was destroyed.
171
171
  */
172
172
  protected _onEntityDestroy(entity: Entity): void;
173
- private _detachLoadHandlers;
174
173
  /**
175
174
  * Resolves readiness and dispatches the `load` event. Called once the instantiated content
176
175
  * has been parented beneath the host — the host itself is already in the scene graph by
package/dist/parse.d.cts CHANGED
@@ -11,13 +11,5 @@
11
11
  * shared frozen constants (`Vec3.ZERO`, `Color.WHITE`) as defaults.
12
12
  * - `parseBool` and `parseTags` take no attribute name, because every value is valid for them and
13
13
  * so they never warn.
14
- *
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.
22
14
  */
23
15
  export {};
package/dist/parse.d.ts CHANGED
@@ -11,13 +11,5 @@
11
11
  * shared frozen constants (`Vec3.ZERO`, `Color.WHITE`) as defaults.
12
12
  * - `parseBool` and `parseTags` take no attribute name, because every value is valid for them and
13
13
  * so they never warn.
14
- *
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.
22
14
  */
23
15
  export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};