hytopia 0.6.28 → 0.6.29
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/bun-server.mjs +31 -31
- package/docs/server.collider.md +12 -0
- package/docs/server.collider.scale.md +49 -0
- package/docs/server.entity.md +14 -0
- package/docs/server.entity.setmodelscale.md +53 -0
- package/docs/server.entityevent.md +14 -0
- package/docs/server.entityeventpayloads._entity.set_model_scale_.md +16 -0
- package/docs/server.entityeventpayloads.md +19 -0
- package/node-server.mjs +4 -4
- package/package.json +1 -1
- package/server.api.json +162 -0
- package/server.d.ts +15 -0
package/package.json
CHANGED
package/server.api.json
CHANGED
|
@@ -8756,6 +8756,54 @@
|
|
|
8756
8756
|
"isAbstract": false,
|
|
8757
8757
|
"name": "removeFromSimulation"
|
|
8758
8758
|
},
|
|
8759
|
+
{
|
|
8760
|
+
"kind": "Method",
|
|
8761
|
+
"canonicalReference": "server!Collider#scale:member(1)",
|
|
8762
|
+
"docComment": "",
|
|
8763
|
+
"excerptTokens": [
|
|
8764
|
+
{
|
|
8765
|
+
"kind": "Content",
|
|
8766
|
+
"text": "scale(scalar: "
|
|
8767
|
+
},
|
|
8768
|
+
{
|
|
8769
|
+
"kind": "Content",
|
|
8770
|
+
"text": "number"
|
|
8771
|
+
},
|
|
8772
|
+
{
|
|
8773
|
+
"kind": "Content",
|
|
8774
|
+
"text": "): "
|
|
8775
|
+
},
|
|
8776
|
+
{
|
|
8777
|
+
"kind": "Content",
|
|
8778
|
+
"text": "void"
|
|
8779
|
+
},
|
|
8780
|
+
{
|
|
8781
|
+
"kind": "Content",
|
|
8782
|
+
"text": ";"
|
|
8783
|
+
}
|
|
8784
|
+
],
|
|
8785
|
+
"isStatic": false,
|
|
8786
|
+
"returnTypeTokenRange": {
|
|
8787
|
+
"startIndex": 3,
|
|
8788
|
+
"endIndex": 4
|
|
8789
|
+
},
|
|
8790
|
+
"releaseTag": "Public",
|
|
8791
|
+
"isProtected": false,
|
|
8792
|
+
"overloadIndex": 1,
|
|
8793
|
+
"parameters": [
|
|
8794
|
+
{
|
|
8795
|
+
"parameterName": "scalar",
|
|
8796
|
+
"parameterTypeTokenRange": {
|
|
8797
|
+
"startIndex": 1,
|
|
8798
|
+
"endIndex": 2
|
|
8799
|
+
},
|
|
8800
|
+
"isOptional": false
|
|
8801
|
+
}
|
|
8802
|
+
],
|
|
8803
|
+
"isOptional": false,
|
|
8804
|
+
"isAbstract": false,
|
|
8805
|
+
"name": "scale"
|
|
8806
|
+
},
|
|
8759
8807
|
{
|
|
8760
8808
|
"kind": "Method",
|
|
8761
8809
|
"canonicalReference": "server!Collider#setBounciness:member(1)",
|
|
@@ -14209,6 +14257,54 @@
|
|
|
14209
14257
|
"isAbstract": false,
|
|
14210
14258
|
"name": "setModelHiddenNodes"
|
|
14211
14259
|
},
|
|
14260
|
+
{
|
|
14261
|
+
"kind": "Method",
|
|
14262
|
+
"canonicalReference": "server!Entity#setModelScale:member(1)",
|
|
14263
|
+
"docComment": "/**\n * Sets the scale of the entity's model and proportionally scales its colliders.\n *\n * @param modelScale - The scale of the entity's model.\n */\n",
|
|
14264
|
+
"excerptTokens": [
|
|
14265
|
+
{
|
|
14266
|
+
"kind": "Content",
|
|
14267
|
+
"text": "setModelScale(modelScale: "
|
|
14268
|
+
},
|
|
14269
|
+
{
|
|
14270
|
+
"kind": "Content",
|
|
14271
|
+
"text": "number"
|
|
14272
|
+
},
|
|
14273
|
+
{
|
|
14274
|
+
"kind": "Content",
|
|
14275
|
+
"text": "): "
|
|
14276
|
+
},
|
|
14277
|
+
{
|
|
14278
|
+
"kind": "Content",
|
|
14279
|
+
"text": "void"
|
|
14280
|
+
},
|
|
14281
|
+
{
|
|
14282
|
+
"kind": "Content",
|
|
14283
|
+
"text": ";"
|
|
14284
|
+
}
|
|
14285
|
+
],
|
|
14286
|
+
"isStatic": false,
|
|
14287
|
+
"returnTypeTokenRange": {
|
|
14288
|
+
"startIndex": 3,
|
|
14289
|
+
"endIndex": 4
|
|
14290
|
+
},
|
|
14291
|
+
"releaseTag": "Public",
|
|
14292
|
+
"isProtected": false,
|
|
14293
|
+
"overloadIndex": 1,
|
|
14294
|
+
"parameters": [
|
|
14295
|
+
{
|
|
14296
|
+
"parameterName": "modelScale",
|
|
14297
|
+
"parameterTypeTokenRange": {
|
|
14298
|
+
"startIndex": 1,
|
|
14299
|
+
"endIndex": 2
|
|
14300
|
+
},
|
|
14301
|
+
"isOptional": false
|
|
14302
|
+
}
|
|
14303
|
+
],
|
|
14304
|
+
"isOptional": false,
|
|
14305
|
+
"isAbstract": false,
|
|
14306
|
+
"name": "setModelScale"
|
|
14307
|
+
},
|
|
14212
14308
|
{
|
|
14213
14309
|
"kind": "Method",
|
|
14214
14310
|
"canonicalReference": "server!Entity#setModelShownNodes:member(1)",
|
|
@@ -15184,6 +15280,27 @@
|
|
|
15184
15280
|
"releaseTag": "Public",
|
|
15185
15281
|
"name": "SET_MODEL_HIDDEN_NODES"
|
|
15186
15282
|
},
|
|
15283
|
+
{
|
|
15284
|
+
"kind": "EnumMember",
|
|
15285
|
+
"canonicalReference": "server!EntityEvent.SET_MODEL_SCALE:member",
|
|
15286
|
+
"docComment": "",
|
|
15287
|
+
"excerptTokens": [
|
|
15288
|
+
{
|
|
15289
|
+
"kind": "Content",
|
|
15290
|
+
"text": "SET_MODEL_SCALE = "
|
|
15291
|
+
},
|
|
15292
|
+
{
|
|
15293
|
+
"kind": "Content",
|
|
15294
|
+
"text": "\"ENTITY.SET_MODEL_SCALE\""
|
|
15295
|
+
}
|
|
15296
|
+
],
|
|
15297
|
+
"initializerTokenRange": {
|
|
15298
|
+
"startIndex": 1,
|
|
15299
|
+
"endIndex": 2
|
|
15300
|
+
},
|
|
15301
|
+
"releaseTag": "Public",
|
|
15302
|
+
"name": "SET_MODEL_SCALE"
|
|
15303
|
+
},
|
|
15187
15304
|
{
|
|
15188
15305
|
"kind": "EnumMember",
|
|
15189
15306
|
"canonicalReference": "server!EntityEvent.SET_MODEL_SHOWN_NODES:member",
|
|
@@ -15831,6 +15948,51 @@
|
|
|
15831
15948
|
"endIndex": 8
|
|
15832
15949
|
}
|
|
15833
15950
|
},
|
|
15951
|
+
{
|
|
15952
|
+
"kind": "PropertySignature",
|
|
15953
|
+
"canonicalReference": "server!EntityEventPayloads#\"ENTITY.SET_MODEL_SCALE\":member",
|
|
15954
|
+
"docComment": "/**\n * Emitted when the scale of the entity's model is set.\n */\n",
|
|
15955
|
+
"excerptTokens": [
|
|
15956
|
+
{
|
|
15957
|
+
"kind": "Content",
|
|
15958
|
+
"text": "["
|
|
15959
|
+
},
|
|
15960
|
+
{
|
|
15961
|
+
"kind": "Reference",
|
|
15962
|
+
"text": "EntityEvent.SET_MODEL_SCALE",
|
|
15963
|
+
"canonicalReference": "server!EntityEvent.SET_MODEL_SCALE:member"
|
|
15964
|
+
},
|
|
15965
|
+
{
|
|
15966
|
+
"kind": "Content",
|
|
15967
|
+
"text": "]: "
|
|
15968
|
+
},
|
|
15969
|
+
{
|
|
15970
|
+
"kind": "Content",
|
|
15971
|
+
"text": "{\n entity: "
|
|
15972
|
+
},
|
|
15973
|
+
{
|
|
15974
|
+
"kind": "Reference",
|
|
15975
|
+
"text": "Entity",
|
|
15976
|
+
"canonicalReference": "server!Entity:class"
|
|
15977
|
+
},
|
|
15978
|
+
{
|
|
15979
|
+
"kind": "Content",
|
|
15980
|
+
"text": ";\n modelScale: number;\n }"
|
|
15981
|
+
},
|
|
15982
|
+
{
|
|
15983
|
+
"kind": "Content",
|
|
15984
|
+
"text": ";"
|
|
15985
|
+
}
|
|
15986
|
+
],
|
|
15987
|
+
"isReadonly": false,
|
|
15988
|
+
"isOptional": false,
|
|
15989
|
+
"releaseTag": "Public",
|
|
15990
|
+
"name": "\"ENTITY.SET_MODEL_SCALE\"",
|
|
15991
|
+
"propertyTypeTokenRange": {
|
|
15992
|
+
"startIndex": 3,
|
|
15993
|
+
"endIndex": 6
|
|
15994
|
+
}
|
|
15995
|
+
},
|
|
15834
15996
|
{
|
|
15835
15997
|
"kind": "PropertySignature",
|
|
15836
15998
|
"canonicalReference": "server!EntityEventPayloads#\"ENTITY.SET_MODEL_SHOWN_NODES\":member",
|
package/server.d.ts
CHANGED
|
@@ -1083,6 +1083,8 @@ export declare class Collider extends EventRouter {
|
|
|
1083
1083
|
|
|
1084
1084
|
|
|
1085
1085
|
|
|
1086
|
+
private _relativeRotation;
|
|
1087
|
+
|
|
1086
1088
|
|
|
1087
1089
|
|
|
1088
1090
|
/**
|
|
@@ -1211,6 +1213,7 @@ export declare class Collider extends EventRouter {
|
|
|
1211
1213
|
* @param parentRigidBody - The parent rigid body of the collider.
|
|
1212
1214
|
*/
|
|
1213
1215
|
addToSimulation(simulation: Simulation, parentRigidBody?: RigidBody): void;
|
|
1216
|
+
scale(scalar: number): void;
|
|
1214
1217
|
/**
|
|
1215
1218
|
* Enables or disables collision events for the collider.
|
|
1216
1219
|
* This is automatically enabled if an on collision callback is set.
|
|
@@ -1854,6 +1857,12 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
|
|
|
1854
1857
|
* @param modelHiddenNodes - The nodes to hide on the entity's model.
|
|
1855
1858
|
*/
|
|
1856
1859
|
setModelHiddenNodes(modelHiddenNodes: string[]): void;
|
|
1860
|
+
/**
|
|
1861
|
+
* Sets the scale of the entity's model and proportionally
|
|
1862
|
+
* scales its colliders.
|
|
1863
|
+
* @param modelScale - The scale of the entity's model.
|
|
1864
|
+
*/
|
|
1865
|
+
setModelScale(modelScale: number): void;
|
|
1857
1866
|
/**
|
|
1858
1867
|
* Sets the nodes to show on the entity's model, overriding hidden nodes.
|
|
1859
1868
|
* Matched nodes will be shown for all players. Uses case insensitive
|
|
@@ -1965,6 +1974,7 @@ export declare enum EntityEvent {
|
|
|
1965
1974
|
ENTITY_CONTACT_FORCE = "ENTITY.ENTITY_CONTACT_FORCE",
|
|
1966
1975
|
SET_MODEL_ANIMATIONS_PLAYBACK_RATE = "ENTITY.SET_MODEL_ANIMATIONS_PLAYBACK_RATE",
|
|
1967
1976
|
SET_MODEL_HIDDEN_NODES = "ENTITY.SET_MODEL_HIDDEN_NODES",
|
|
1977
|
+
SET_MODEL_SCALE = "ENTITY.SET_MODEL_SCALE",
|
|
1968
1978
|
SET_MODEL_SHOWN_NODES = "ENTITY.SET_MODEL_SHOWN_NODES",
|
|
1969
1979
|
SET_MODEL_TEXTURE_URI = "ENTITY.SET_MODEL_TEXTURE_URI",
|
|
1970
1980
|
SET_OPACITY = "ENTITY.SET_OPACITY",
|
|
@@ -2023,6 +2033,11 @@ export declare interface EntityEventPayloads {
|
|
|
2023
2033
|
entity: Entity;
|
|
2024
2034
|
modelHiddenNodes: Set<string>;
|
|
2025
2035
|
};
|
|
2036
|
+
/** Emitted when the scale of the entity's model is set. */
|
|
2037
|
+
[EntityEvent.SET_MODEL_SCALE]: {
|
|
2038
|
+
entity: Entity;
|
|
2039
|
+
modelScale: number;
|
|
2040
|
+
};
|
|
2026
2041
|
/** Emitted when nodes of the entity's model are set to be shown. */
|
|
2027
2042
|
[EntityEvent.SET_MODEL_SHOWN_NODES]: {
|
|
2028
2043
|
entity: Entity;
|