hytopia 0.6.27 → 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/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;
@@ -6078,6 +6093,9 @@ export declare class World extends EventRouter implements protocol.Serializable
6078
6093
 
6079
6094
 
6080
6095
 
6096
+
6097
+
6098
+
6081
6099
 
6082
6100
 
6083
6101
 
@@ -6097,6 +6115,12 @@ export declare class World extends EventRouter implements protocol.Serializable
6097
6115
  get directionalLightIntensity(): number;
6098
6116
  /** The position the directional light originates from. */
6099
6117
  get directionalLightPosition(): Vector3Like;
6118
+ /** The color of the fog, if not explicitly set, defaults to ambient light color. */
6119
+ get fogColor(): RgbColor | undefined;
6120
+ /** The maximum distance from the camera at which fog stops being applied. */
6121
+ get fogFar(): number;
6122
+ /** The minimum distance from the camera to start applying fog. */
6123
+ get fogNear(): number;
6100
6124
  /** The name of the world. */
6101
6125
  get name(): string;
6102
6126
  /** The intensity of the world's skybox brightness. */
@@ -6154,6 +6178,21 @@ export declare class World extends EventRouter implements protocol.Serializable
6154
6178
  * @param position - The position in the world.
6155
6179
  */
6156
6180
  setDirectionalLightPosition(position: Vector3Like): void;
6181
+ /**
6182
+ * Sets the color of the world's fog.
6183
+ * @param color - The color of the fog, or undefined to reset to ambient light color.
6184
+ */
6185
+ setFogColor(color: RgbColor | undefined): void;
6186
+ /**
6187
+ * Sets the maximum distance from the camera at which fog stops being applied.
6188
+ * @param far - The far distance.
6189
+ */
6190
+ setFogFar(far: number): void;
6191
+ /**
6192
+ * Sets the minimum distance from the camera to start applying fog.
6193
+ * @param near - The near distance.
6194
+ */
6195
+ setFogNear(near: number): void;
6157
6196
  /**
6158
6197
  * Sets the intensity of the world's skybox brightness.
6159
6198
  * @param intensity - The intensity.
@@ -6177,6 +6216,9 @@ export declare enum WorldEvent {
6177
6216
  SET_DIRECTIONAL_LIGHT_COLOR = "WORLD.SET_DIRECTIONAL_LIGHT_COLOR",
6178
6217
  SET_DIRECTIONAL_LIGHT_INTENSITY = "WORLD.SET_DIRECTIONAL_LIGHT_INTENSITY",
6179
6218
  SET_DIRECTIONAL_LIGHT_POSITION = "WORLD.SET_DIRECTIONAL_LIGHT_POSITION",
6219
+ SET_FOG_COLOR = "WORLD.SET_FOG_COLOR",
6220
+ SET_FOG_FAR = "WORLD.SET_FOG_FAR",
6221
+ SET_FOG_NEAR = "WORLD.SET_FOG_NEAR",
6180
6222
  SET_SKYBOX_INTENSITY = "WORLD.SET_SKYBOX_INTENSITY",
6181
6223
  START = "WORLD.START",
6182
6224
  STOP = "WORLD.STOP"
@@ -6209,6 +6251,21 @@ export declare interface WorldEventPayloads {
6209
6251
  world: World;
6210
6252
  position: Vector3Like;
6211
6253
  };
6254
+ /** Emitted when the color of the world's fog is set. */
6255
+ [WorldEvent.SET_FOG_COLOR]: {
6256
+ world: World;
6257
+ color: RgbColor;
6258
+ };
6259
+ /** Emitted when the density of the world's fog is set. */
6260
+ [WorldEvent.SET_FOG_FAR]: {
6261
+ world: World;
6262
+ far: number;
6263
+ };
6264
+ /** Emitted when the density of the world's fog is set. */
6265
+ [WorldEvent.SET_FOG_NEAR]: {
6266
+ world: World;
6267
+ near: number;
6268
+ };
6212
6269
  /** Emitted when the intensity of the world's skybox brightness is set. */
6213
6270
  [WorldEvent.SET_SKYBOX_INTENSITY]: {
6214
6271
  world: World;
@@ -6425,6 +6482,12 @@ export declare interface WorldOptions {
6425
6482
  directionalLightIntensity?: number;
6426
6483
  /** The position the directional light originates from for the world. */
6427
6484
  directionalLightPosition?: Vector3Like;
6485
+ /** The color of the fog for the world. Defaults to ambient light color. */
6486
+ fogColor?: RgbColor;
6487
+ /** The maximum distance from the camera at which fog stops being applied. */
6488
+ fogFar?: number;
6489
+ /** The minimum distance from the camera to start applying fog. */
6490
+ fogNear?: number;
6428
6491
  /** The map of the world. */
6429
6492
  map?: WorldMap;
6430
6493
  /** The name of the world. */