@playcanvas/web-components 0.12.0 → 0.13.1

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 (95) hide show
  1. package/README.md +1 -1
  2. package/dist/app.d.cts +281 -0
  3. package/dist/app.d.ts +61 -3
  4. package/dist/asset.d.cts +224 -0
  5. package/dist/asset.d.ts +8 -2
  6. package/dist/async-element.d.cts +103 -0
  7. package/dist/async-element.d.ts +6 -4
  8. package/dist/colors.d.cts +1 -0
  9. package/dist/components/button-component.d.cts +186 -0
  10. package/dist/components/button-component.d.ts +1 -1
  11. package/dist/components/camera-component.d.cts +253 -0
  12. package/dist/components/camera-component.d.ts +1 -1
  13. package/dist/components/collision-component.d.cts +73 -0
  14. package/dist/components/collision-component.d.ts +1 -1
  15. package/dist/components/component.d.cts +82 -0
  16. package/dist/components/component.d.ts +1 -1
  17. package/dist/components/element-component.d.cts +316 -0
  18. package/dist/components/element-component.d.ts +1 -1
  19. package/dist/components/gsplat-component.d.cts +108 -0
  20. package/dist/components/gsplat-component.d.ts +1 -1
  21. package/dist/components/layoutchild-component.d.cts +110 -0
  22. package/dist/components/layoutchild-component.d.ts +1 -1
  23. package/dist/components/layoutgroup-component.d.cts +136 -0
  24. package/dist/components/layoutgroup-component.d.ts +1 -1
  25. package/dist/components/light-component.d.cts +264 -0
  26. package/dist/components/light-component.d.ts +1 -1
  27. package/dist/components/listener-component.d.cts +20 -0
  28. package/dist/components/listener-component.d.ts +1 -1
  29. package/dist/components/particlesystem-component.d.cts +52 -0
  30. package/dist/components/particlesystem-component.d.ts +1 -1
  31. package/dist/components/render-component.d.cts +76 -0
  32. package/dist/components/render-component.d.ts +1 -1
  33. package/dist/components/rigidbody-component.d.cts +88 -0
  34. package/dist/components/rigidbody-component.d.ts +1 -1
  35. package/dist/components/screen-component.d.cts +70 -0
  36. package/dist/components/screen-component.d.ts +1 -1
  37. package/dist/components/script-component.d.cts +163 -0
  38. package/dist/components/script-component.d.ts +1 -1
  39. package/dist/components/script.d.cts +94 -0
  40. package/dist/components/script.d.ts +1 -1
  41. package/dist/components/scrollbar-component.d.cts +69 -0
  42. package/dist/components/scrollbar-component.d.ts +1 -1
  43. package/dist/components/scrollview-component.d.cts +178 -0
  44. package/dist/components/scrollview-component.d.ts +1 -1
  45. package/dist/components/sound-component.d.cts +108 -0
  46. package/dist/components/sound-component.d.ts +1 -1
  47. package/dist/components/sound-slot.d.cts +134 -0
  48. package/dist/components/sound-slot.d.ts +2 -2
  49. package/dist/custom-elements.json +80 -22
  50. package/dist/entity-base.d.cts +67 -0
  51. package/dist/entity-base.d.ts +2 -2
  52. package/dist/entity.d.cts +131 -0
  53. package/dist/entity.d.ts +1 -1
  54. package/dist/index.d.cts +79 -0
  55. package/dist/index.d.ts +33 -33
  56. package/dist/loading-bar.d.cts +35 -0
  57. package/dist/material.d.cts +1011 -0
  58. package/dist/model.d.cts +72 -0
  59. package/dist/model.d.ts +1 -1
  60. package/dist/module.d.cts +29 -0
  61. package/dist/module.d.ts +16 -10
  62. package/dist/node.d.cts +253 -0
  63. package/dist/node.d.ts +1 -1
  64. package/dist/parse.d.cts +147 -0
  65. package/dist/pwc.cjs +285 -92
  66. package/dist/pwc.cjs.map +1 -1
  67. package/dist/pwc.js +286 -93
  68. package/dist/pwc.js.map +1 -1
  69. package/dist/pwc.min.js +1 -1
  70. package/dist/pwc.min.js.map +1 -1
  71. package/dist/pwc.min.mjs +1 -1
  72. package/dist/pwc.min.mjs.map +1 -1
  73. package/dist/pwc.mjs +286 -93
  74. package/dist/pwc.mjs.map +1 -1
  75. package/dist/scene.d.cts +117 -0
  76. package/dist/scene.d.ts +1 -1
  77. package/dist/sky.d.cts +121 -0
  78. package/dist/sky.d.ts +1 -1
  79. package/dist/vscode.html-custom-data.json +3 -3
  80. package/dist/web-types.json +42 -6
  81. package/package.json +16 -7
  82. package/src/app.ts +211 -49
  83. package/src/asset.ts +34 -2
  84. package/src/async-element.ts +4 -2
  85. package/src/components/button-component.ts +7 -7
  86. package/src/components/element-component.ts +7 -7
  87. package/src/components/gsplat-component.ts +3 -3
  88. package/src/components/particlesystem-component.ts +7 -8
  89. package/src/components/script-component.ts +2 -2
  90. package/src/components/sound-slot.ts +2 -2
  91. package/src/loading-bar.ts +2 -2
  92. package/src/material.ts +2 -2
  93. package/src/model.ts +2 -5
  94. package/src/module.ts +39 -20
  95. package/src/sky.ts +2 -3
