hytopia 0.12.0-prerelease-6 → 0.12.2
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/docs/server.collider.md +77 -14
- package/docs/server.collider.optionsfrommodeluri.md +2 -2
- package/docs/server.collider.scale.md +3 -44
- package/docs/server.collider.sethalfextents.md +54 -0
- package/docs/server.collider.sethalfheight.md +54 -0
- package/docs/server.collider.setradius.md +54 -0
- package/docs/server.collider.setscale.md +52 -0
- package/docs/server.entity.md +1 -1
- package/docs/server.entity.modelscale.md +1 -1
- package/docs/server.entity.setmodelscale.md +3 -3
- package/docs/server.entityeventpayloads._entity.set_model_scale_.md +1 -1
- package/docs/server.entityeventpayloads.md +1 -1
- package/docs/server.modelentityoptions.md +2 -2
- package/docs/server.modelentityoptions.modelscale.md +2 -2
- package/docs/server.modelregistry.gettrimesh.md +3 -3
- package/package.json +1 -1
- package/server.api.json +257 -54
- package/server.d.ts +30 -12
- package/server.mjs +80 -80
package/docs/server.collider.md
CHANGED
|
@@ -367,6 +367,27 @@ The relative position of the collider to its parent rigid body.
|
|
|
367
367
|
The relative rotation of the collider.
|
|
368
368
|
|
|
369
369
|
|
|
370
|
+
</td></tr>
|
|
371
|
+
<tr><td>
|
|
372
|
+
|
|
373
|
+
[scale](./server.collider.scale.md)
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
</td><td>
|
|
377
|
+
|
|
378
|
+
`readonly`
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
</td><td>
|
|
382
|
+
|
|
383
|
+
[Vector3Like](./server.vector3like.md)
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
</td><td>
|
|
387
|
+
|
|
388
|
+
The scale of the collider.
|
|
389
|
+
|
|
390
|
+
|
|
370
391
|
</td></tr>
|
|
371
392
|
<tr><td>
|
|
372
393
|
|
|
@@ -517,20 +538,6 @@ Creates a collider options object from a modelUri with best approximate shape an
|
|
|
517
538
|
Removes the collider from the simulation.
|
|
518
539
|
|
|
519
540
|
|
|
520
|
-
</td></tr>
|
|
521
|
-
<tr><td>
|
|
522
|
-
|
|
523
|
-
[scale(scalar)](./server.collider.scale.md)
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
</td><td>
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
</td><td>
|
|
530
|
-
|
|
531
|
-
Scales the collider by the given scalar. Only ball, block, capsule, cone, cylinder, round cylinder are supported.
|
|
532
|
-
|
|
533
|
-
|
|
534
541
|
</td></tr>
|
|
535
542
|
<tr><td>
|
|
536
543
|
|
|
@@ -615,6 +622,34 @@ Sets the friction of the collider.
|
|
|
615
622
|
Sets the friction combine rule of the collider.
|
|
616
623
|
|
|
617
624
|
|
|
625
|
+
</td></tr>
|
|
626
|
+
<tr><td>
|
|
627
|
+
|
|
628
|
+
[setHalfExtents(halfExtents)](./server.collider.sethalfextents.md)
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
</td><td>
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
</td><td>
|
|
635
|
+
|
|
636
|
+
Sets the half extents of a simulated block collider.
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
</td></tr>
|
|
640
|
+
<tr><td>
|
|
641
|
+
|
|
642
|
+
[setHalfHeight(halfHeight)](./server.collider.sethalfheight.md)
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
</td><td>
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
</td><td>
|
|
649
|
+
|
|
650
|
+
Sets the half height of a simulated capsule, cone, cylinder, or round cylinder collider.
|
|
651
|
+
|
|
652
|
+
|
|
618
653
|
</td></tr>
|
|
619
654
|
<tr><td>
|
|
620
655
|
|
|
@@ -643,6 +678,20 @@ Sets the mass of the collider.
|
|
|
643
678
|
Sets the on collision callback for the collider.
|
|
644
679
|
|
|
645
680
|
|
|
681
|
+
</td></tr>
|
|
682
|
+
<tr><td>
|
|
683
|
+
|
|
684
|
+
[setRadius(radius)](./server.collider.setradius.md)
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
</td><td>
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
</td><td>
|
|
691
|
+
|
|
692
|
+
Sets the radius of a simulated ball, capsule, cylinder, or round cylinder collider.
|
|
693
|
+
|
|
694
|
+
|
|
646
695
|
</td></tr>
|
|
647
696
|
<tr><td>
|
|
648
697
|
|
|
@@ -671,6 +720,20 @@ Sets the position of the collider relative to its parent rigid body or the world
|
|
|
671
720
|
Sets the relative rotation of the collider to its parent rigid body or the world origin.
|
|
672
721
|
|
|
673
722
|
|
|
723
|
+
</td></tr>
|
|
724
|
+
<tr><td>
|
|
725
|
+
|
|
726
|
+
[setScale(scale)](./server.collider.setscale.md)
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
</td><td>
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
</td><td>
|
|
733
|
+
|
|
734
|
+
Scales the collider by the given scalar. Only ball, block, capsule, cone, cylinder, round cylinder are supported.
|
|
735
|
+
|
|
736
|
+
|
|
674
737
|
</td></tr>
|
|
675
738
|
<tr><td>
|
|
676
739
|
|
|
@@ -9,7 +9,7 @@ Creates a collider options object from a modelUri with best approximate shape an
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
static optionsFromModelUri(modelUri: string, scale?: number, preferredShape?: ColliderShape): ColliderOptions;
|
|
12
|
+
static optionsFromModelUri(modelUri: string, scale?: Vector3Like | number, preferredShape?: ColliderShape): ColliderOptions;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -53,7 +53,7 @@ scale
|
|
|
53
53
|
|
|
54
54
|
</td><td>
|
|
55
55
|
|
|
56
|
-
number
|
|
56
|
+
[Vector3Like](./server.vector3like.md) \| number
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
</td><td>
|
|
@@ -2,53 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
[Home](./index.md) > [server](./server.md) > [Collider](./server.collider.md) > [scale](./server.collider.scale.md)
|
|
4
4
|
|
|
5
|
-
## Collider.scale
|
|
5
|
+
## Collider.scale property
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The scale of the collider.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
scale(
|
|
12
|
+
get scale(): Vector3Like;
|
|
13
13
|
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
scalar
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
number
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
The scalar to scale the collider by.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
</tbody></table>
|
|
50
|
-
|
|
51
|
-
**Returns:**
|
|
52
|
-
|
|
53
|
-
void
|
|
54
|
-
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Collider](./server.collider.md) > [setHalfExtents](./server.collider.sethalfextents.md)
|
|
4
|
+
|
|
5
|
+
## Collider.setHalfExtents() method
|
|
6
|
+
|
|
7
|
+
Sets the half extents of a simulated block collider.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setHalfExtents(halfExtents: Vector3Like): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
halfExtents
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
[Vector3Like](./server.vector3like.md)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The half extents of the block collider.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
void
|
|
54
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Collider](./server.collider.md) > [setHalfHeight](./server.collider.sethalfheight.md)
|
|
4
|
+
|
|
5
|
+
## Collider.setHalfHeight() method
|
|
6
|
+
|
|
7
|
+
Sets the half height of a simulated capsule, cone, cylinder, or round cylinder collider.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setHalfHeight(halfHeight: number): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
halfHeight
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
number
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The half height of the capsule, cone, cylinder, or round cylinder collider.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
void
|
|
54
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Collider](./server.collider.md) > [setRadius](./server.collider.setradius.md)
|
|
4
|
+
|
|
5
|
+
## Collider.setRadius() method
|
|
6
|
+
|
|
7
|
+
Sets the radius of a simulated ball, capsule, cylinder, or round cylinder collider.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setRadius(radius: number): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
radius
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
number
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The radius of the collider.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
void
|
|
54
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Collider](./server.collider.md) > [setScale](./server.collider.setscale.md)
|
|
4
|
+
|
|
5
|
+
## Collider.setScale() method
|
|
6
|
+
|
|
7
|
+
Scales the collider by the given scalar. Only ball, block, capsule, cone, cylinder, round cylinder are supported.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setScale(scale: Vector3Like): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
scale
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
[Vector3Like](./server.vector3like.md)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td></tr>
|
|
47
|
+
</tbody></table>
|
|
48
|
+
|
|
49
|
+
**Returns:**
|
|
50
|
+
|
|
51
|
+
void
|
|
52
|
+
|
package/docs/server.entity.md
CHANGED
|
@@ -9,7 +9,7 @@ Sets the scale of the entity's model and proportionally scales its colliders.
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
setModelScale(modelScale: number): void;
|
|
12
|
+
setModelScale(modelScale: Vector3Like | number): void;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -37,12 +37,12 @@ modelScale
|
|
|
37
37
|
|
|
38
38
|
</td><td>
|
|
39
39
|
|
|
40
|
-
number
|
|
40
|
+
[Vector3Like](./server.vector3like.md) \| number
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
</td><td>
|
|
44
44
|
|
|
45
|
-
The scale of the entity's model.
|
|
45
|
+
The scale of the entity's model. Can be a vector or a number for uniform scaling.
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
</td></tr>
|
|
@@ -178,7 +178,7 @@ Emitted when nodes of the entity's model are set to be hidden.
|
|
|
178
178
|
|
|
179
179
|
</td><td>
|
|
180
180
|
|
|
181
|
-
{ entity: [Entity](./server.entity.md)<!-- -->; modelScale:
|
|
181
|
+
{ entity: [Entity](./server.entity.md)<!-- -->; modelScale: [Vector3Like](./server.vector3like.md)<!-- -->; }
|
|
182
182
|
|
|
183
183
|
|
|
184
184
|
</td><td>
|
|
@@ -122,12 +122,12 @@ _(Optional)_ The preferred shape of the entity's model when automatically genera
|
|
|
122
122
|
|
|
123
123
|
</td><td>
|
|
124
124
|
|
|
125
|
-
number
|
|
125
|
+
[Vector3Like](./server.vector3like.md) \| number
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
</td><td>
|
|
129
129
|
|
|
130
|
-
_(Optional)_ The scale of the entity's model.
|
|
130
|
+
_(Optional)_ The scale of the entity's model. Can be a vector3 for per-axis scaling, or a number for uniform scaling.
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
</td></tr>
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
## ModelEntityOptions.modelScale property
|
|
6
6
|
|
|
7
|
-
The scale of the entity's model.
|
|
7
|
+
The scale of the entity's model. Can be a vector3 for per-axis scaling, or a number for uniform scaling.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
modelScale?: number;
|
|
12
|
+
modelScale?: Vector3Like | number;
|
|
13
13
|
```
|
|
@@ -9,7 +9,7 @@ Retrieves the trimesh of a model.
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
getTrimesh(modelUri: string, scale?:
|
|
12
|
+
getTrimesh(modelUri: string, scale?: Vector3Like): ModelTrimesh | undefined;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -53,12 +53,12 @@ scale
|
|
|
53
53
|
|
|
54
54
|
</td><td>
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
[Vector3Like](./server.vector3like.md)
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
</td><td>
|
|
60
60
|
|
|
61
|
-
_(Optional)_ Optional
|
|
61
|
+
_(Optional)_ Optional scaling to apply to the trimesh. Defaults to 1 for all axes (no scaling).
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
</td></tr>
|
package/package.json
CHANGED