@playcanvas/web-components 0.11.1 → 0.13.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/README.md +1 -1
- package/dist/app.d.cts +246 -0
- package/dist/app.d.ts +38 -13
- package/dist/asset.d.cts +218 -0
- package/dist/asset.d.ts +145 -6
- package/dist/async-element.d.cts +103 -0
- package/dist/async-element.d.ts +11 -8
- package/dist/colors.d.cts +1 -0
- package/dist/components/button-component.d.cts +186 -0
- package/dist/components/button-component.d.ts +1 -1
- package/dist/components/camera-component.d.cts +253 -0
- package/dist/components/camera-component.d.ts +1 -1
- package/dist/components/collision-component.d.cts +73 -0
- package/dist/components/collision-component.d.ts +17 -1
- package/dist/components/component.d.cts +82 -0
- package/dist/components/component.d.ts +20 -1
- package/dist/components/element-component.d.cts +316 -0
- package/dist/components/element-component.d.ts +1 -1
- package/dist/components/gsplat-component.d.cts +108 -0
- package/dist/components/gsplat-component.d.ts +1 -1
- package/dist/components/layoutchild-component.d.cts +110 -0
- package/dist/components/layoutchild-component.d.ts +1 -1
- package/dist/components/layoutgroup-component.d.cts +136 -0
- package/dist/components/layoutgroup-component.d.ts +1 -1
- package/dist/components/light-component.d.cts +264 -0
- package/dist/components/light-component.d.ts +1 -1
- package/dist/components/listener-component.d.cts +20 -0
- package/dist/components/listener-component.d.ts +1 -1
- package/dist/components/particlesystem-component.d.cts +52 -0
- package/dist/components/particlesystem-component.d.ts +1 -1
- package/dist/components/render-component.d.cts +76 -0
- package/dist/components/render-component.d.ts +1 -1
- package/dist/components/rigidbody-component.d.cts +88 -0
- package/dist/components/rigidbody-component.d.ts +1 -1
- package/dist/components/screen-component.d.cts +70 -0
- package/dist/components/screen-component.d.ts +1 -1
- package/dist/components/script-component.d.cts +163 -0
- package/dist/components/script-component.d.ts +1 -1
- package/dist/components/script.d.cts +94 -0
- package/dist/components/script.d.ts +1 -1
- package/dist/components/scrollbar-component.d.cts +69 -0
- package/dist/components/scrollbar-component.d.ts +1 -1
- package/dist/components/scrollview-component.d.cts +178 -0
- package/dist/components/scrollview-component.d.ts +1 -1
- package/dist/components/sound-component.d.cts +108 -0
- package/dist/components/sound-component.d.ts +1 -1
- package/dist/components/sound-slot.d.cts +134 -0
- package/dist/components/sound-slot.d.ts +2 -2
- package/dist/custom-elements.json +1127 -179
- package/dist/entity-base.d.cts +67 -0
- package/dist/entity-base.d.ts +67 -0
- package/dist/entity.d.cts +131 -0
- package/dist/entity.d.ts +3 -38
- package/dist/index.d.cts +79 -0
- package/dist/index.d.ts +35 -32
- package/dist/loading-bar.d.cts +35 -0
- package/dist/material.d.cts +1011 -0
- package/dist/material.d.ts +2 -1
- package/dist/model.d.cts +72 -0
- package/dist/model.d.ts +27 -5
- package/dist/module.d.cts +29 -0
- package/dist/module.d.ts +16 -10
- package/dist/node.d.cts +253 -0
- package/dist/node.d.ts +253 -0
- package/dist/parse.d.cts +147 -0
- package/dist/pwc.cjs +1496 -200
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +1497 -201
- 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 +1496 -202
- package/dist/pwc.mjs.map +1 -1
- package/dist/scene.d.cts +117 -0
- package/dist/scene.d.ts +1 -1
- package/dist/sky.d.cts +121 -0
- package/dist/sky.d.ts +1 -1
- package/dist/vscode.html-custom-data.json +127 -5
- package/dist/web-types.json +399 -59
- package/package.json +16 -7
- package/src/app.ts +137 -45
- package/src/asset.ts +439 -9
- package/src/async-element.ts +11 -8
- package/src/components/collision-component.ts +35 -0
- package/src/components/component.ts +93 -3
- package/src/entity-base.ts +136 -0
- package/src/entity.ts +23 -117
- package/src/index.ts +5 -0
- package/src/loading-bar.ts +2 -2
- package/src/material.ts +2 -2
- package/src/model.ts +79 -11
- package/src/module.ts +39 -20
- package/src/node.ts +715 -0
- package/src/sky.ts +0 -1
|
@@ -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.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ScreenComponent } from 'playcanvas';
|
|
2
|
+
import { Vec2 } from 'playcanvas';
|
|
3
|
+
import { ComponentElement } from './component.cjs';
|
|
4
|
+
/**
|
|
5
|
+
* The ScreenComponentElement interface provides properties and methods for manipulating
|
|
6
|
+
* {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-screen/ | `<pc-screen>`} elements.
|
|
7
|
+
* The ScreenComponentElement interface also inherits the properties and methods of the
|
|
8
|
+
* {@link HTMLElement} interface.
|
|
9
|
+
*
|
|
10
|
+
* @category Components
|
|
11
|
+
*/
|
|
12
|
+
declare class ScreenComponentElement extends ComponentElement {
|
|
13
|
+
private _screenSpace;
|
|
14
|
+
private _resolution;
|
|
15
|
+
private _referenceResolution;
|
|
16
|
+
private _priority;
|
|
17
|
+
private _scaleMode;
|
|
18
|
+
private _scaleBlend;
|
|
19
|
+
/** @ignore */
|
|
20
|
+
constructor();
|
|
21
|
+
protected getInitialComponentData(): {
|
|
22
|
+
priority: number;
|
|
23
|
+
referenceResolution: Vec2;
|
|
24
|
+
resolution: Vec2;
|
|
25
|
+
scaleBlend: number;
|
|
26
|
+
scaleMode: string;
|
|
27
|
+
screenSpace: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Gets the underlying PlayCanvas screen component.
|
|
31
|
+
* @returns The screen component.
|
|
32
|
+
*/
|
|
33
|
+
get component(): ScreenComponent;
|
|
34
|
+
set priority(value: number);
|
|
35
|
+
get priority(): number;
|
|
36
|
+
set referenceResolution(value: Vec2);
|
|
37
|
+
get referenceResolution(): Vec2;
|
|
38
|
+
set resolution(value: Vec2);
|
|
39
|
+
get resolution(): Vec2;
|
|
40
|
+
/**
|
|
41
|
+
* Sets how the screen's `resolution` and `referenceResolution` are weighted against each other
|
|
42
|
+
* when `scaleMode` is `blend`, from 0 (follow the resolution) to 1 (follow the reference
|
|
43
|
+
* resolution). Ignored while `scaleMode` is `none`.
|
|
44
|
+
* @param value - The scale blend factor.
|
|
45
|
+
*/
|
|
46
|
+
set scaleBlend(value: number);
|
|
47
|
+
/**
|
|
48
|
+
* Gets how the screen's resolutions are weighted against each other.
|
|
49
|
+
* @returns The scale blend factor.
|
|
50
|
+
*/
|
|
51
|
+
get scaleBlend(): number;
|
|
52
|
+
/**
|
|
53
|
+
* Sets how the screen scales its contents. `none` renders at `resolution` and ignores
|
|
54
|
+
* `referenceResolution`; `blend` scales between the two, weighted by `scaleBlend`, which is what
|
|
55
|
+
* keeps a UI laid out at one resolution usable at another. Requires `screenSpace` - the engine
|
|
56
|
+
* forces `none` on a world-space screen, which does not support scaling.
|
|
57
|
+
* @param value - The scale mode ('none' or 'blend').
|
|
58
|
+
*/
|
|
59
|
+
set scaleMode(value: 'none' | 'blend');
|
|
60
|
+
/**
|
|
61
|
+
* Gets how the screen scales its contents.
|
|
62
|
+
* @returns The scale mode.
|
|
63
|
+
*/
|
|
64
|
+
get scaleMode(): "none" | "blend";
|
|
65
|
+
set screenSpace(value: boolean);
|
|
66
|
+
get screenSpace(): boolean;
|
|
67
|
+
static get observedAttributes(): string[];
|
|
68
|
+
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
69
|
+
}
|
|
70
|
+
export { ScreenComponentElement };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ScreenComponent } from 'playcanvas';
|
|
2
2
|
import { Vec2 } from 'playcanvas';
|
|
3
|
-
import { ComponentElement } from './component';
|
|
3
|
+
import { ComponentElement } from './component.js';
|
|
4
4
|
/**
|
|
5
5
|
* The ScreenComponentElement interface provides properties and methods for manipulating
|
|
6
6
|
* {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-screen/ | `<pc-screen>`} elements.
|