@@ -0,0 +1,82 @@
1
+ import type { Component } from 'playcanvas';
2
+ import { AsyncElement } from '../async-element.cjs';
3
+ /**
4
+ * Represents a component in the PlayCanvas engine.
5
+ *
6
+ * @category Components
7
+ */
8
+ declare class ComponentElement extends AsyncElement {
9
+ private _componentName;
10
+ private _enabled;
11
+ private _component;
12
+ private _appElement;
13
+ /**
14
+ * The element hosting this component, held so the host's readiness cycles can be observed
15
+ * even after `closestEntity` would no longer resolve (during teardown).
16
+ */
17
+ private _hostElement;
18
+ /**
19
+ * The listener re-applying this component when the host's readiness cycles. Held for
20
+ * removal on disconnect.
21
+ */
22
+ private _hostReadyListener;
23
+ /**
24
+ * Incremented on every connect and disconnect. connectedCallback captures the value on entry
25
+ * and abandons itself wherever it resumes from an await if the value has moved on — so a
26
+ * callback whose element was removed cannot act on a torn-down tree, and one whose element
27
+ * was removed and re-inserted (which runs a callback of its own) cannot add the component a
28
+ * second time.
29
+ */
30
+ private _connectionGeneration;
31
+ /**
32
+ * Creates a new ComponentElement instance.
33
+ *
34
+ * @param componentName - The name of the component.
35
+ * @ignore
36
+ */
37
+ constructor(componentName: string);
38
+ /**
39
+ * Returns the data the component is created with. Overridden by subclasses to supply the
40
+ * initial values of their cached properties.
41
+ *
42
+ * @returns The initial component data.
43
+ */
44
+ protected getInitialComponentData(): {};
45
+ /**
46
+ * Creates the component on the host's current entity, removing it first from a previous
47
+ * entity that is still alive (a retargeted `<pc-node>` moves its decorations with it). When
48
+ * the entity already has a component of this type — a glTF node arriving with its authored
49
+ * `render` component, say — warns and leaves `component` null. The element-level warning is
50
+ * load-bearing: the engine's own duplicate-addComponent warning is Debug-stripped from
51
+ * production builds, which would otherwise leave a silent null.
52
+ */
53
+ private _applyComponent;
54
+ private _addComponent;
55
+ /**
56
+ * Configures the newly added component. Overridden by subclasses whose setup goes beyond
57
+ * the initial data — child-element handling, asset resolution and the like.
58
+ */
59
+ protected initComponent(): void;
60
+ connectedCallback(): Promise<void>;
61
+ disconnectedCallback(): void;
62
+ /**
63
+ * The PlayCanvas component instance. `null` until the element is ready, and also for an
64
+ * element that is not a descendant of a `<pc-entity>` — await {@link whenReady} or the
65
+ * element's `ready()` promise before accessing it.
66
+ * @returns The component instance, or `null`.
67
+ */
68
+ get component(): Component | null;
69
+ /**
70
+ * Sets the enabled state of the component.
71
+ * @param value - The enabled state of the component.
72
+ */
73
+ set enabled(value: boolean);
74
+ /**
75
+ * Gets the enabled state of the component.
76
+ * @returns The enabled state of the component.
77
+ */
78
+ get enabled(): boolean;
79
+ static get observedAttributes(): string[];
80
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
81
+ }
82
+ export { ComponentElement };
@@ -1,5 +1,5 @@
1
1
  import type { Component } from 'playcanvas';
