@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,136 @@
1
+ import type { LayoutGroupComponent } from 'playcanvas';
2
+ import { Vec2, Vec4 } from 'playcanvas';
3
+ import { ComponentElement } from './component.cjs';
4
+ /**
5
+ * The LayoutGroupComponentElement interface provides properties and methods for manipulating
6
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-layoutgroup/ | `<pc-layoutgroup>`} elements.
7
+ * The LayoutGroupComponentElement interface also inherits the properties and methods of the
8
+ * {@link HTMLElement} interface.
9
+ *
10
+ * @category Components
11
+ */
12
+ declare class LayoutGroupComponentElement extends ComponentElement {
13
+ private _orientation;
14
+ private _reverseX;
15
+ private _reverseY;
16
+ private _alignment;
17
+ private _padding;
18
+ private _spacing;
19
+ private _widthFitting;
20
+ private _heightFitting;
21
+ private _wrap;
22
+ /** @ignore */
23
+ constructor();
24
+ protected getInitialComponentData(): {
25
+ orientation: number | undefined;
26
+ reverseX: boolean;
27
+ reverseY: boolean;
28
+ alignment: Vec2;
29
+ padding: Vec4;
30
+ spacing: Vec2;
31
+ widthFitting: number | undefined;
32
+ heightFitting: number | undefined;
33
+ wrap: boolean;
34
+ };
35
+ /**
36
+ * Gets the underlying PlayCanvas layout group component.
37
+ * @returns The layout group component.
38
+ */
39
+ get component(): LayoutGroupComponent;
40
+ /**
41
+ * Sets the orientation of the layout group. Can be `horizontal` or `vertical`. Defaults to
42
+ * `horizontal`.
43
+ * @param value - The orientation.
44
+ */
45
+ set orientation(value: 'horizontal' | 'vertical');
46
+ /**
47
+ * Gets the orientation of the layout group.
48
+ * @returns The orientation.
49
+ */
50
+ get orientation(): "horizontal" | "vertical";
51
+ /**
52
+ * Sets whether the order of children is reversed along the horizontal axis.
53
+ * @param value - Whether to reverse the horizontal order.
54
+ */
55
+ set reverseX(value: boolean);
56
+ /**
57
+ * Gets whether the order of children is reversed along the horizontal axis.
58
+ * @returns Whether the horizontal order is reversed.
59
+ */
60
+ get reverseX(): boolean;
61
+ /**
62
+ * Sets whether the order of children is reversed along the vertical axis.
63
+ * @param value - Whether to reverse the vertical order.
64
+ */
65
+ set reverseY(value: boolean);
66
+ /**
67
+ * Gets whether the order of children is reversed along the vertical axis.
68
+ * @returns Whether the vertical order is reversed.
69
+ */
70
+ get reverseY(): boolean;
71
+ /**
72
+ * Sets the horizontal and vertical alignment of the child elements (each component 0 to 1).
73
+ * @param value - The alignment.
74
+ */
75
+ set alignment(value: Vec2);
76
+ /**
77
+ * Gets the alignment of the child elements.
78
+ * @returns The alignment.
79
+ */
80
+ get alignment(): Vec2;
81
+ /**
82
+ * Sets the padding around the layout group, as a Vec4 (left, bottom, right, top).
83
+ * @param value - The padding.
84
+ */
85
+ set padding(value: Vec4);
86
+ /**
87
+ * Gets the padding around the layout group.
88
+ * @returns The padding.
89
+ */
90
+ get padding(): Vec4;
91
+ /**
92
+ * Sets the spacing between child elements, as a Vec2 (x, y).
93
+ * @param value - The spacing.
94
+ */
95
+ set spacing(value: Vec2);
96
+ /**
97
+ * Gets the spacing between child elements.
98
+ * @returns The spacing.
99
+ */
100
+ get spacing(): Vec2;
101
+ /**
102
+ * Sets the fitting mode along the horizontal axis. Can be `none`, `stretch`, `shrink` or
103
+ * `both`. Defaults to `none`.
104
+ * @param value - The width fitting mode.
105
+ */
106
+ set widthFitting(value: 'none' | 'stretch' | 'shrink' | 'both');
107
+ /**
108
+ * Gets the fitting mode along the horizontal axis.
109
+ * @returns The width fitting mode.
110
+ */
111
+ get widthFitting(): "none" | "stretch" | "shrink" | "both";
112
+ /**
113
+ * Sets the fitting mode along the vertical axis. Can be `none`, `stretch`, `shrink` or
114
+ * `both`. Defaults to `none`.
115
+ * @param value - The height fitting mode.
116
+ */
117
+ set heightFitting(value: 'none' | 'stretch' | 'shrink' | 'both');
118
+ /**
119
+ * Gets the fitting mode along the vertical axis.
120
+ * @returns The height fitting mode.
121
+ */
122
+ get heightFitting(): "none" | "stretch" | "shrink" | "both";
123
+ /**
124
+ * Sets whether children wrap onto a new line/column when they overflow the group.
125
+ * @param value - Whether to wrap children.
126
+ */
127
+ set wrap(value: boolean);
128
+ /**
129
+ * Gets whether children wrap onto a new line/column when they overflow the group.
130
+ * @returns Whether children wrap.
131
+ */
132
+ get wrap(): boolean;
133
+ static get observedAttributes(): string[];
134
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
135
+ }
136
+ export { LayoutGroupComponentElement };
@@ -1,6 +1,6 @@
1
1
  import type { LayoutGroupComponent } from 'playcanvas';
