hytopia 0.6.27 → 0.6.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.6.27",
3
+ "version": "0.6.28",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./node-server.mjs",
package/server.api.json CHANGED
@@ -47243,6 +47243,101 @@
47243
47243
  "isProtected": false,
47244
47244
  "isAbstract": false
47245
47245
  },
47246
+ {
47247
+ "kind": "Property",
47248
+ "canonicalReference": "server!World#fogColor:member",
47249
+ "docComment": "/**\n * The color of the fog, if not explicitly set, defaults to ambient light color.\n */\n",
47250
+ "excerptTokens": [
47251
+ {
47252
+ "kind": "Content",
47253
+ "text": "get fogColor(): "
47254
+ },
47255
+ {
47256
+ "kind": "Reference",
47257
+ "text": "RgbColor",
47258
+ "canonicalReference": "server!RgbColor:interface"
47259
+ },
47260
+ {
47261
+ "kind": "Content",
47262
+ "text": " | undefined"
47263
+ },
47264
+ {
47265
+ "kind": "Content",
47266
+ "text": ";"
47267
+ }
47268
+ ],
47269
+ "isReadonly": true,
47270
+ "isOptional": false,
47271
+ "releaseTag": "Public",
47272
+ "name": "fogColor",
47273
+ "propertyTypeTokenRange": {
47274
+ "startIndex": 1,
47275
+ "endIndex": 3
47276
+ },
47277
+ "isStatic": false,
47278
+ "isProtected": false,
47279
+ "isAbstract": false
47280
+ },
47281
+ {
47282
+ "kind": "Property",
47283
+ "canonicalReference": "server!World#fogFar:member",
47284
+ "docComment": "/**\n * The maximum distance from the camera at which fog stops being applied.\n */\n",
47285
+ "excerptTokens": [
47286
+ {
47287
+ "kind": "Content",
47288
+ "text": "get fogFar(): "
47289
+ },
47290
+ {
47291
+ "kind": "Content",
47292
+ "text": "number"
47293
+ },
47294
+ {
47295
+ "kind": "Content",
47296
+ "text": ";"
47297
+ }
47298
+ ],
47299
+ "isReadonly": true,
47300
+ "isOptional": false,
47301
+ "releaseTag": "Public",
47302
+ "name": "fogFar",
47303
+ "propertyTypeTokenRange": {
47304
+ "startIndex": 1,
47305
+ "endIndex": 2
47306
+ },
47307
+ "isStatic": false,
47308
+ "isProtected": false,
47309
+ "isAbstract": false
47310
+ },
47311
+ {
47312
+ "kind": "Property",
47313
+ "canonicalReference": "server!World#fogNear:member",
47314
+ "docComment": "/**\n * The minimum distance from the camera to start applying fog.\n */\n",
47315
+ "excerptTokens": [
47316
+ {
47317
+ "kind": "Content",
47318
+ "text": "get fogNear(): "
47319
+ },
47320
+ {
47321
+ "kind": "Content",
47322
+ "text": "number"
47323
+ },
47324
+ {
47325
+ "kind": "Content",
47326
+ "text": ";"
47327
+ }
47328
+ ],
47329
+ "isReadonly": true,
47330
+ "isOptional": false,
47331
+ "releaseTag": "Public",
47332
+ "name": "fogNear",
47333
+ "propertyTypeTokenRange": {
47334
+ "startIndex": 1,
47335
+ "endIndex": 2
47336
+ },
47337
+ "isStatic": false,
47338
+ "isProtected": false,
47339
+ "isAbstract": false
47340
+ },
47246
47341
  {
47247
47342
  "kind": "Property",
47248
47343
  "canonicalReference": "server!World#id:member",
@@ -47688,6 +47783,155 @@
47688
47783
  "isAbstract": false,
47689
47784
  "name": "setDirectionalLightPosition"
47690
47785
  },