2
- import { AsyncElement } from '../async-element';
2
+ import { AsyncElement } from '../async-element.js';
3
3
  /**
4
4
  * Represents a component in the PlayCanvas engine.
5
5
  *
@@ -0,0 +1,316 @@
1
+ import type { ElementComponent } from 'playcanvas';
2
+ import { Color, Vec2, Vec4 } from 'playcanvas';
3
+ import { ComponentElement } from './component.cjs';
4
+ /**
5
+ * The ElementComponentElement interface provides properties and methods for manipulating
6
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-element/ | `<pc-element>`} elements.
7
+ * The ElementComponentElement interface also inherits the properties and methods of the
8
+ * {@link HTMLElement} interface.
9
+ *
10
+ * @category Components
11
+ */
12
+ declare class ElementComponentElement extends ComponentElement {
13
+ private _anchor;
14
+ private _autoWidth;
15
+ private _autoHeight;
16
+ private _autoFitWidth;
17
+ private _autoFitHeight;
18
+ private _color;
19
+ private _enableMarkup;
20
+ private _fontAsset;
21
+ private _fontSize;
22
+ private _maxFontSize;
23
+ private _minFontSize;
24
+ private _height;
25
+ private _lineHeight;
26
+ private _margin;
27
+ private _mask;
28
+ private _opacity;
29
+ private _pivot;
30
+ private _pixelsPerUnit;
31
+ private _spriteAsset;
32
+ private _spriteFrame;
33
+ private _text;
34
+ private _textureAsset;
35
+ private _type;
36
+ private _useInput;
37
+ private _width;
38
+ private _wrapLines;
39
+ /** @ignore */
40
+ constructor();
41
+ protected initComponent(): void;
42
+ protected getInitialComponentData(): Record<string, any>;
43
+ /**
44
+ * Gets the underlying PlayCanvas element component.
45
+ * @returns The element component.
46
+ */
47
+ get component(): ElementComponent;
48
+ /**
49
+ * Sets the anchor of the element component.
50
+ * @param value - The anchor.
51
+ */
52
+ set anchor(value: Vec4);
53
+ /**
54
+ * Gets the anchor of the element component.
55
+ * @returns The anchor.
56
+ */
57
+ get anchor(): Vec4;
58
+ /**
59
+ * Sets whether the element component should automatically adjust its width to the text content
60
+ * (text elements only).
61
+ * @param value - Whether to automatically adjust the width.
62
+ */
63
+ set autoWidth(value: boolean);
64
+ /**
65
+ * Gets whether the element component should automatically adjust its width.
66
+ * @returns Whether to automatically adjust the width.
67
+ */
68
+ get autoWidth(): boolean;
69
+ /**
70
+ * Sets whether the element component should automatically adjust its height to the text content
71
+ * (text elements only).
72
+ * @param value - Whether to automatically adjust the height.
73
+ */
74
+ set autoHeight(value: boolean);
75
+ /**
76
+ * Gets whether the element component should automatically adjust its height.
77
+ * @returns Whether to automatically adjust the height.
78
+ */
79
+ get autoHeight(): boolean;
80
+ /**
81
+ * Sets the color of the element component.
82
+ * @param value - The color.
83
+ */
84
+ set color(value: Color);
85
+ /**
86
+ * Gets the color of the element component.
87
+ * @returns The color.
88
+ */
89
+ get color(): Color;
90
+ /**
91
+ * Sets whether the element component should use markup.
92
+ * @param value - Whether to enable markup.
93
+ */
94
+ set enableMarkup(value: boolean);
95
+ /**
96
+ * Gets whether the element component should use markup.
97
+ * @returns Whether markup is enabled.
98
+ */
99
+ get enableMarkup(): boolean;
100
+ /**
101
+ * Sets the id of the `pc-asset` to use for the font (text elements).
102
+ * @param value - The font asset ID.
103
+ */
104
+ set fontAsset(value: string);
105
+ /**
106
+ * Gets the id of the `pc-asset` to use for the font.
107
+ * @returns The font asset ID.
108
+ */
109
+ get fontAsset(): string;
110
+ /**
111
+ * Sets the font size of the element component.
112
+ * @param value - The font size.
113
+ */
114
+ set fontSize(value: number);
115
+ /**
116
+ * Gets the font size of the element component.
117
+ * @returns The font size.
118
+ */
119
+ get fontSize(): number;
120
+ /**
121
+ * Sets the height of the element component.
122
+ * @param value - The height.
123
+ */
124
+ set height(value: number);
125
+ /**
126
+ * Gets the height of the element component.
127
+ * @returns The height.
128
+ */
129
+ get height(): number;
130
+ /**
131
+ * Sets the line height of the element component.
132
+ * @param value - The line height.
133
+ */
134
+ set lineHeight(value: number);
135
+ /**
136
+ * Gets the line height of the element component.
137
+ * @returns The line height.
138
+ */
139
+ get lineHeight(): number;
140
+ /**
141
+ * Sets the margin of the element component (used to inset the element from stretched anchors).
142
+ * @param value - The margin as a Vec4 (left, bottom, right, top).
143
+ */
144
+ set margin(value: Vec4 | null);
145
+ /**
146
+ * Gets the margin of the element component.
147
+ * @returns The margin.
148
+ */
149
+ get margin(): Vec4 | null;
150
+ /**
151
+ * Sets whether the element component is a mask, clipping its descendants to its bounds (image
152
+ * elements only).
153
+ * @param value - Whether the element is a mask.
154
+ */
155
+ set mask(value: boolean);
156
+ /**
157
+ * Gets whether the element component is a mask.
158
+ * @returns Whether the element is a mask.
159
+ */
160
+ get mask(): boolean;
161
+ /**
162
+ * Sets the opacity of the element component.
163
+ * @param value - The opacity (0 to 1).
164
+ */
165
+ set opacity(value: number);
166
+ /**
167
+ * Gets the opacity of the element component.
168
+ * @returns The opacity.
169
+ */
170
+ get opacity(): number;
171
+ /**
172
+ * Sets the pivot of the element component.
173
+ * @param value - The pivot.
174
+ */
175
+ set pivot(value: Vec2);
176
+ /**
177
+ * Gets the pivot of the element component.
178
+ * @returns The pivot.
179
+ */
180
+ get pivot(): Vec2;
181
+ /**
182
+ * Sets the number of pixels per unit to use when rendering a sprite (image elements only).
183
+ * @param value - The pixels per unit.
184
+ */
185
+ set pixelsPerUnit(value: number | null);
186
+ /**
187
+ * Gets the number of pixels per unit used when rendering a sprite.
188
+ * @returns The pixels per unit.
189
+ */
190
+ get pixelsPerUnit(): number | null;
191
+ /**
192
+ * Sets the id of the `pc-asset` to use for the sprite (image elements only).
193
+ * @param value - The sprite asset ID.
194
+ */
195
+ set spriteAsset(value: string);
196
+ /**
197
+ * Gets the id of the `pc-asset` to use for the sprite.
198
+ * @returns The sprite asset ID.
199
+ */
200
+ get spriteAsset(): string;
201
+ /**
202
+ * Sets the frame of the sprite to render (image elements only).
203
+ * @param value - The sprite frame index.
204
+ */
205
+ set spriteFrame(value: number);
206
+ /**
207
+ * Gets the frame of the sprite to render.
208
+ * @returns The sprite frame index.
209
+ */
210
+ get spriteFrame(): number;
211
+ /**
212
+ * Sets the text of the element component.
213
+ * @param value - The text.
214
+ */
215
+ set text(value: string);
216
+ /**
217
+ * Gets the text of the element component.
218
+ * @returns The text.
219
+ */
220
+ get text(): string;
221
+ /**
222
+ * Sets the id of the `pc-asset` to use for the texture (image elements only).
223
+ * @param value - The texture asset ID.
224
+ */
225
+ set textureAsset(value: string);
226
+ /**
227
+ * Gets the id of the `pc-asset` to use for the texture.
228
+ * @returns The texture asset ID.
229
+ */
230
+ get textureAsset(): string;
231
+ /**
232
+ * Sets the type of the element component.
233
+ * @param value - The type.
234
+ */
235
+ set type(value: 'group' | 'image' | 'text');
236
+ /**
237
+ * Gets the type of the element component.
238
+ * @returns The type.
239
+ */
240
+ get type(): 'group' | 'image' | 'text';
241
+ /**
242
+ * Sets whether the element component accepts input events (required for buttons and scrolling).
243
+ * @param value - Whether the element accepts input.
244
+ */
245
+ set useInput(value: boolean);
246
+ /**
247
+ * Gets whether the element component accepts input events.
248
+ * @returns Whether the element accepts input.
249
+ */
250
+ get useInput(): boolean;
251
+ /**
252
+ * Sets the width of the element component.
253
+ * @param value - The width.
254
+ */
255
+ set width(value: number);
256
+ /**
257
+ * Gets the width of the element component.
258
+ * @returns The width.
259
+ */
260
+ get width(): number;
261
+ /**
262
+ * Sets whether the element component should wrap lines.
263
+ * @param value - Whether to wrap lines.
264
+ */
265
+ set wrapLines(value: boolean);
266
+ /**
267
+ * Gets whether the element component should wrap lines.
268
+ * @returns Whether to wrap lines.
269
+ */
270
+ get wrapLines(): boolean;
271
+ /**
272
+ * Sets whether a text element should automatically reduce its font size (down to `min-font-size`)
273
+ * so the text fits within the element's width. Requires `auto-width` to be `false`.
274
+ * @param value - Whether to auto-fit the width.
275
+ */
276
+ set autoFitWidth(value: boolean);
277
+ /**
278
+ * Gets whether a text element automatically reduces its font size to fit its width.
279
+ * @returns Whether the width is auto-fit.
280
+ */
281
+ get autoFitWidth(): boolean;
282
+ /**
283
+ * Sets whether a text element should automatically reduce its font size (down to `min-font-size`)
284
+ * so the text fits within the element's height. Requires `auto-height` to be `false`.
285
+ * @param value - Whether to auto-fit the height.
286
+ */
287
+ set autoFitHeight(value: boolean);
288
+ /**
289
+ * Gets whether a text element automatically reduces its font size to fit its height.
290
+ * @returns Whether the height is auto-fit.
291
+ */
292
+ get autoFitHeight(): boolean;
293
+ /**
294
+ * Sets the smallest font size a text element may use when auto-fitting.
295
+ * @param value - The minimum font size.
296
+ */
297
+ set minFontSize(value: number);
298
+ /**
299
+ * Gets the smallest font size a text element may use when auto-fitting.
300
+ * @returns The minimum font size.
301
+ */
302
+ get minFontSize(): number;
303
+ /**
304
+ * Sets the largest font size a text element may use when auto-fitting.
305
+ * @param value - The maximum font size.
306
+ */
307
+ set maxFontSize(value: number);
308
+ /**
309
+ * Gets the largest font size a text element may use when auto-fitting.
310
+ * @returns The maximum font size.
311
+ */
312
+ get maxFontSize(): number;
313
+ static get observedAttributes(): string[];
314
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
315
+ }
316
+ export { ElementComponentElement };
@@ -1,6 +1,6 @@
1
1
  import type { ElementComponent } from 'playcanvas';