2
2
  import { Vec2, Vec4 } from 'playcanvas';
3
- import { ComponentElement } from './component';
3
+ import { ComponentElement } from './component.js';
4
4
  /**
5
5
  * The LayoutGroupComponentElement interface provides properties and methods for manipulating
6
6
  * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-layoutgroup/ | `<pc-layoutgroup>`} elements.
@@ -0,0 +1,264 @@
1
+ import type { LightComponent } from 'playcanvas';
2
+ import { Color } from 'playcanvas';
3
+ import { ComponentElement } from './component.cjs';
4
+ /**
5
+ * The LightComponentElement interface provides properties and methods for manipulating
6
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-light/ | `<pc-light>`} elements.
7
+ * The LightComponentElement interface also inherits the properties and methods of the
8
+ * {@link HTMLElement} interface.
9
+ *
10
+ * @category Components
11
+ */
12
+ declare class LightComponentElement extends ComponentElement {
13
+ private _castShadows;
14
+ private _color;
15
+ private _innerConeAngle;
16
+ private _intensity;
17
+ private _normalOffsetBias;
18
+ private _outerConeAngle;
19
+ private _range;
20
+ private _shadowBias;
21
+ private _shadowDistance;
22
+ private _shadowIntensity;
23
+ private _shadowResolution;
24
+ private _shadowType;
25
+ private _type;
26
+ private _vsmBias;
27
+ private _vsmBlurSize;
28
+ private _penumbraSize;
29
+ private _penumbraFalloff;
30
+ private _shadowSamples;
31
+ private _shadowBlockerSamples;
32
+ /** @ignore */
33
+ constructor();
34
+ protected getInitialComponentData(): {
35
+ castShadows: boolean;
36
+ color: Color;
37
+ innerConeAngle: number;
38
+ intensity: number;
39
+ normalOffsetBias: number;
40
+ outerConeAngle: number;
41
+ penumbraFalloff: number;
42
+ penumbraSize: number;
43
+ range: number;
44
+ shadowBias: number;
45
+ shadowBlockerSamples: number;
46
+ shadowDistance: number;
47
+ shadowIntensity: number;
48
+ shadowResolution: number;
49
+ shadowSamples: number;
50
+ shadowType: number | undefined;
51
+ type: "directional" | "omni" | "spot";
52
+ vsmBias: number;
53
+ vsmBlurSize: number;
54
+ };
55
+ /**
56
+ * Gets the underlying PlayCanvas light component.
57
+ * @returns The light component.
58
+ */
59
+ get component(): LightComponent;
60
+ /**
61
+ * Sets the cast shadows flag of the light.
62
+ * @param value - The cast shadows flag.
63
+ */
64
+ set castShadows(value: boolean);
65
+ /**
66
+ * Gets the cast shadows flag of the light.
67
+ * @returns The cast shadows flag.
68
+ */
69
+ get castShadows(): boolean;
70
+ /**
71
+ * Sets the color of the light.
72
+ * @param value - The color.
73
+ */
74
+ set color(value: Color);
75
+ /**
76
+ * Gets the color of the light.
77
+ * @returns The color.
78
+ */
79
+ get color(): Color;
80
+ /**
81
+ * Sets the inner cone angle of the light.
82
+ * @param value - The inner cone angle.
83
+ */
84
+ set innerConeAngle(value: number);
85
+ /**
86
+ * Gets the inner cone angle of the light.
87
+ * @returns The inner cone angle.
88
+ */
89
+ get innerConeAngle(): number;
90
+ /**
91
+ * Sets the intensity of the light.
92
+ * @param value - The intensity.
93
+ */
94
+ set intensity(value: number);
95
+ /**
96
+ * Gets the intensity of the light.
97
+ * @returns The intensity.
98
+ */
99
+ get intensity(): number;
100
+ /**
101
+ * Sets the normal offset bias of the light.
102
+ * @param value - The normal offset bias.
103
+ */
104
+ set normalOffsetBias(value: number);
105
+ /**
106
+ * Gets the normal offset bias of the light.
107
+ * @returns The normal offset bias.
108
+ */
109
+ get normalOffsetBias(): number;
110
+ /**
111
+ * Sets the outer cone angle of the light.
112
+ * @param value - The outer cone angle.
113
+ */
114
+ set outerConeAngle(value: number);
115
+ /**
116
+ * Gets the outer cone angle of the light.
117
+ * @returns The outer cone angle.
118
+ */
119
+ get outerConeAngle(): number;
120
+ /**
121
+ * Sets the range of the light.
122
+ * @param value - The range.
123
+ */
124
+ set range(value: number);
125
+ /**
126
+ * Gets the range of the light.
127
+ * @returns The range.
128
+ */
129
+ get range(): number;
130
+ /**
131
+ * Sets the shadow bias of the light.
132
+ * @param value - The shadow bias.
133
+ */
134
+ set shadowBias(value: number);
135
+ /**
136
+ * Gets the shadow bias of the light.
137
+ * @returns The shadow bias.
138
+ */
139
+ get shadowBias(): number;
140
+ /**
141
+ * Sets the shadow distance of the light.
142
+ * @param value - The shadow distance.
143
+ */
144
+ set shadowDistance(value: number);
145
+ /**
146
+ * Gets the shadow distance of the light.
147
+ * @returns The shadow distance.
148
+ */
149
+ get shadowDistance(): number;
150
+ /**
151
+ * Sets the shadow intensity of the light.
152
+ * @param value - The shadow intensity.
153
+ */
154
+ set shadowIntensity(value: number);
155
+ /**
156
+ * Gets the shadow intensity of the light.
157
+ * @returns The shadow intensity.
158
+ */
159
+ get shadowIntensity(): number;
160
+ /**
161
+ * Sets the shadow resolution of the light.
162
+ * @param value - The shadow resolution.
163
+ */
164
+ set shadowResolution(value: number);
165
+ /**
166
+ * Gets the shadow resolution of the light.
167
+ * @returns The shadow resolution.
168
+ */
169
+ get shadowResolution(): number;
170
+ /**
171
+ * Sets the shadow type of the light.
172
+ * @param value - The shadow type. Can be:
173
+ *
174
+ * - `pcf1-16f` - 1-tap percentage-closer filtered shadow map with 16-bit depth.
175
+ * - `pcf1-32f` - 1-tap percentage-closer filtered shadow map with 32-bit depth.
176
+ * - `pcf3-16f` - 3-tap percentage-closer filtered shadow map with 16-bit depth.
177
+ * - `pcf3-32f` - 3-tap percentage-closer filtered shadow map with 32-bit depth.
178
+ * - `pcf5-16f` - 5-tap percentage-closer filtered shadow map with 16-bit depth.
179
+ * - `pcf5-32f` - 5-tap percentage-closer filtered shadow map with 32-bit depth.
180
+ * - `vsm-16f` - Variance shadow map with 16-bit depth.
181
+ * - `vsm-32f` - Variance shadow map with 32-bit depth.
182
+ * - `pcss-32f` - Percentage-closer soft shadow with 32-bit depth.
183
+ */
184
+ set shadowType(value: 'pcf1-16f' | 'pcf1-32f' | 'pcf3-16f' | 'pcf3-32f' | 'pcf5-16f' | 'pcf5-32f' | 'vsm-16f' | 'vsm-32f' | 'pcss-32f');
185
+ /**
186
+ * Gets the shadow type of the light.
187
+ * @returns The shadow type.
188
+ */
189
+ get shadowType(): "pcf1-16f" | "pcf1-32f" | "pcf3-16f" | "pcf3-32f" | "pcf5-16f" | "pcf5-32f" | "vsm-16f" | "vsm-32f" | "pcss-32f";
190
+ /**
191
+ * Sets the type of the light. Can be `directional`, `omni` or `spot`. Defaults to
192
+ * `directional`.
193
+ * @param value - The type.
194
+ */
195
+ set type(value: 'directional' | 'omni' | 'spot');
196
+ /**
197
+ * Gets the type of the light.
198
+ * @returns The type.
199
+ */
200
+ get type(): "directional" | "omni" | "spot";
201
+ /**
202
+ * Sets the VSM bias of the light.
203
+ * @param value - The VSM bias.
204
+ */
205
+ set vsmBias(value: number);
206
+ /**
207
+ * Gets the VSM bias of the light.
208
+ * @returns The VSM bias.
209
+ */
210
+ get vsmBias(): number;
211
+ /**
212
+ * Sets the VSM blur size of the light. Minimum is 1, maximum is 25. Default is 11.
213
+ * @param value - The VSM blur size.
214
+ */
215
+ set vsmBlurSize(value: number);
216
+ /**
217
+ * Gets the VSM blur size of the light.
218
+ * @returns The VSM blur size.
219
+ */
220
+ get vsmBlurSize(): number;
221
+ /**
222
+ * Sets the penumbra size of the light. Used for PCSS shadows.
223
+ * @param value - The penumbra size.
224
+ */
225
+ set penumbraSize(value: number);
226
+ /**
227
+ * Gets the penumbra size of the light.
228
+ * @returns The penumbra size.
229
+ */
230
+ get penumbraSize(): number;
231
+ /**
232
+ * Sets the penumbra falloff of the light. Used for PCSS shadows.
233
+ * @param value - The penumbra falloff.
234
+ */
235
+ set penumbraFalloff(value: number);
236
+ /**
237
+ * Gets the penumbra falloff of the light.
238
+ * @returns The penumbra falloff.
239
+ */
240
+ get penumbraFalloff(): number;
241
+ /**
242
+ * Sets the number of shadow samples. Used for PCSS shadows.
243
+ * @param value - The number of shadow samples.
244
+ */
245
+ set shadowSamples(value: number);
246
+ /**
247
+ * Gets the number of shadow samples.
248
+ * @returns The number of shadow samples.
249
+ */
250
+ get shadowSamples(): number;
251
+ /**
252
+ * Sets the number of shadow blocker samples. Used for PCSS shadows.
253
+ * @param value - The number of shadow blocker samples.
254
+ */
255
+ set shadowBlockerSamples(value: number);
256
+ /**
257
+ * Gets the number of shadow blocker samples.
258
+ * @returns The number of shadow blocker samples.
259
+ */
260
+ get shadowBlockerSamples(): number;
261
+ static get observedAttributes(): string[];
262
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
263
+ }
264
+ export { LightComponentElement };
@@ -1,6 +1,6 @@
1
1
  import type { LightComponent } from 'playcanvas';
