@playcanvas/web-components 0.13.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/colors.d.cts +1 -1
- package/dist/colors.d.ts +1 -1
- package/dist/components/joint-component.d.cts +521 -0
- package/dist/components/joint-component.d.ts +521 -0
- package/dist/custom-elements.json +1029 -0
- package/dist/entity-base.d.cts +1 -7
- package/dist/entity-base.d.ts +1 -7
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/loading-bar.d.cts +1 -35
- package/dist/loading-bar.d.ts +1 -35
- package/dist/material.d.cts +13 -0
- package/dist/material.d.ts +13 -0
- package/dist/model.d.cts +71 -0
- package/dist/model.d.ts +71 -0
- package/dist/node.d.cts +55 -0
- package/dist/node.d.ts +55 -0
- package/dist/parse.d.cts +1 -130
- package/dist/parse.d.ts +1 -130
- package/dist/pwc.cjs +1410 -148
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +1410 -148
- 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 +1410 -149
- package/dist/pwc.mjs.map +1 -1
- package/dist/vscode.html-custom-data.json +203 -1
- package/dist/web-types.json +368 -2
- package/package.json +5 -4
- package/src/app.ts +18 -0
- package/src/colors.ts +5 -0
- package/src/components/joint-component.ts +984 -0
- package/src/entity-base.ts +3 -3
- package/src/entity.ts +28 -7
- package/src/index.ts +6 -0
- package/src/loading-bar.ts +2 -3
- package/src/material.ts +29 -0
- package/src/model.ts +156 -0
- package/src/node.ts +279 -9
- package/src/parse.ts +11 -1
package/dist/colors.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
package/dist/colors.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
import type { JointComponent } from 'playcanvas';
|
|
2
|
+
import { Vec2, Vec3 } from 'playcanvas';
|
|
3
|
+
import { ComponentElement } from './component.cjs';
|
|
4
|
+
type JointType = 'fixed' | 'ball' | 'hinge' | 'slider' | '6dof';
|
|
5
|
+
type MotionMode = 'locked' | 'limited' | 'free';
|
|
6
|
+
/**
|
|
7
|
+
* The JointComponentElement interface provides properties and methods for manipulating
|
|
8
|
+
* {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-joint/ | `<pc-joint>`} elements.
|
|
9
|
+
* The JointComponentElement interface also inherits the properties and methods of the
|
|
10
|
+
* {@link HTMLElement} interface.
|
|
11
|
+
*
|
|
12
|
+
* The entity holding the joint is not itself constrained. Its world transform defines the joint
|
|
13
|
+
* frame — the anchor point and axes the constraint operates about — with the local X axis as the
|
|
14
|
+
* primary axis: a hinge rotates about it, a slider translates along it and a ball joint twists
|
|
15
|
+
* about it. The constrained bodies are referenced by `entity-a` and `entity-b`, both of which need
|
|
16
|
+
* a rigid body component; leaving `entity-b` empty constrains `entity-a` to a fixed point in world
|
|
17
|
+
* space. The underlying engine component is in alpha, so its API may change.
|
|
18
|
+
*
|
|
19
|
+
* @fires {CustomEvent} break - Fired when the impulse on the joint exceeds `break-impulse` and the
|
|
20
|
+
* constraint breaks. A broken joint no longer constrains its bodies; calling `refreshFrames()` on
|
|
21
|
+
* the underlying component re-attaches it. Bubbles and is composed.
|
|
22
|
+
*
|
|
23
|
+
* @category Components
|
|
24
|
+
*/
|
|
25
|
+
declare class JointComponentElement extends ComponentElement {
|
|
26
|
+
/**
|
|
27
|
+
* The spring damping of the joint per angular axis.
|
|
28
|
+
*/
|
|
29
|
+
private _angularDamping;
|
|
30
|
+
/**
|
|
31
|
+
* The rest angle of the joint's angular springs.
|
|
32
|
+
*/
|
|
33
|
+
private _angularEquilibrium;
|
|
34
|
+
/**
|
|
35
|
+
* The rotation limits of the joint about its X axis.
|
|
36
|
+
*/
|
|
37
|
+
private _angularLimitsX;
|
|
38
|
+
/**
|
|
39
|
+
* The rotation limits of the joint about its Y axis.
|
|
40
|
+
*/
|
|
41
|
+
private _angularLimitsY;
|
|
42
|
+
/**
|
|
43
|
+
* The rotation limits of the joint about its Z axis.
|
|
44
|
+
*/
|
|
45
|
+
private _angularLimitsZ;
|
|
46
|
+
/**
|
|
47
|
+
* The rotational degree of freedom of the joint about its X axis.
|
|
48
|
+
*/
|
|
49
|
+
private _angularMotionX;
|
|
50
|
+
/**
|
|
51
|
+
* The rotational degree of freedom of the joint about its Y axis.
|
|
52
|
+
*/
|
|
53
|
+
private _angularMotionY;
|
|
54
|
+
/**
|
|
55
|
+
* The rotational degree of freedom of the joint about its Z axis.
|
|
56
|
+
*/
|
|
57
|
+
private _angularMotionZ;
|
|
58
|
+
/**
|
|
59
|
+
* The spring stiffness of the joint per angular axis.
|
|
60
|
+
*/
|
|
61
|
+
private _angularStiffness;
|
|
62
|
+
/**
|
|
63
|
+
* The impulse above which the joint breaks.
|
|
64
|
+
*/
|
|
65
|
+
private _breakImpulse;
|
|
66
|
+
/**
|
|
67
|
+
* Whether collision is enabled between the constrained bodies.
|
|
68
|
+
*/
|
|
69
|
+
private _enableCollision;
|
|
70
|
+
/**
|
|
71
|
+
* Whether the joint's limits are enforced.
|
|
72
|
+
*/
|
|
73
|
+
private _enableLimits;
|
|
74
|
+
/**
|
|
75
|
+
* The reference to the entity providing the first constrained body.
|
|
76
|
+
*/
|
|
77
|
+
private _entityA;
|
|
78
|
+
/**
|
|
79
|
+
* The reference to the entity providing the second constrained body.
|
|
80
|
+
*/
|
|
81
|
+
private _entityB;
|
|
82
|
+
/**
|
|
83
|
+
* The rotation or travel limits of the joint.
|
|
84
|
+
*/
|
|
85
|
+
private _limits;
|
|
86
|
+
/**
|
|
87
|
+
* The spring damping of the joint per linear axis.
|
|
88
|
+
*/
|
|
89
|
+
private _linearDamping;
|
|
90
|
+
/**
|
|
91
|
+
* The rest point of the joint's linear springs.
|
|
92
|
+
*/
|
|
93
|
+
private _linearEquilibrium;
|
|
94
|
+
/**
|
|
95
|
+
* The translation limits of the joint along its X axis.
|
|
96
|
+
*/
|
|
97
|
+
private _linearLimitsX;
|
|
98
|
+
/**
|
|
99
|
+
* The translation limits of the joint along its Y axis.
|
|
100
|
+
*/
|
|
101
|
+
private _linearLimitsY;
|
|
102
|
+
/**
|
|
103
|
+
* The translation limits of the joint along its Z axis.
|
|
104
|
+
*/
|
|
105
|
+
private _linearLimitsZ;
|
|
106
|
+
/**
|
|
107
|
+
* The linear degree of freedom of the joint along its X axis.
|
|
108
|
+
*/
|
|
109
|
+
private _linearMotionX;
|
|
110
|
+
/**
|
|
111
|
+
* The linear degree of freedom of the joint along its Y axis.
|
|
112
|
+
*/
|
|
113
|
+
private _linearMotionY;
|
|
114
|
+
/**
|
|
115
|
+
* The linear degree of freedom of the joint along its Z axis.
|
|
116
|
+
*/
|
|
117
|
+
private _linearMotionZ;
|
|
118
|
+
/**
|
|
119
|
+
* The spring stiffness of the joint per linear axis.
|
|
120
|
+
*/
|
|
121
|
+
private _linearStiffness;
|
|
122
|
+
/**
|
|
123
|
+
* The maximum torque or force of the joint's motor.
|
|
124
|
+
*/
|
|
125
|
+
private _maxMotorForce;
|
|
126
|
+
/**
|
|
127
|
+
* The target speed of the joint's motor.
|
|
128
|
+
*/
|
|
129
|
+
private _motorSpeed;
|
|
130
|
+
/**
|
|
131
|
+
* The maximum swing of the joint around the joint frame's Y axis.
|
|
132
|
+
*/
|
|
133
|
+
private _swingLimitY;
|
|
134
|
+
/**
|
|
135
|
+
* The maximum swing of the joint around the joint frame's Z axis.
|
|
136
|
+
*/
|
|
137
|
+
private _swingLimitZ;
|
|
138
|
+
/**
|
|
139
|
+
* The maximum twist of the joint about its primary axis.
|
|
140
|
+
*/
|
|
141
|
+
private _twistLimit;
|
|
142
|
+
/**
|
|
143
|
+
* The type of the joint.
|
|
144
|
+
*/
|
|
145
|
+
private _type;
|
|
146
|
+
/** @ignore */
|
|
147
|
+
constructor();
|
|
148
|
+
protected getInitialComponentData(): {
|
|
149
|
+
angularDamping: Vec3;
|
|
150
|
+
angularEquilibrium: Vec3;
|
|
151
|
+
angularLimitsX: Vec2;
|
|
152
|
+
angularLimitsY: Vec2;
|
|
153
|
+
angularLimitsZ: Vec2;
|
|
154
|
+
angularMotionX: MotionMode;
|
|
155
|
+
angularMotionY: MotionMode;
|
|
156
|
+
angularMotionZ: MotionMode;
|
|
157
|
+
angularStiffness: Vec3;
|
|
158
|
+
breakImpulse: number;
|
|
159
|
+
enableCollision: boolean;
|
|
160
|
+
enableLimits: boolean;
|
|
161
|
+
entityA: import("playcanvas").Entity | null;
|
|
162
|
+
entityB: import("playcanvas").Entity | null;
|
|
163
|
+
limits: Vec2;
|
|
164
|
+
linearDamping: Vec3;
|
|
165
|
+
linearEquilibrium: Vec3;
|
|
166
|
+
linearLimitsX: Vec2;
|
|
167
|
+
linearLimitsY: Vec2;
|
|
168
|
+
linearLimitsZ: Vec2;
|
|
169
|
+
linearMotionX: MotionMode;
|
|
170
|
+
linearMotionY: MotionMode;
|
|
171
|
+
linearMotionZ: MotionMode;
|
|
172
|
+
linearStiffness: Vec3;
|
|
173
|
+
maxMotorForce: number;
|
|
174
|
+
motorSpeed: number;
|
|
175
|
+
swingLimitY: number;
|
|
176
|
+
swingLimitZ: number;
|
|
177
|
+
twistLimit: number;
|
|
178
|
+
type: JointType;
|
|
179
|
+
};
|
|
180
|
+
private _onBreak;
|
|
181
|
+
protected initComponent(): void;
|
|
182
|
+
/**
|
|
183
|
+
* Gets the underlying PlayCanvas joint component.
|
|
184
|
+
* @returns The joint component.
|
|
185
|
+
*/
|
|
186
|
+
get component(): JointComponent;
|
|
187
|
+
/**
|
|
188
|
+
* Sets the spring damping of a 6dof joint per angular axis, used on axes with a non-zero
|
|
189
|
+
* angular-stiffness.
|
|
190
|
+
* @param value - The angular spring damping.
|
|
191
|
+
*/
|
|
192
|
+
set angularDamping(value: Vec3);
|
|
193
|
+
/**
|
|
194
|
+
* Gets the spring damping of the joint per angular axis.
|
|
195
|
+
* @returns The angular spring damping.
|
|
196
|
+
*/
|
|
197
|
+
get angularDamping(): Vec3;
|
|
198
|
+
/**
|
|
199
|
+
* Sets the rest angle of a 6dof joint's angular springs in degrees per axis, used on axes with
|
|
200
|
+
* a non-zero angular-stiffness.
|
|
201
|
+
* @param value - The angular spring rest angles.
|
|
202
|
+
*/
|
|
203
|
+
set angularEquilibrium(value: Vec3);
|
|
204
|
+
/**
|
|
205
|
+
* Gets the rest angle of the joint's angular springs.
|
|
206
|
+
* @returns The angular spring rest angles.
|
|
207
|
+
*/
|
|
208
|
+
get angularEquilibrium(): Vec3;
|
|
209
|
+
/**
|
|
210
|
+
* Sets the lower and upper rotation limit of a 6dof joint about its X axis in degrees, used
|
|
211
|
+
* when angular-motion-x is limited.
|
|
212
|
+
* @param value - The X axis rotation limits.
|
|
213
|
+
*/
|
|
214
|
+
set angularLimitsX(value: Vec2);
|
|
215
|
+
/**
|
|
216
|
+
* Gets the rotation limits of the joint about its X axis.
|
|
217
|
+
* @returns The X axis rotation limits.
|
|
218
|
+
*/
|
|
219
|
+
get angularLimitsX(): Vec2;
|
|
220
|
+
/**
|
|
221
|
+
* Sets the lower and upper rotation limit of a 6dof joint about its Y axis in degrees, used
|
|
222
|
+
* when angular-motion-y is limited.
|
|
223
|
+
* @param value - The Y axis rotation limits.
|
|
224
|
+
*/
|
|
225
|
+
set angularLimitsY(value: Vec2);
|
|
226
|
+
/**
|
|
227
|
+
* Gets the rotation limits of the joint about its Y axis.
|
|
228
|
+
* @returns The Y axis rotation limits.
|
|
229
|
+
*/
|
|
230
|
+
get angularLimitsY(): Vec2;
|
|
231
|
+
/**
|
|
232
|
+
* Sets the lower and upper rotation limit of a 6dof joint about its Z axis in degrees, used
|
|
233
|
+
* when angular-motion-z is limited.
|
|
234
|
+
* @param value - The Z axis rotation limits.
|
|
235
|
+
*/
|
|
236
|
+
set angularLimitsZ(value: Vec2);
|
|
237
|
+
/**
|
|
238
|
+
* Gets the rotation limits of the joint about its Z axis.
|
|
239
|
+
* @returns The Z axis rotation limits.
|
|
240
|
+
*/
|
|
241
|
+
get angularLimitsZ(): Vec2;
|
|
242
|
+
/**
|
|
243
|
+
* Sets how a 6dof joint constrains rotation about its X axis. Can be `locked`, `limited` or
|
|
244
|
+
* `free`. Defaults to `locked`.
|
|
245
|
+
* @param value - The X axis rotational degree of freedom.
|
|
246
|
+
*/
|
|
247
|
+
set angularMotionX(value: MotionMode);
|
|
248
|
+
/**
|
|
249
|
+
* Gets how the joint constrains rotation about its X axis.
|
|
250
|
+
* @returns The X axis rotational degree of freedom.
|
|
251
|
+
*/
|
|
252
|
+
get angularMotionX(): MotionMode;
|
|
253
|
+
/**
|
|
254
|
+
* Sets how a 6dof joint constrains rotation about its Y axis. Can be `locked`, `limited` or
|
|
255
|
+
* `free`. Defaults to `locked`.
|
|
256
|
+
* @param value - The Y axis rotational degree of freedom.
|
|
257
|
+
*/
|
|
258
|
+
set angularMotionY(value: MotionMode);
|
|
259
|
+
/**
|
|
260
|
+
* Gets how the joint constrains rotation about its Y axis.
|
|
261
|
+
* @returns The Y axis rotational degree of freedom.
|
|
262
|
+
*/
|
|
263
|
+
get angularMotionY(): MotionMode;
|
|
264
|
+
/**
|
|
265
|
+
* Sets how a 6dof joint constrains rotation about its Z axis. Can be `locked`, `limited` or
|
|
266
|
+
* `free`. Defaults to `locked`.
|
|
267
|
+
* @param value - The Z axis rotational degree of freedom.
|
|
268
|
+
*/
|
|
269
|
+
set angularMotionZ(value: MotionMode);
|
|
270
|
+
/**
|
|
271
|
+
* Gets how the joint constrains rotation about its Z axis.
|
|
272
|
+
* @returns The Z axis rotational degree of freedom.
|
|
273
|
+
*/
|
|
274
|
+
get angularMotionZ(): MotionMode;
|
|
275
|
+
/**
|
|
276
|
+
* Sets the spring stiffness of a 6dof joint per angular axis, where 0 disables the spring on
|
|
277
|
+
* that axis.
|
|
278
|
+
* @param value - The angular spring stiffness.
|
|
279
|
+
*/
|
|
280
|
+
set angularStiffness(value: Vec3);
|
|
281
|
+
/**
|
|
282
|
+
* Gets the spring stiffness of the joint per angular axis.
|
|
283
|
+
* @returns The angular spring stiffness.
|
|
284
|
+
*/
|
|
285
|
+
get angularStiffness(): Vec3;
|
|
286
|
+
/**
|
|
287
|
+
* Sets the impulse in newton seconds above which the joint breaks. Defaults to `Infinity`,
|
|
288
|
+
* which makes the joint unbreakable.
|
|
289
|
+
* @param value - The break impulse.
|
|
290
|
+
*/
|
|
291
|
+
set breakImpulse(value: number);
|
|
292
|
+
/**
|
|
293
|
+
* Gets the impulse above which the joint breaks.
|
|
294
|
+
* @returns The break impulse.
|
|
295
|
+
*/
|
|
296
|
+
get breakImpulse(): number;
|
|
297
|
+
/**
|
|
298
|
+
* Sets whether collision is enabled between the two constrained bodies.
|
|
299
|
+
* @param value - Whether collision is enabled.
|
|
300
|
+
*/
|
|
301
|
+
set enableCollision(value: boolean);
|
|
302
|
+
/**
|
|
303
|
+
* Gets whether collision is enabled between the two constrained bodies.
|
|
304
|
+
* @returns Whether collision is enabled.
|
|
305
|
+
*/
|
|
306
|
+
get enableCollision(): boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Sets whether the limits of a hinge, slider or ball joint are enforced.
|
|
309
|
+
* @param value - Whether the limits are enforced.
|
|
310
|
+
*/
|
|
311
|
+
set enableLimits(value: boolean);
|
|
312
|
+
/**
|
|
313
|
+
* Gets whether the limits of the joint are enforced.
|
|
314
|
+
* @returns Whether the limits are enforced.
|
|
315
|
+
*/
|
|
316
|
+
get enableLimits(): boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Sets the reference (CSS selector, element id or entity name) to the `<pc-entity>` providing
|
|
319
|
+
* the first constrained body. The reference resolves when it is set, so an entity created
|
|
320
|
+
* later is picked up by setting the attribute again.
|
|
321
|
+
* @param value - The first body's entity reference.
|
|
322
|
+
*/
|
|
323
|
+
set entityA(value: string);
|
|
324
|
+
/**
|
|
325
|
+
* Gets the reference to the `<pc-entity>` providing the first constrained body.
|
|
326
|
+
* @returns The first body's entity reference.
|
|
327
|
+
*/
|
|
328
|
+
get entityA(): string;
|
|
329
|
+
/**
|
|
330
|
+
* Sets the reference (CSS selector, element id or entity name) to the `<pc-entity>` providing
|
|
331
|
+
* the second constrained body, or empty to constrain the first body to a fixed point in world
|
|
332
|
+
* space. The reference resolves when it is set, so an entity created later is picked up by
|
|
333
|
+
* setting the attribute again.
|
|
334
|
+
* @param value - The second body's entity reference.
|
|
335
|
+
*/
|
|
336
|
+
set entityB(value: string);
|
|
337
|
+
/**
|
|
338
|
+
* Gets the reference to the `<pc-entity>` providing the second constrained body.
|
|
339
|
+
* @returns The second body's entity reference.
|
|
340
|
+
*/
|
|
341
|
+
get entityB(): string;
|
|
342
|
+
/**
|
|
343
|
+
* Sets the lower and upper limit of a hinge joint's rotation in degrees, or a slider joint's
|
|
344
|
+
* travel in meters, applied when enable-limits is set.
|
|
345
|
+
* @param value - The rotation or travel limits.
|
|
346
|
+
*/
|
|
347
|
+
set limits(value: Vec2);
|
|
348
|
+
/**
|
|
349
|
+
* Gets the rotation or travel limits of the joint.
|
|
350
|
+
* @returns The rotation or travel limits.
|
|
351
|
+
*/
|
|
352
|
+
get limits(): Vec2;
|
|
353
|
+
/**
|
|
354
|
+
* Sets the spring damping of a 6dof joint per linear axis, used on axes with a non-zero
|
|
355
|
+
* linear-stiffness.
|
|
356
|
+
* @param value - The linear spring damping.
|
|
357
|
+
*/
|
|
358
|
+
set linearDamping(value: Vec3);
|
|
359
|
+
/**
|
|
360
|
+
* Gets the spring damping of the joint per linear axis.
|
|
361
|
+
* @returns The linear spring damping.
|
|
362
|
+
*/
|
|
363
|
+
get linearDamping(): Vec3;
|
|
364
|
+
/**
|
|
365
|
+
* Sets the rest point of a 6dof joint's linear springs in meters per axis, used on axes with a
|
|
366
|
+
* non-zero linear-stiffness.
|
|
367
|
+
* @param value - The linear spring rest points.
|
|
368
|
+
*/
|
|
369
|
+
set linearEquilibrium(value: Vec3);
|
|
370
|
+
/**
|
|
371
|
+
* Gets the rest point of the joint's linear springs.
|
|
372
|
+
* @returns The linear spring rest points.
|
|
373
|
+
*/
|
|
374
|
+
get linearEquilibrium(): Vec3;
|
|
375
|
+
/**
|
|
376
|
+
* Sets the lower and upper translation limit of a 6dof joint along its X axis in meters, used
|
|
377
|
+
* when linear-motion-x is limited.
|
|
378
|
+
* @param value - The X axis translation limits.
|
|
379
|
+
*/
|
|
380
|
+
set linearLimitsX(value: Vec2);
|
|
381
|
+
/**
|
|
382
|
+
* Gets the translation limits of the joint along its X axis.
|
|
383
|
+
* @returns The X axis translation limits.
|
|
384
|
+
*/
|
|
385
|
+
get linearLimitsX(): Vec2;
|
|
386
|
+
/**
|
|
387
|
+
* Sets the lower and upper translation limit of a 6dof joint along its Y axis in meters, used
|
|
388
|
+
* when linear-motion-y is limited.
|
|
389
|
+
* @param value - The Y axis translation limits.
|
|
390
|
+
*/
|
|
391
|
+
set linearLimitsY(value: Vec2);
|
|
392
|
+
/**
|
|
393
|
+
* Gets the translation limits of the joint along its Y axis.
|
|
394
|
+
* @returns The Y axis translation limits.
|
|
395
|
+
*/
|
|
396
|
+
get linearLimitsY(): Vec2;
|
|
397
|
+
/**
|
|
398
|
+
* Sets the lower and upper translation limit of a 6dof joint along its Z axis in meters, used
|
|
399
|
+
* when linear-motion-z is limited.
|
|
400
|
+
* @param value - The Z axis translation limits.
|
|
401
|
+
*/
|
|
402
|
+
set linearLimitsZ(value: Vec2);
|
|
403
|
+
/**
|
|
404
|
+
* Gets the translation limits of the joint along its Z axis.
|
|
405
|
+
* @returns The Z axis translation limits.
|
|
406
|
+
*/
|
|
407
|
+
get linearLimitsZ(): Vec2;
|
|
408
|
+
/**
|
|
409
|
+
* Sets how a 6dof joint constrains translation along its X axis. Can be `locked`, `limited` or
|
|
410
|
+
* `free`. Defaults to `locked`.
|
|
411
|
+
* @param value - The X axis linear degree of freedom.
|
|
412
|
+
*/
|
|
413
|
+
set linearMotionX(value: MotionMode);
|
|
414
|
+
/**
|
|
415
|
+
* Gets how the joint constrains translation along its X axis.
|
|
416
|
+
* @returns The X axis linear degree of freedom.
|
|
417
|
+
*/
|
|
418
|
+
get linearMotionX(): MotionMode;
|
|
419
|
+
/**
|
|
420
|
+
* Sets how a 6dof joint constrains translation along its Y axis. Can be `locked`, `limited` or
|
|
421
|
+
* `free`. Defaults to `locked`.
|
|
422
|
+
* @param value - The Y axis linear degree of freedom.
|
|
423
|
+
*/
|
|
424
|
+
set linearMotionY(value: MotionMode);
|
|
425
|
+
/**
|
|
426
|
+
* Gets how the joint constrains translation along its Y axis.
|
|
427
|
+
* @returns The Y axis linear degree of freedom.
|
|
428
|
+
*/
|
|
429
|
+
get linearMotionY(): MotionMode;
|
|
430
|
+
/**
|
|
431
|
+
* Sets how a 6dof joint constrains translation along its Z axis. Can be `locked`, `limited` or
|
|
432
|
+
* `free`. Defaults to `locked`.
|
|
433
|
+
* @param value - The Z axis linear degree of freedom.
|
|
434
|
+
*/
|
|
435
|
+
set linearMotionZ(value: MotionMode);
|
|
436
|
+
/**
|
|
437
|
+
* Gets how the joint constrains translation along its Z axis.
|
|
438
|
+
* @returns The Z axis linear degree of freedom.
|
|
439
|
+
*/
|
|
440
|
+
get linearMotionZ(): MotionMode;
|
|
441
|
+
/**
|
|
442
|
+
* Sets the spring stiffness of a 6dof joint per linear axis, where 0 disables the spring on
|
|
443
|
+
* that axis.
|
|
444
|
+
* @param value - The linear spring stiffness.
|
|
445
|
+
*/
|
|
446
|
+
set linearStiffness(value: Vec3);
|
|
447
|
+
/**
|
|
448
|
+
* Gets the spring stiffness of the joint per linear axis.
|
|
449
|
+
* @returns The linear spring stiffness.
|
|
450
|
+
*/
|
|
451
|
+
get linearStiffness(): Vec3;
|
|
452
|
+
/**
|
|
453
|
+
* Sets the maximum torque in newton meters of a hinge joint's motor, or the maximum force in
|
|
454
|
+
* newtons of a slider joint's motor, where 0 disables the motor.
|
|
455
|
+
* @param value - The maximum motor torque or force.
|
|
456
|
+
*/
|
|
457
|
+
set maxMotorForce(value: number);
|
|
458
|
+
/**
|
|
459
|
+
* Gets the maximum torque or force of the joint's motor.
|
|
460
|
+
* @returns The maximum motor torque or force.
|
|
461
|
+
*/
|
|
462
|
+
get maxMotorForce(): number;
|
|
463
|
+
/**
|
|
464
|
+
* Sets the target speed of a hinge joint's motor in degrees per second, or a slider joint's
|
|
465
|
+
* motor in meters per second, active while max-motor-force is greater than 0.
|
|
466
|
+
* @param value - The motor's target speed.
|
|
467
|
+
*/
|
|
468
|
+
set motorSpeed(value: number);
|
|
469
|
+
/**
|
|
470
|
+
* Gets the target speed of the joint's motor.
|
|
471
|
+
* @returns The motor's target speed.
|
|
472
|
+
*/
|
|
473
|
+
get motorSpeed(): number;
|
|
474
|
+
/**
|
|
475
|
+
* Sets the maximum swing of a ball joint around the joint frame's Y axis in degrees, applied
|
|
476
|
+
* when enable-limits is set.
|
|
477
|
+
* @param value - The Y axis swing limit.
|
|
478
|
+
*/
|
|
479
|
+
set swingLimitY(value: number);
|
|
480
|
+
/**
|
|
481
|
+
* Gets the maximum swing of the joint around the joint frame's Y axis.
|
|
482
|
+
* @returns The Y axis swing limit.
|
|
483
|
+
*/
|
|
484
|
+
get swingLimitY(): number;
|
|
485
|
+
/**
|
|
486
|
+
* Sets the maximum swing of a ball joint around the joint frame's Z axis in degrees, applied
|
|
487
|
+
* when enable-limits is set.
|
|
488
|
+
* @param value - The Z axis swing limit.
|
|
489
|
+
*/
|
|
490
|
+
set swingLimitZ(value: number);
|
|
491
|
+
/**
|
|
492
|
+
* Gets the maximum swing of the joint around the joint frame's Z axis.
|
|
493
|
+
* @returns The Z axis swing limit.
|
|
494
|
+
*/
|
|
495
|
+
get swingLimitZ(): number;
|
|
496
|
+
/**
|
|
497
|
+
* Sets the maximum twist of a ball joint about its primary axis in degrees, applied when
|
|
498
|
+
* enable-limits is set.
|
|
499
|
+
* @param value - The twist limit.
|
|
500
|
+
*/
|
|
501
|
+
set twistLimit(value: number);
|
|
502
|
+
/**
|
|
503
|
+
* Gets the maximum twist of the joint about its primary axis.
|
|
504
|
+
* @returns The twist limit.
|
|
505
|
+
*/
|
|
506
|
+
get twistLimit(): number;
|
|
507
|
+
/**
|
|
508
|
+
* Sets the type of the joint. Can be `fixed`, `ball`, `hinge`, `slider` or `6dof`. Defaults to
|
|
509
|
+
* `fixed`.
|
|
510
|
+
* @param value - The joint type.
|
|
511
|
+
*/
|
|
512
|
+
set type(value: JointType);
|
|
513
|
+
/**
|
|
514
|
+
* Gets the type of the joint.
|
|
515
|
+
* @returns The joint type.
|
|
516
|
+
*/
|
|
517
|
+
get type(): JointType;
|
|
518
|
+
static get observedAttributes(): string[];
|
|
519
|
+
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
520
|
+
}
|
|
521
|
+
export { JointComponentElement };
|