47786
+ {
47787
+ "kind": "Method",
47788
+ "canonicalReference": "server!World#setFogColor:member(1)",
47789
+ "docComment": "/**\n * Sets the color of the world's fog.\n *\n * @param color - The color of the fog, or undefined to reset to ambient light color.\n */\n",
47790
+ "excerptTokens": [
47791
+ {
47792
+ "kind": "Content",
47793
+ "text": "setFogColor(color: "
47794
+ },
47795
+ {
47796
+ "kind": "Reference",
47797
+ "text": "RgbColor",
47798
+ "canonicalReference": "server!RgbColor:interface"
47799
+ },
47800
+ {
47801
+ "kind": "Content",
47802
+ "text": " | undefined"
47803
+ },
47804
+ {
47805
+ "kind": "Content",
47806
+ "text": "): "
47807
+ },
47808
+ {
47809
+ "kind": "Content",
47810
+ "text": "void"
47811
+ },
47812
+ {
47813
+ "kind": "Content",
47814
+ "text": ";"
47815
+ }
47816
+ ],
47817
+ "isStatic": false,
47818
+ "returnTypeTokenRange": {
47819
+ "startIndex": 4,
47820
+ "endIndex": 5
47821
+ },
47822
+ "releaseTag": "Public",
47823
+ "isProtected": false,
47824
+ "overloadIndex": 1,
47825
+ "parameters": [
47826
+ {
47827
+ "parameterName": "color",
47828
+ "parameterTypeTokenRange": {
47829
+ "startIndex": 1,
47830
+ "endIndex": 3
47831
+ },
47832
+ "isOptional": false
47833
+ }
47834
+ ],
47835
+ "isOptional": false,
47836
+ "isAbstract": false,
47837
+ "name": "setFogColor"
47838
+ },
47839
+ {
47840
+ "kind": "Method",
47841
+ "canonicalReference": "server!World#setFogFar:member(1)",
47842
+ "docComment": "/**\n * Sets the maximum distance from the camera at which fog stops being applied.\n *\n * @param far - The far distance.\n */\n",
47843
+ "excerptTokens": [
47844
+ {
47845
+ "kind": "Content",
47846
+ "text": "setFogFar(far: "
47847
+ },
47848
+ {
47849
+ "kind": "Content",
47850
+ "text": "number"
47851
+ },
47852
+ {
47853
+ "kind": "Content",
47854
+ "text": "): "
47855
+ },
47856
+ {
47857
+ "kind": "Content",
47858
+ "text": "void"
47859
+ },
47860
+ {
47861
+ "kind": "Content",
47862
+ "text": ";"
47863
+ }
47864
+ ],
47865
+ "isStatic": false,
47866
+ "returnTypeTokenRange": {
47867
+ "startIndex": 3,
47868
+ "endIndex": 4
47869
+ },
47870
+ "releaseTag": "Public",
47871
+ "isProtected": false,
47872
+ "overloadIndex": 1,
47873
+ "parameters": [
47874
+ {
47875
+ "parameterName": "far",
47876
+ "parameterTypeTokenRange": {
47877
+ "startIndex": 1,
47878
+ "endIndex": 2
47879
+ },
47880
+ "isOptional": false
47881
+ }
47882
+ ],
47883
+ "isOptional": false,
47884
+ "isAbstract": false,
47885
+ "name": "setFogFar"
47886
+ },
47887
+ {
47888
+ "kind": "Method",
47889
+ "canonicalReference": "server!World#setFogNear:member(1)",
47890
+ "docComment": "/**\n * Sets the minimum distance from the camera to start applying fog.\n *\n * @param near - The near distance.\n */\n",
47891
+ "excerptTokens": [
47892
+ {
47893
+ "kind": "Content",
47894
+ "text": "setFogNear(near: "
47895
+ },
47896
+ {
47897
+ "kind": "Content",
47898
+ "text": "number"
47899
+ },
47900
+ {
47901
+ "kind": "Content",
47902
+ "text": "): "
47903
+ },
47904
+ {
47905
+ "kind": "Content",
47906
+ "text": "void"
47907
+ },
47908
+ {
47909
+ "kind": "Content",
47910
+ "text": ";"
47911
+ }
47912
+ ],
47913
+ "isStatic": false,
47914
+ "returnTypeTokenRange": {
47915
+ "startIndex": 3,
47916
+ "endIndex": 4
47917
+ },
47918
+ "releaseTag": "Public",
47919
+ "isProtected": false,
47920
+ "overloadIndex": 1,
47921
+ "parameters": [
47922
+ {
47923
+ "parameterName": "near",
47924
+ "parameterTypeTokenRange": {
47925
+ "startIndex": 1,
47926
+ "endIndex": 2
47927
+ },
47928
+ "isOptional": false
47929
+ }
47930
+ ],
47931
+ "isOptional": false,
47932
+ "isAbstract": false,
47933
+ "name": "setFogNear"
47934
+ },
47691
47935
  {
47692
47936
  "kind": "Method",
47693
47937
  "canonicalReference": "server!World#setSkyboxIntensity:member(1)",
@@ -48051,6 +48295,69 @@
48051
48295
  "releaseTag": "Public",
48052
48296
  "name": "SET_DIRECTIONAL_LIGHT_POSITION"
48053
48297
  },