2
2
  import { Color } from 'playcanvas';
3
- import { ComponentElement } from './component';
3
+ import { ComponentElement } from './component.js';
4
4
  /**
5
5
  * The LightComponentElement interface provides properties and methods for manipulating
6
6
  * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-light/ | `<pc-light>`} elements.
@@ -0,0 +1,20 @@
1
+ import type { AudioListenerComponent } from 'playcanvas';
2
+ import { ComponentElement } from './component.cjs';
3
+ /**
4
+ * The ListenerComponentElement interface provides properties and methods for manipulating
5
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-listener/ | `<pc-listener>`} elements.
6
+ * The ListenerComponentElement interface also inherits the properties and methods of the
7
+ * {@link HTMLElement} interface.
8
+ *
9
+ * @category Components
10
+ */
11
+ declare class ListenerComponentElement extends ComponentElement {
12
+ /** @ignore */
13
+ constructor();
14
+ /**
15
+ * Gets the underlying PlayCanvas audio listener component.
16
+ * @returns The audio listener component.
17
+ */
18
+ get component(): AudioListenerComponent;
19
+ }
20
+ export { ListenerComponentElement };
@@ -1,5 +1,5 @@
1
1
  import type { AudioListenerComponent } from 'playcanvas';
2
- import { ComponentElement } from './component';
2
+ import { ComponentElement } from './component.js';
3
3
  /**
4
4
  * The ListenerComponentElement interface provides properties and methods for manipulating
5
5
  * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-listener/ | `<pc-listener>`} elements.
@@ -0,0 +1,52 @@
1
+ import type { ParticleSystemComponent } from 'playcanvas';
2
+ import { ComponentElement } from './component.cjs';
3
+ /**
4
+ * The ParticleSystemComponentElement interface provides properties and methods for manipulating
5
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-particles/ | `<pc-particles>`} elements.
6
+ * The ParticleSystemComponentElement interface also inherits the properties and methods of the
7
+ * {@link HTMLElement} interface.
8
+ *
9
+ * @category Components
10
+ */
11
+ declare class ParticleSystemComponentElement extends ComponentElement {
12
+ private _asset;
13
+ /** @ignore */
14
+ constructor();
15
+ protected getInitialComponentData(): object;
16
+ /**
17
+ * Gets the underlying PlayCanvas particle system component.
18
+ * @returns The particle system component.
19
+ */
20
+ get component(): ParticleSystemComponent;
21
+ private applyConfig;
22
+ private _loadAsset;
23
+ /**
24
+ * Sets the id of the `pc-asset` to use for the model.
25
+ * @param value - The asset ID.
26
+ */
27
+ set asset(value: string);
28
+ /**
29
+ * Gets the id of the `pc-asset` to use for the model.
30
+ * @returns The asset ID.
31
+ */
32
+ get asset(): string;
33
+ /**
34
+ * Starts playing the particle system
35
+ */
36
+ play(): void;
37
+ /**
38
+ * Pauses the particle system
39
+ */
40
+ pause(): void;
41
+ /**
42
+ * Resets the particle system
43
+ */
44
+ reset(): void;
45
+ /**
46
+ * Stops the particle system
47
+ */
48
+ stop(): void;
49
+ static get observedAttributes(): string[];
50
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
51
+ }
52
+ export { ParticleSystemComponentElement };
@@ -1,5 +1,5 @@
1
1
  import type { ParticleSystemComponent } from 'playcanvas';
