hytopia 0.1.73 → 0.1.75
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.player.input.md +1 -1
- package/docs/server.player.md +1 -1
- package/docs/{server.rigidbody.createandaddchildcollidertosimulation.md → server.rigidbody.createandaddchildcollider.md} +7 -3
- package/docs/server.rigidbody.md +4 -4
- package/examples/entity-controller/MyEntityController.ts +2 -2
- package/package.json +1 -1
- package/server.api.json +23 -36
- package/server.d.ts +7 -2
- package/server.js +84 -84
package/docs/server.player.md
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [RigidBody](./server.rigidbody.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [RigidBody](./server.rigidbody.md) > [createAndAddChildCollider](./server.rigidbody.createandaddchildcollider.md)
|
4
4
|
|
5
|
-
## RigidBody.
|
5
|
+
## RigidBody.createAndAddChildCollider() method
|
6
6
|
|
7
7
|
Creates and adds a child collider to the rigid body for the simulation it belongs to.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
11
11
|
```typescript
|
12
|
-
|
12
|
+
createAndAddChildCollider(colliderOptions: ColliderOptions): Collider;
|
13
13
|
```
|
14
14
|
|
15
15
|
## Parameters
|
@@ -53,3 +53,7 @@ The options for the child collider to add.
|
|
53
53
|
|
54
54
|
The child collider that was added to the rigid body.
|
55
55
|
|
56
|
+
## Remarks
|
57
|
+
|
58
|
+
If the rigid body is not simulated, the collider will be added to the rigid body as a pending child collider and also simulated when the rigid body is simulated.
|
59
|
+
|
package/docs/server.rigidbody.md
CHANGED
@@ -1054,7 +1054,7 @@ Applies a torque impulse to the rigid body.
|
|
1054
1054
|
</td></tr>
|
1055
1055
|
<tr><td>
|
1056
1056
|
|
1057
|
-
[
|
1057
|
+
[createAndAddChildCollider(colliderOptions)](./server.rigidbody.createandaddchildcollider.md)
|
1058
1058
|
|
1059
1059
|
|
1060
1060
|
</td><td>
|
@@ -1062,13 +1062,13 @@ Applies a torque impulse to the rigid body.
|
|
1062
1062
|
|
1063
1063
|
</td><td>
|
1064
1064
|
|
1065
|
-
Creates and adds
|
1065
|
+
Creates and adds a child collider to the rigid body for the simulation it belongs to.
|
1066
1066
|
|
1067
1067
|
|
1068
1068
|
</td></tr>
|
1069
1069
|
<tr><td>
|
1070
1070
|
|
1071
|
-
[
|
1071
|
+
[createAndAddChildCollidersToSimulation(colliderOptions)](./server.rigidbody.createandaddchildcolliderstosimulation.md)
|
1072
1072
|
|
1073
1073
|
|
1074
1074
|
</td><td>
|
@@ -1076,7 +1076,7 @@ Creates and adds multiple child colliders to the rigid body for the simulation i
|
|
1076
1076
|
|
1077
1077
|
</td><td>
|
1078
1078
|
|
1079
|
-
Creates and adds
|
1079
|
+
Creates and adds multiple child colliders to the rigid body for the simulation it belongs to.
|
1080
1080
|
|
1081
1081
|
|
1082
1082
|
</td></tr>
|
@@ -135,7 +135,7 @@ export default class MyEntityController extends BaseEntityController {
|
|
135
135
|
}
|
136
136
|
|
137
137
|
// Ground sensor
|
138
|
-
entity.
|
138
|
+
entity.createAndAddChildCollider({
|
139
139
|
shape: ColliderShape.CYLINDER,
|
140
140
|
radius: 0.23,
|
141
141
|
halfHeight: 0.125,
|
@@ -169,7 +169,7 @@ export default class MyEntityController extends BaseEntityController {
|
|
169
169
|
|
170
170
|
|
171
171
|
// Wall collider
|
172
|
-
entity.
|
172
|
+
entity.createAndAddChildCollider({
|
173
173
|
shape: ColliderShape.CAPSULE,
|
174
174
|
halfHeight: 0.30,
|
175
175
|
radius: 0.37,
|
package/package.json
CHANGED
package/server.api.json
CHANGED
@@ -16992,24 +16992,11 @@
|
|
16992
16992
|
"kind": "Content",
|
16993
16993
|
"text": "get input(): "
|
16994
16994
|
},
|
16995
|
-
{
|
16996
|
-
"kind": "Reference",
|
16997
|
-
"text": "Readonly",
|
16998
|
-
"canonicalReference": "!Readonly:type"
|
16999
|
-
},
|
17000
|
-
{
|
17001
|
-
"kind": "Content",
|
17002
|
-
"text": "<"
|
17003
|
-
},
|
17004
16995
|
{
|
17005
16996
|
"kind": "Reference",
|
17006
16997
|
"text": "PlayerInput",
|
17007
16998
|
"canonicalReference": "server!PlayerInput:type"
|
17008
16999
|
},
|
17009
|
-
{
|
17010
|
-
"kind": "Content",
|
17011
|
-
"text": ">"
|
17012
|
-
},
|
17013
17000
|
{
|
17014
17001
|
"kind": "Content",
|
17015
17002
|
"text": ";"
|
@@ -17021,7 +17008,7 @@
|
|
17021
17008
|
"name": "input",
|
17022
17009
|
"propertyTypeTokenRange": {
|
17023
17010
|
"startIndex": 1,
|
17024
|
-
"endIndex":
|
17011
|
+
"endIndex": 2
|
17025
17012
|
},
|
17026
17013
|
"isStatic": false,
|
17027
17014
|
"isProtected": false,
|
@@ -24023,22 +24010,18 @@
|
|
24023
24010
|
},
|
24024
24011
|
{
|
24025
24012
|
"kind": "Method",
|
24026
|
-
"canonicalReference": "server!RigidBody#
|
24027
|
-
"docComment": "/**\n * Creates and adds
|
24013
|
+
"canonicalReference": "server!RigidBody#createAndAddChildCollider:member(1)",
|
24014
|
+
"docComment": "/**\n * Creates and adds a child collider to the rigid body for the simulation it belongs to.\n *\n * @remarks\n *\n * If the rigid body is not simulated, the collider will be added to the rigid body as a pending child collider and also simulated when the rigid body is simulated.\n *\n * @param colliderOptions - The options for the child collider to add.\n *\n * @returns The child collider that was added to the rigid body.\n */\n",
|
24028
24015
|
"excerptTokens": [
|
24029
24016
|
{
|
24030
24017
|
"kind": "Content",
|
24031
|
-
"text": "
|
24018
|
+
"text": "createAndAddChildCollider(colliderOptions: "
|
24032
24019
|
},
|
24033
24020
|
{
|
24034
24021
|
"kind": "Reference",
|
24035
24022
|
"text": "ColliderOptions",
|
24036
24023
|
"canonicalReference": "server!ColliderOptions:interface"
|
24037
24024
|
},
|
24038
|
-
{
|
24039
|
-
"kind": "Content",
|
24040
|
-
"text": "[]"
|
24041
|
-
},
|
24042
24025
|
{
|
24043
24026
|
"kind": "Content",
|
24044
24027
|
"text": "): "
|
@@ -24048,10 +24031,6 @@
|
|
24048
24031
|
"text": "Collider",
|
24049
24032
|
"canonicalReference": "server!Collider:class"
|
24050
24033
|
},
|
24051
|
-
{
|
24052
|
-
"kind": "Content",
|
24053
|
-
"text": "[]"
|
24054
|
-
},
|
24055
24034
|
{
|
24056
24035
|
"kind": "Content",
|
24057
24036
|
"text": ";"
|
@@ -24059,8 +24038,8 @@
|
|
24059
24038
|
],
|
24060
24039
|
"isStatic": false,
|
24061
24040
|
"returnTypeTokenRange": {
|
24062
|
-
"startIndex":
|
24063
|
-
"endIndex":
|
24041
|
+
"startIndex": 3,
|
24042
|
+
"endIndex": 4
|
24064
24043
|
},
|
24065
24044
|
"releaseTag": "Public",
|
24066
24045
|
"isProtected": false,
|
@@ -24070,29 +24049,33 @@
|
|
24070
24049
|
"parameterName": "colliderOptions",
|
24071
24050
|
"parameterTypeTokenRange": {
|
24072
24051
|
"startIndex": 1,
|
24073
|
-
"endIndex":
|
24052
|
+
"endIndex": 2
|
24074
24053
|
},
|
24075
24054
|
"isOptional": false
|
24076
24055
|
}
|
24077
24056
|
],
|
24078
24057
|
"isOptional": false,
|
24079
24058
|
"isAbstract": false,
|
24080
|
-
"name": "
|
24059
|
+
"name": "createAndAddChildCollider"
|
24081
24060
|
},
|
24082
24061
|
{
|
24083
24062
|
"kind": "Method",
|
24084
|
-
"canonicalReference": "server!RigidBody#
|
24085
|
-
"docComment": "/**\n * Creates and adds
|
24063
|
+
"canonicalReference": "server!RigidBody#createAndAddChildCollidersToSimulation:member(1)",
|
24064
|
+
"docComment": "/**\n * Creates and adds multiple child colliders to the rigid body for the simulation it belongs to.\n *\n * @param colliderOptions - The options for the child colliders to add to the rigid body.\n *\n * @returns The child colliders that were added to the rigid body.\n */\n",
|
24086
24065
|
"excerptTokens": [
|
24087
24066
|
{
|
24088
24067
|
"kind": "Content",
|
24089
|
-
"text": "
|
24068
|
+
"text": "createAndAddChildCollidersToSimulation(colliderOptions: "
|
24090
24069
|
},
|
24091
24070
|
{
|
24092
24071
|
"kind": "Reference",
|
24093
24072
|
"text": "ColliderOptions",
|
24094
24073
|
"canonicalReference": "server!ColliderOptions:interface"
|
24095
24074
|
},
|
24075
|
+
{
|
24076
|
+
"kind": "Content",
|
24077
|
+
"text": "[]"
|
24078
|
+
},
|
24096
24079
|
{
|
24097
24080
|
"kind": "Content",
|
24098
24081
|
"text": "): "
|
@@ -24102,6 +24085,10 @@
|
|
24102
24085
|
"text": "Collider",
|
24103
24086
|
"canonicalReference": "server!Collider:class"
|
24104
24087
|
},
|
24088
|
+
{
|
24089
|
+
"kind": "Content",
|
24090
|
+
"text": "[]"
|
24091
|
+
},
|
24105
24092
|
{
|
24106
24093
|
"kind": "Content",
|
24107
24094
|
"text": ";"
|
@@ -24109,8 +24096,8 @@
|
|
24109
24096
|
],
|
24110
24097
|
"isStatic": false,
|
24111
24098
|
"returnTypeTokenRange": {
|
24112
|
-
"startIndex":
|
24113
|
-
"endIndex":
|
24099
|
+
"startIndex": 4,
|
24100
|
+
"endIndex": 6
|
24114
24101
|
},
|
24115
24102
|
"releaseTag": "Public",
|
24116
24103
|
"isProtected": false,
|
@@ -24120,14 +24107,14 @@
|
|
24120
24107
|
"parameterName": "colliderOptions",
|
24121
24108
|
"parameterTypeTokenRange": {
|
24122
24109
|
"startIndex": 1,
|
24123
|
-
"endIndex":
|
24110
|
+
"endIndex": 3
|
24124
24111
|
},
|
24125
24112
|
"isOptional": false
|
24126
24113
|
}
|
24127
24114
|
],
|
24128
24115
|
"isOptional": false,
|
24129
24116
|
"isAbstract": false,
|
24130
|
-
"name": "
|
24117
|
+
"name": "createAndAddChildCollidersToSimulation"
|
24131
24118
|
},
|
24132
24119
|
{
|
24133
24120
|
"kind": "Property",
|
package/server.d.ts
CHANGED
@@ -2170,7 +2170,7 @@ export declare class Player {
|
|
2170
2170
|
|
2171
2171
|
|
2172
2172
|
/** The current {@link PlayerInput} of the player. */
|
2173
|
-
get input():
|
2173
|
+
get input(): PlayerInput;
|
2174
2174
|
/** The current {@link World} the player is in. */
|
2175
2175
|
get world(): World | undefined;
|
2176
2176
|
/**
|
@@ -3194,10 +3194,15 @@ export declare class RigidBody {
|
|
3194
3194
|
applyTorqueImpulse(impulse: Vector3Like): void;
|
3195
3195
|
/**
|
3196
3196
|
* Creates and adds a child collider to the rigid body for the simulation it belongs to.
|
3197
|
+
*
|
3198
|
+
* @remarks
|
3199
|
+
* If the rigid body is not simulated, the collider will be added to the rigid body as a pending child collider
|
3200
|
+
* and also simulated when the rigid body is simulated.
|
3201
|
+
*
|
3197
3202
|
* @param colliderOptions - The options for the child collider to add.
|
3198
3203
|
* @returns The child collider that was added to the rigid body.
|
3199
3204
|
*/
|
3200
|
-
|
3205
|
+
createAndAddChildCollider(colliderOptions: ColliderOptions): Collider;
|
3201
3206
|
/**
|
3202
3207
|
* Creates and adds multiple child colliders to the rigid body for the simulation it belongs to.
|
3203
3208
|
* @param colliderOptions - The options for the child colliders to add to the rigid body.
|