48298
+ {
48299
+ "kind": "EnumMember",
48300
+ "canonicalReference": "server!WorldEvent.SET_FOG_COLOR:member",
48301
+ "docComment": "",
48302
+ "excerptTokens": [
48303
+ {
48304
+ "kind": "Content",
48305
+ "text": "SET_FOG_COLOR = "
48306
+ },
48307
+ {
48308
+ "kind": "Content",
48309
+ "text": "\"WORLD.SET_FOG_COLOR\""
48310
+ }
48311
+ ],
48312
+ "initializerTokenRange": {
48313
+ "startIndex": 1,
48314
+ "endIndex": 2
48315
+ },
48316
+ "releaseTag": "Public",
48317
+ "name": "SET_FOG_COLOR"
48318
+ },
48319
+ {
48320
+ "kind": "EnumMember",
48321
+ "canonicalReference": "server!WorldEvent.SET_FOG_FAR:member",
48322
+ "docComment": "",
48323
+ "excerptTokens": [
48324
+ {
48325
+ "kind": "Content",
48326
+ "text": "SET_FOG_FAR = "
48327
+ },
48328
+ {
48329
+ "kind": "Content",
48330
+ "text": "\"WORLD.SET_FOG_FAR\""
48331
+ }
48332
+ ],
48333
+ "initializerTokenRange": {
48334
+ "startIndex": 1,
48335
+ "endIndex": 2
48336
+ },
48337
+ "releaseTag": "Public",
48338
+ "name": "SET_FOG_FAR"
48339
+ },
48340
+ {
48341
+ "kind": "EnumMember",
48342
+ "canonicalReference": "server!WorldEvent.SET_FOG_NEAR:member",
48343
+ "docComment": "",
48344
+ "excerptTokens": [
48345
+ {
48346
+ "kind": "Content",
48347
+ "text": "SET_FOG_NEAR = "
48348
+ },
48349
+ {
48350
+ "kind": "Content",
48351
+ "text": "\"WORLD.SET_FOG_NEAR\""
48352
+ }
48353
+ ],
48354
+ "initializerTokenRange": {
48355
+ "startIndex": 1,
48356
+ "endIndex": 2
48357
+ },
48358
+ "releaseTag": "Public",
48359
+ "name": "SET_FOG_NEAR"
48360
+ },
48054
48361
  {
48055
48362
  "kind": "EnumMember",
48056
48363
  "canonicalReference": "server!WorldEvent.SET_SKYBOX_INTENSITY:member",
@@ -48383,6 +48690,150 @@
48383
48690
  "endIndex": 8
48384
48691
  }
48385
48692
  },