2
- import { ComponentElement } from './component';
2
+ import { ComponentElement } from './component.js';
3
3
  /**
4
4
  * The ParticleSystemComponentElement interface provides properties and methods for manipulating
5
5
  * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-particles/ | `<pc-particles>`} elements.
@@ -0,0 +1,76 @@
1
+ import type { RenderComponent, StandardMaterial } from 'playcanvas';
2
+ import { ComponentElement } from './component.cjs';
3
+ /**
4
+ * The RenderComponentElement interface provides properties and methods for manipulating
5
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-render/ | `<pc-render>`} elements.
6
+ * The RenderComponentElement interface also inherits the properties and methods of the
7
+ * {@link HTMLElement} interface.
8
+ *
9
+ * This element renders one of the engine's built-in primitives, selected with `type` (defaulting
10
+ * to `box`). It does not cover the engine's `asset` render type, since there is no way to supply
11
+ * a render asset here — use `pc-model` for glTF content instead.
12
+ *
13
+ * @category Components
14
+ */
15
+ declare class RenderComponentElement extends ComponentElement {
16
+ private _castShadows;
17
+ private _material;
18
+ private _receiveShadows;
19
+ private _type;
20
+ /** @ignore */
21
+ constructor();
22
+ protected getInitialComponentData(): {
23
+ type: "box" | "capsule" | "cone" | "cylinder" | "sphere" | "plane";
24
+ castShadows: boolean;
25
+ material: StandardMaterial | null | undefined;
26
+ receiveShadows: boolean;
27
+ };
28
+ /**
29
+ * Gets the underlying PlayCanvas render component.
30
+ * @returns The render component.
31
+ */
32
+ get component(): RenderComponent;
33
+ /**
34
+ * Sets the type of the render component.
35
+ * @param value - The type.
36
+ */
37
+ set type(value: 'box' | 'capsule' | 'cone' | 'cylinder' | 'plane' | 'sphere');
38
+ /**
39
+ * Gets the type of the render component.
40
+ * @returns The type.
41
+ */
42
+ get type(): 'box' | 'capsule' | 'cone' | 'cylinder' | 'plane' | 'sphere';
43
+ /**
44
+ * Sets the cast shadows flag of the render component.
45
+ * @param value - The cast shadows flag.
46
+ */
47
+ set castShadows(value: boolean);
48
+ /**
49
+ * Gets the cast shadows flag of the render component.
50
+ * @returns The cast shadows flag.
51
+ */
52
+ get castShadows(): boolean;
53
+ /**
54
+ * Sets the material of the render component.
55
+ * @param value - The id of the material asset to use.
56
+ */
57
+ set material(value: string);
58
+ /**
59
+ * Gets the id of the material asset used by the render component.
60
+ * @returns The id of the material asset.
61
+ */
62
+ get material(): string;
63
+ /**
64
+ * Sets the receive shadows flag of the render component.
65
+ * @param value - The receive shadows flag.
66
+ */
67
+ set receiveShadows(value: boolean);
68
+ /**
69
+ * Gets the receive shadows flag of the render component.
70
+ * @returns The receive shadows flag.
71
+ */
72
+ get receiveShadows(): boolean;
73
+ static get observedAttributes(): string[];
74
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
75
+ }
76
+ export { RenderComponentElement };
@@ -1,5 +1,5 @@
1
1
  import type { RenderComponent, StandardMaterial } from 'playcanvas';