2
2
  import { Color, Vec2, Vec4 } from 'playcanvas';
3
- import { ComponentElement } from './component';
3
+ import { ComponentElement } from './component.js';
4
4
  /**
5
5
  * The ElementComponentElement interface provides properties and methods for manipulating
6
6
  * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-element/ | `<pc-element>`} elements.
@@ -0,0 +1,108 @@
1
+ import type { GSplatComponent } from 'playcanvas';
2
+ import { ComponentElement } from './component.cjs';
3
+ /**
4
+ * The GSplatComponentElement interface provides properties and methods for manipulating
5
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-gsplat/ | `<pc-gsplat>`} elements.
6
+ * The GSplatComponentElement interface also inherits the properties and methods of the
7
+ * {@link HTMLElement} interface.
8
+ *
9
+ * @category Components
10
+ */
11
+ declare class GSplatComponentElement extends ComponentElement {
12
+ private _asset;
13
+ private _castShadows;
14
+ private _lodBaseDistance;
15
+ private _lodMultiplier;
16
+ private _lodRangeMin;
17
+ private _lodRangeMax;
18
+ /** @ignore */
19
+ constructor();
20
+ protected getInitialComponentData(): {
21
+ asset: import("playcanvas").Asset | null | undefined;
22
+ castShadows: boolean;
23
+ lodBaseDistance: number;
24
+ lodMultiplier: number;
25
+ lodRangeMin: number;
26
+ lodRangeMax: number;
27
+ };
28
+ /**
29
+ * Gets the underlying PlayCanvas gsplat component.
30
+ * @returns The gsplat component.
31
+ */
32
+ get component(): GSplatComponent;
33
+ /**
34
+ * Sets id of the `pc-asset` to use for the splat.
35
+ * @param value - The asset ID.
36
+ */
37
+ set asset(value: string);
38
+ /**
39
+ * Gets the id of the `pc-asset` to use for the splat.
40
+ * @returns The asset ID.
41
+ */
42
+ get asset(): string;
43
+ /**
44
+ * Sets whether the splat casts shadows.
45
+ * @param value - Whether the splat casts shadows.
46
+ */
47
+ set castShadows(value: boolean);
48
+ /**
49
+ * Gets whether the splat casts shadows.
50
+ * @returns Whether the splat casts shadows.
51
+ */
52
+ get castShadows(): boolean;
53
+ /**
54
+ * Sets the base distance for the first LOD transition (LOD 0 to LOD 1). Splats closer than
55
+ * this distance use the highest quality LOD. Each subsequent LOD level transitions at a
56
+ * progressively larger distance, controlled by {@link lodMultiplier}. Clamped to a minimum of
57
+ * 0.1. Defaults to 5. Only affects assets that contain LOD levels (e.g. `.lod-meta.json`).
58
+ * @param value - The LOD base distance.
59
+ */
60
+ set lodBaseDistance(value: number);
61
+ /**
62
+ * Gets the base distance for the first LOD transition.
63
+ * @returns The LOD base distance.
64
+ */
65
+ get lodBaseDistance(): number;
66
+ /**
67
+ * Sets the multiplier between successive LOD distance thresholds. Each LOD level transitions
68
+ * at this factor times the previous level's distance, creating a geometric progression. Lower
69
+ * values keep higher quality at distance; higher values switch to coarser LODs sooner. Clamped
70
+ * to a minimum of 1.2. Defaults to 3. Only affects assets that contain LOD levels (e.g.
71
+ * `.lod-meta.json`).
72
+ * @param value - The LOD multiplier.
73
+ */
74
+ set lodMultiplier(value: number);
75
+ /**
76
+ * Gets the multiplier between successive LOD distance thresholds.
77
+ * @returns The LOD multiplier.
78
+ */
79
+ get lodMultiplier(): number;
80
+ /**
81
+ * Sets the minimum allowed LOD index (inclusive). The LOD selected by distance is clamped so it
82
+ * never goes finer (lower index) than this value. Raising it avoids downloading the highest
83
+ * quality (largest) LOD files. Defaults to 0. Only affects assets that contain LOD levels (e.g.
84
+ * `.lod-meta.json`).
85
+ * @param value - The minimum LOD index.
86
+ */
87
+ set lodRangeMin(value: number);
88
+ /**
89
+ * Gets the minimum allowed LOD index.
90
+ * @returns The minimum LOD index.
91
+ */
92
+ get lodRangeMin(): number;
93
+ /**
94
+ * Sets the maximum allowed LOD index (inclusive). The LOD selected by distance is clamped so it
95
+ * never goes coarser (higher index) than this value. The default of 99 effectively means "no
96
+ * cap". Defaults to 99. Only affects assets that contain LOD levels (e.g. `.lod-meta.json`).
97
+ * @param value - The maximum LOD index.
98
+ */
99
+ set lodRangeMax(value: number);
100
+ /**
101
+ * Gets the maximum allowed LOD index.
102
+ * @returns The maximum LOD index.
103
+ */
104
+ get lodRangeMax(): number;
105
+ static get observedAttributes(): string[];
106
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
107
+ }
108
+ export { GSplatComponentElement };
@@ -1,5 +1,5 @@
1
1
  import type { GSplatComponent } from 'playcanvas';