48693
+ {
48694
+ "kind": "PropertySignature",
48695
+ "canonicalReference": "server!WorldEventPayloads#\"WORLD.SET_FOG_COLOR\":member",
48696
+ "docComment": "/**\n * Emitted when the color of the world's fog is set.\n */\n",
48697
+ "excerptTokens": [
48698
+ {
48699
+ "kind": "Content",
48700
+ "text": "["
48701
+ },
48702
+ {
48703
+ "kind": "Reference",
48704
+ "text": "WorldEvent.SET_FOG_COLOR",
48705
+ "canonicalReference": "server!WorldEvent.SET_FOG_COLOR:member"
48706
+ },
48707
+ {
48708
+ "kind": "Content",
48709
+ "text": "]: "
48710
+ },
48711
+ {
48712
+ "kind": "Content",
48713
+ "text": "{\n world: "
48714
+ },
48715
+ {
48716
+ "kind": "Reference",
48717
+ "text": "World",
48718
+ "canonicalReference": "server!World:class"
48719
+ },
48720
+ {
48721
+ "kind": "Content",
48722
+ "text": ";\n color: "
48723
+ },
48724
+ {
48725
+ "kind": "Reference",
48726
+ "text": "RgbColor",
48727
+ "canonicalReference": "server!RgbColor:interface"
48728
+ },
48729
+ {
48730
+ "kind": "Content",
48731
+ "text": ";\n }"
48732
+ },
48733
+ {
48734
+ "kind": "Content",
48735
+ "text": ";"
48736
+ }
48737
+ ],
48738
+ "isReadonly": false,
48739
+ "isOptional": false,
48740
+ "releaseTag": "Public",
48741
+ "name": "\"WORLD.SET_FOG_COLOR\"",
48742
+ "propertyTypeTokenRange": {
48743
+ "startIndex": 3,
48744
+ "endIndex": 8
48745
+ }
48746
+ },
48747
+ {
48748
+ "kind": "PropertySignature",
48749
+ "canonicalReference": "server!WorldEventPayloads#\"WORLD.SET_FOG_FAR\":member",
48750
+ "docComment": "/**\n * Emitted when the density of the world's fog is set.\n */\n",
48751
+ "excerptTokens": [
48752
+ {
48753
+ "kind": "Content",
48754
+ "text": "["
48755
+ },
48756
+ {
48757
+ "kind": "Reference",
48758
+ "text": "WorldEvent.SET_FOG_FAR",
48759
+ "canonicalReference": "server!WorldEvent.SET_FOG_FAR:member"
48760
+ },
48761
+ {
48762
+ "kind": "Content",
48763
+ "text": "]: "
48764
+ },
48765
+ {
48766
+ "kind": "Content",
48767
+ "text": "{\n world: "
48768
+ },
48769
+ {
48770
+ "kind": "Reference",
48771
+ "text": "World",
48772
+ "canonicalReference": "server!World:class"
48773
+ },
48774
+ {
48775
+ "kind": "Content",
48776
+ "text": ";\n far: number;\n }"
48777
+ },
48778
+ {
48779
+ "kind": "Content",
48780
+ "text": ";"
48781
+ }
48782
+ ],
48783
+ "isReadonly": false,
48784
+ "isOptional": false,
48785
+ "releaseTag": "Public",
48786
+ "name": "\"WORLD.SET_FOG_FAR\"",
48787
+ "propertyTypeTokenRange": {
48788
+ "startIndex": 3,
48789
+ "endIndex": 6
48790
+ }
48791
+ },
48792
+ {
48793
+ "kind": "PropertySignature",
48794
+ "canonicalReference": "server!WorldEventPayloads#\"WORLD.SET_FOG_NEAR\":member",
48795
+ "docComment": "/**\n * Emitted when the density of the world's fog is set.\n */\n",
48796
+ "excerptTokens": [
48797
+ {
48798
+ "kind": "Content",
48799
+ "text": "["
48800
+ },
48801
+ {
48802
+ "kind": "Reference",
48803
+ "text": "WorldEvent.SET_FOG_NEAR",
48804
+ "canonicalReference": "server!WorldEvent.SET_FOG_NEAR:member"
48805
+ },
48806
+ {
48807
+ "kind": "Content",
48808
+ "text": "]: "
48809
+ },
48810
+ {
48811
+ "kind": "Content",
48812
+ "text": "{\n world: "
48813
+ },
48814
+ {
48815
+ "kind": "Reference",
48816
+ "text": "World",
48817
+ "canonicalReference": "server!World:class"
48818
+ },
48819
+ {
48820
+ "kind": "Content",
48821
+ "text": ";\n near: number;\n }"
48822
+ },
48823
+ {
48824
+ "kind": "Content",
48825
+ "text": ";"
48826
+ }
48827
+ ],
48828
+ "isReadonly": false,
48829
+ "isOptional": false,
48830
+ "releaseTag": "Public",
48831
+ "name": "\"WORLD.SET_FOG_NEAR\"",
48832
+ "propertyTypeTokenRange": {
48833
+ "startIndex": 3,
48834
+ "endIndex": 6
48835
+ }
48836
+ },
48386
48837
  {
48387
48838
  "kind": "PropertySignature",
48388
48839
  "canonicalReference": "server!WorldEventPayloads#\"WORLD.SET_SKYBOX_INTENSITY\":member",
@@ -49817,6 +50268,88 @@
49817
50268
  "endIndex": 2
49818
50269
  }