2
- import { ComponentElement } from './component';
2
+ import { ComponentElement } from './component.js';
3
3
  /**
4
4
  * The RenderComponentElement interface provides properties and methods for manipulating
5
5
  * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-render/ | `<pc-render>`} elements.
@@ -0,0 +1,88 @@
1
+ import type { RigidBodyComponent } from 'playcanvas';
2
+ import { Vec3 } from 'playcanvas';
3
+ import { ComponentElement } from './component.cjs';
4
+ /**
5
+ * The RigidBodyComponentElement interface provides properties and methods for manipulating
6
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-rigidbody/ | `<pc-rigidbody>`} elements.
7
+ * The RigidBodyComponentElement interface also inherits the properties and methods of the
8
+ * {@link HTMLElement} interface.
9
+ *
10
+ * @category Components
11
+ */
12
+ declare class RigidBodyComponentElement extends ComponentElement {
13
+ /**
14
+ * The angular damping of the rigidbody.
15
+ */
16
+ private _angularDamping;
17
+ /**
18
+ * The angular factor of the rigidbody.
19
+ */
20
+ private _angularFactor;
21
+ /**
22
+ * The friction of the rigidbody.
23
+ */
24
+ private _friction;
25
+ /**
26
+ * The linear damping of the rigidbody.
27
+ */
28
+ private _linearDamping;
29
+ /**
30
+ * The linear factor of the rigidbody.
31
+ */
32
+ private _linearFactor;
33
+ /**
34
+ * The mass of the rigidbody.
35
+ */
36
+ private _mass;
37
+ /**
38
+ * The restitution of the rigidbody.
39
+ */
40
+ private _restitution;
41
+ /**
42
+ * The rolling friction of the rigidbody.
43
+ */
44
+ private _rollingFriction;
45
+ /**
46
+ * The type of the rigidbody.
47
+ */
48
+ private _type;
49
+ /** @ignore */
50
+ constructor();
51
+ protected getInitialComponentData(): {
52
+ angularDamping: number;
53
+ angularFactor: Vec3;
54
+ friction: number;
55
+ linearDamping: number;
56
+ linearFactor: Vec3;
57
+ mass: number;
58
+ restitution: number;
59
+ rollingFriction: number;
60
+ type: "static" | "dynamic" | "kinematic";
61
+ };
62
+ /**
63
+ * Gets the underlying PlayCanvas rigidbody component.
64
+ * @returns The rigidbody component.
65
+ */
66
+ get component(): RigidBodyComponent;
67
+ set angularDamping(value: number);
68
+ get angularDamping(): number;
69
+ set angularFactor(value: Vec3);
70
+ get angularFactor(): Vec3;
71
+ set friction(value: number);
72
+ get friction(): number;
73
+ set linearDamping(value: number);
74
+ get linearDamping(): number;
75
+ set linearFactor(value: Vec3);
76
+ get linearFactor(): Vec3;
77
+ set mass(value: number);
78
+ get mass(): number;
79
+ set restitution(value: number);
80
+ get restitution(): number;
81
+ set rollingFriction(value: number);
82
+ get rollingFriction(): number;
83
+ set type(value: 'static' | 'dynamic' | 'kinematic');
84
+ get type(): "static" | "dynamic" | "kinematic";
85
+ static get observedAttributes(): string[];
86
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
87
+ }
88
+ export { RigidBodyComponentElement };
@@ -1,6 +1,6 @@
1
1
  import type { RigidBodyComponent } from 'playcanvas';
2
2
  import { Vec3 } from 'playcanvas';
3
- import { ComponentElement } from './component';
3
+ import { ComponentElement } from './component.js';
4
4
  /**
5
5
  * The RigidBodyComponentElement interface provides properties and methods for manipulating
6
6
  * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-rigidbody/ | `<pc-rigidbody>`} elements.