2
- import { ComponentElement } from './component';
2
+ import { ComponentElement } from './component.js';
3
3
  /**
4
4
  * The GSplatComponentElement interface provides properties and methods for manipulating
5
5
  * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-gsplat/ | `<pc-gsplat>`} elements.
@@ -0,0 +1,110 @@
1
+ import type { LayoutChildComponent } from 'playcanvas';
2
+ import { ComponentElement } from './component.cjs';
3
+ /**
4
+ * The LayoutChildComponentElement interface provides properties and methods for manipulating
5
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-layoutchild/ | `<pc-layoutchild>`} elements.
6
+ * The LayoutChildComponentElement interface also inherits the properties and methods of the
7
+ * {@link HTMLElement} interface.
8
+ *
9
+ * @category Components
10
+ */
11
+ declare class LayoutChildComponentElement extends ComponentElement {
12
+ private _minWidth;
13
+ private _minHeight;
14
+ private _maxWidth;
15
+ private _maxHeight;
16
+ private _fitWidthProportion;
17
+ private _fitHeightProportion;
18
+ private _excludeFromLayout;
19
+ /** @ignore */
20
+ constructor();
21
+ protected getInitialComponentData(): {
22
+ minWidth: number;
23
+ minHeight: number;
24
+ maxWidth: number | null;
25
+ maxHeight: number | null;
26
+ fitWidthProportion: number;
27
+ fitHeightProportion: number;
28
+ excludeFromLayout: boolean;
29
+ };
30
+ /**
31
+ * Gets the underlying PlayCanvas layout child component.
32
+ * @returns The layout child component.
33
+ */
34
+ get component(): LayoutChildComponent;
35
+ /**
36
+ * Sets the minimum width the element should be laid out with.
37
+ * @param value - The minimum width.
38
+ */
39
+ set minWidth(value: number);
40
+ /**
41
+ * Gets the minimum width the element should be laid out with.
42
+ * @returns The minimum width.
43
+ */
44
+ get minWidth(): number;
45
+ /**
46
+ * Sets the minimum height the element should be laid out with.
47
+ * @param value - The minimum height.
48
+ */
49
+ set minHeight(value: number);
50
+ /**
51
+ * Gets the minimum height the element should be laid out with.
52
+ * @returns The minimum height.
53
+ */
54
+ get minHeight(): number;
55
+ /**
56
+ * Sets the maximum width the element should be laid out with (or `null` for no limit).
57
+ * @param value - The maximum width.
58
+ */
59
+ set maxWidth(value: number | null);
60
+ /**
61
+ * Gets the maximum width the element should be laid out with.
62
+ * @returns The maximum width.
63
+ */
64
+ get maxWidth(): number | null;
65
+ /**
66
+ * Sets the maximum height the element should be laid out with (or `null` for no limit).
67
+ * @param value - The maximum height.
68
+ */
69
+ set maxHeight(value: number | null);
70
+ /**
71
+ * Gets the maximum height the element should be laid out with.
72
+ * @returns The maximum height.
73
+ */
74
+ get maxHeight(): number | null;
75
+ /**
76
+ * Sets the proportion of the container's spare width this element should take (when the layout
77
+ * group's `width-fitting` is set to stretch or shrink).
78
+ * @param value - The fit width proportion.
79
+ */
80
+ set fitWidthProportion(value: number);
81
+ /**
82
+ * Gets the proportion of the container's spare width this element should take.
83
+ * @returns The fit width proportion.
84
+ */
85
+ get fitWidthProportion(): number;
86
+ /**
87
+ * Sets the proportion of the container's spare height this element should take (when the layout
88
+ * group's `height-fitting` is set to stretch or shrink).
89
+ * @param value - The fit height proportion.
90
+ */
91
+ set fitHeightProportion(value: number);
92
+ /**
93
+ * Gets the proportion of the container's spare height this element should take.
94
+ * @returns The fit height proportion.
95
+ */
96
+ get fitHeightProportion(): number;
97
+ /**
98
+ * Sets whether the element should be excluded from the layout (and thus not take up space).
99
+ * @param value - Whether to exclude the element from layout.
100
+ */
101
+ set excludeFromLayout(value: boolean);
102
+ /**
103
+ * Gets whether the element is excluded from the layout.
104
+ * @returns Whether the element is excluded from layout.
105
+ */
106
+ get excludeFromLayout(): boolean;
107
+ static get observedAttributes(): string[];
108
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
109
+ }
110
+ export { LayoutChildComponentElement };
@@ -1,5 +1,5 @@
1
1
  import type { LayoutChildComponent } from 'playcanvas';
2
- import { ComponentElement } from './component';
2
+ import { ComponentElement } from './component.js';
3
3
  /**
4
4
  * The LayoutChildComponentElement interface provides properties and methods for manipulating
5
5
  * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-layoutchild/ | `<pc-layoutchild>`} elements.