49819
50270
  },
50271
+ {
50272
+ "kind": "PropertySignature",
50273
+ "canonicalReference": "server!WorldOptions#fogColor:member",
50274
+ "docComment": "/**\n * The color of the fog for the world. Defaults to ambient light color.\n */\n",
50275
+ "excerptTokens": [
50276
+ {
50277
+ "kind": "Content",
50278
+ "text": "fogColor?: "
50279
+ },
50280
+ {
50281
+ "kind": "Reference",
50282
+ "text": "RgbColor",
50283
+ "canonicalReference": "server!RgbColor:interface"
50284
+ },
50285
+ {
50286
+ "kind": "Content",
50287
+ "text": ";"
50288
+ }
50289
+ ],
50290
+ "isReadonly": false,
50291
+ "isOptional": true,
50292
+ "releaseTag": "Public",
50293
+ "name": "fogColor",
50294
+ "propertyTypeTokenRange": {
50295
+ "startIndex": 1,
50296
+ "endIndex": 2
50297
+ }
50298
+ },
50299
+ {
50300
+ "kind": "PropertySignature",
50301
+ "canonicalReference": "server!WorldOptions#fogFar:member",
50302
+ "docComment": "/**\n * The maximum distance from the camera at which fog stops being applied.\n */\n",
50303
+ "excerptTokens": [
50304
+ {
50305
+ "kind": "Content",
50306
+ "text": "fogFar?: "
50307
+ },
50308
+ {
50309
+ "kind": "Content",
50310
+ "text": "number"
50311
+ },
50312
+ {
50313
+ "kind": "Content",
50314
+ "text": ";"
50315
+ }
50316
+ ],
50317
+ "isReadonly": false,
50318
+ "isOptional": true,
50319
+ "releaseTag": "Public",
50320
+ "name": "fogFar",
50321
+ "propertyTypeTokenRange": {
50322
+ "startIndex": 1,
50323
+ "endIndex": 2
50324
+ }
50325
+ },
50326
+ {
50327
+ "kind": "PropertySignature",
50328
+ "canonicalReference": "server!WorldOptions#fogNear:member",
50329
+ "docComment": "/**\n * The minimum distance from the camera to start applying fog.\n */\n",
50330
+ "excerptTokens": [
50331
+ {
50332
+ "kind": "Content",
50333
+ "text": "fogNear?: "
50334
+ },
50335
+ {
50336
+ "kind": "Content",
50337
+ "text": "number"
50338
+ },
50339
+ {
50340
+ "kind": "Content",
50341
+ "text": ";"
50342
+ }
50343
+ ],
50344
+ "isReadonly": false,
50345
+ "isOptional": true,
50346
+ "releaseTag": "Public",
50347
+ "name": "fogNear",
50348
+ "propertyTypeTokenRange": {
50349
+ "startIndex": 1,
50350
+ "endIndex": 2
50351
+ }
50352
+ },
49820
50353
  {
49821
50354
  "kind": "PropertySignature",
49822
50355
  "canonicalReference": "server!WorldOptions#gravity:member",
package/server.d.ts CHANGED
@@ -6078,6 +6078,9 @@ export declare class World extends EventRouter implements protocol.Serializable
6078
6078
 
6079
6079
 
6080
6080
 
6081
+
6082
+
6083
+
6081
6084
 
6082
6085
 
6083
6086
 
@@ -6097,6 +6100,12 @@ export declare class World extends EventRouter implements protocol.Serializable
6097
6100
  get directionalLightIntensity(): number;
6098
6101
  /** The position the directional light originates from. */
6099
6102
  get directionalLightPosition(): Vector3Like;
6103
+ /** The color of the fog, if not explicitly set, defaults to ambient light color. */
6104
+ get fogColor(): RgbColor | undefined;
6105
+ /** The maximum distance from the camera at which fog stops being applied. */
6106
+ get fogFar(): number;
6107
+ /** The minimum distance from the camera to start applying fog. */
6108
+ get fogNear(): number;
6100
6109
  /** The name of the world. */
6101
6110
  get name(): string;
6102
6111
  /** The intensity of the world's skybox brightness. */
@@ -6154,6 +6163,21 @@ export declare class World extends EventRouter implements protocol.Serializable
6154
6163
  * @param position - The position in the world.
6155
6164
  */
6156
6165
  setDirectionalLightPosition(position: Vector3Like): void;
6166
+ /**
6167
+ * Sets the color of the world's fog.
6168
+ * @param color - The color of the fog, or undefined to reset to ambient light color.
6169
+ */
6170
+ setFogColor(color: RgbColor | undefined): void;
6171
+ /**
6172
+ * Sets the maximum distance from the camera at which fog stops being applied.
6173
+ * @param far - The far distance.
6174
+ */
6175
+ setFogFar(far: number): void;
6176
+ /**
6177
+ * Sets the minimum distance from the camera to start applying fog.
6178
+ * @param near - The near distance.
6179
+ */
6180
+ setFogNear(near: number): void;
6157
6181
  /**
6158
6182
  * Sets the intensity of the world's skybox brightness.
6159
6183
  * @param intensity - The intensity.
@@ -6177,6 +6201,9 @@ export declare enum WorldEvent {
6177
6201
  SET_DIRECTIONAL_LIGHT_COLOR = "WORLD.SET_DIRECTIONAL_LIGHT_COLOR",
6178
6202
  SET_DIRECTIONAL_LIGHT_INTENSITY = "WORLD.SET_DIRECTIONAL_LIGHT_INTENSITY",
6179
6203
  SET_DIRECTIONAL_LIGHT_POSITION = "WORLD.SET_DIRECTIONAL_LIGHT_POSITION",
6204
+ SET_FOG_COLOR = "WORLD.SET_FOG_COLOR",
6205
+ SET_FOG_FAR = "WORLD.SET_FOG_FAR",
6206
+ SET_FOG_NEAR = "WORLD.SET_FOG_NEAR",
6180
6207
  SET_SKYBOX_INTENSITY = "WORLD.SET_SKYBOX_INTENSITY",
6181
6208
  START = "WORLD.START",
6182
6209
  STOP = "WORLD.STOP"
@@ -6209,6 +6236,21 @@ export declare interface WorldEventPayloads {
6209
6236
  world: World;
6210
6237
  position: Vector3Like;
6211
6238
  };
6239
+ /** Emitted when the color of the world's fog is set. */
6240
+ [WorldEvent.SET_FOG_COLOR]: {
6241
+ world: World;
6242
+ color: RgbColor;
6243
+ };
6244
+ /** Emitted when the density of the world's fog is set. */
6245
+ [WorldEvent.SET_FOG_FAR]: {
6246
+ world: World;
6247
+ far: number;
6248
+ };
6249
+ /** Emitted when the density of the world's fog is set. */
6250
+ [WorldEvent.SET_FOG_NEAR]: {
6251
+ world: World;
6252
+ near: number;
6253
+ };
6212
6254
  /** Emitted when the intensity of the world's skybox brightness is set. */
6213
6255
  [WorldEvent.SET_SKYBOX_INTENSITY]: {
6214
6256
  world: World;
@@ -6425,6 +6467,12 @@ export declare interface WorldOptions {
6425
6467
  directionalLightIntensity?: number;
6426
6468
  /** The position the directional light originates from for the world. */
6427
6469
  directionalLightPosition?: Vector3Like;
6470
+ /** The color of the fog for the world. Defaults to ambient light color. */
6471
+ fogColor?: RgbColor;
6472
+ /** The maximum distance from the camera at which fog stops being applied. */
6473
+ fogFar?: number;
6474
+ /** The minimum distance from the camera to start applying fog. */
6475
+ fogNear?: number;
6428
6476
  /** The map of the world. */
6429
6477
  map?: WorldMap;
6430
6478
  /** The name of the world. */