hytopia 0.1.68 → 0.1.69

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.1.68",
3
+ "version": "0.1.69",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "main": "server.js",
6
6
  "bin": {
package/server.api.json CHANGED
@@ -27819,6 +27819,67 @@
27819
27819
  }
27820
27820
  ]
27821
27821
  },
27822
+ {
27823
+ "kind": "Property",
27824
+ "canonicalReference": "server!World#ambientLightColor:member",
27825
+ "docComment": "/**\n * The color of the ambient light.\n */\n",
27826
+ "excerptTokens": [
27827
+ {
27828
+ "kind": "Content",
27829
+ "text": "get ambientLightColor(): "
27830
+ },
27831
+ {
27832
+ "kind": "Reference",
27833
+ "text": "RgbColor",
27834
+ "canonicalReference": "server!RgbColor:interface"
27835
+ },
27836
+ {
27837
+ "kind": "Content",
27838
+ "text": ";"
27839
+ }
27840
+ ],
27841
+ "isReadonly": true,
27842
+ "isOptional": false,
27843
+ "releaseTag": "Public",
27844
+ "name": "ambientLightColor",
27845
+ "propertyTypeTokenRange": {
27846
+ "startIndex": 1,
27847
+ "endIndex": 2
27848
+ },
27849
+ "isStatic": false,
27850
+ "isProtected": false,
27851
+ "isAbstract": false
27852
+ },
27853
+ {
27854
+ "kind": "Property",
27855
+ "canonicalReference": "server!World#ambientLightIntensity:member",
27856
+ "docComment": "/**\n * The intensity of the ambient light.\n */\n",
27857
+ "excerptTokens": [
27858
+ {
27859
+ "kind": "Content",
27860
+ "text": "get ambientLightIntensity(): "
27861
+ },
27862
+ {
27863
+ "kind": "Content",
27864
+ "text": "number"
27865
+ },
27866
+ {
27867
+ "kind": "Content",
27868
+ "text": ";"
27869
+ }
27870
+ ],
27871
+ "isReadonly": true,
27872
+ "isOptional": false,
27873
+ "releaseTag": "Public",
27874
+ "name": "ambientLightIntensity",
27875
+ "propertyTypeTokenRange": {
27876
+ "startIndex": 1,
27877
+ "endIndex": 2
27878
+ },
27879
+ "isStatic": false,
27880
+ "isProtected": false,
27881
+ "isAbstract": false
27882
+ },
27822
27883
  {
27823
27884
  "kind": "Property",
27824
27885
  "canonicalReference": "server!World#audioManager:member",
@@ -27943,6 +28004,98 @@
27943
28004
  "isProtected": false,
27944
28005
  "isAbstract": false
27945
28006
  },
28007
+ {
28008
+ "kind": "Property",
28009
+ "canonicalReference": "server!World#directionalLightColor:member",
28010
+ "docComment": "/**\n * The color of the directional light.\n */\n",
28011
+ "excerptTokens": [
28012
+ {
28013
+ "kind": "Content",
28014
+ "text": "get directionalLightColor(): "
28015
+ },
28016
+ {
28017
+ "kind": "Reference",
28018
+ "text": "RgbColor",
28019
+ "canonicalReference": "server!RgbColor:interface"
28020
+ },
28021
+ {
28022
+ "kind": "Content",
28023
+ "text": ";"
28024
+ }
28025
+ ],
28026
+ "isReadonly": true,
28027
+ "isOptional": false,
28028
+ "releaseTag": "Public",
28029
+ "name": "directionalLightColor",
28030
+ "propertyTypeTokenRange": {
28031
+ "startIndex": 1,
28032
+ "endIndex": 2
28033
+ },
28034
+ "isStatic": false,
28035
+ "isProtected": false,
28036
+ "isAbstract": false
28037
+ },
28038
+ {
28039
+ "kind": "Property",
28040
+ "canonicalReference": "server!World#directionalLightIntensity:member",
28041
+ "docComment": "/**\n * The intensity of the directional light.\n */\n",
28042
+ "excerptTokens": [
28043
+ {
28044
+ "kind": "Content",
28045
+ "text": "get directionalLightIntensity(): "
28046
+ },
28047
+ {
28048
+ "kind": "Content",
28049
+ "text": "number"
28050
+ },
28051
+ {
28052
+ "kind": "Content",
28053
+ "text": ";"
28054
+ }
28055
+ ],
28056
+ "isReadonly": true,
28057
+ "isOptional": false,
28058
+ "releaseTag": "Public",
28059
+ "name": "directionalLightIntensity",
28060
+ "propertyTypeTokenRange": {
28061
+ "startIndex": 1,
28062
+ "endIndex": 2
28063
+ },
28064
+ "isStatic": false,
28065
+ "isProtected": false,
28066
+ "isAbstract": false
28067
+ },
28068
+ {
28069
+ "kind": "Property",
28070
+ "canonicalReference": "server!World#directionalLightPosition:member",
28071
+ "docComment": "/**\n * The position the directional light originates from.\n */\n",
28072
+ "excerptTokens": [
28073
+ {
28074
+ "kind": "Content",
28075
+ "text": "get directionalLightPosition(): "
28076
+ },
28077
+ {
28078
+ "kind": "Reference",
28079
+ "text": "Vector3Like",
28080
+ "canonicalReference": "server!Vector3Like:interface"
28081
+ },
28082
+ {
28083
+ "kind": "Content",
28084
+ "text": ";"
28085
+ }
28086
+ ],
28087
+ "isReadonly": true,
28088
+ "isOptional": false,
28089
+ "releaseTag": "Public",
28090
+ "name": "directionalLightPosition",
28091
+ "propertyTypeTokenRange": {
28092
+ "startIndex": 1,
28093
+ "endIndex": 2
28094
+ },
28095
+ "isStatic": false,
28096
+ "isProtected": false,
28097
+ "isAbstract": false
28098
+ },
27946
28099
  {
27947
28100
  "kind": "Property",
27948
28101
  "canonicalReference": "server!World#entityManager:member",
@@ -28254,6 +28407,249 @@
28254
28407
  "isProtected": false,
28255
28408
  "isAbstract": false
28256
28409
  },
28410
+ {
28411
+ "kind": "Method",
28412
+ "canonicalReference": "server!World#setAmbientLightColor:member(1)",
28413
+ "docComment": "/**\n * Sets the color of the ambient light.\n *\n * @param color - The color of the light.\n */\n",
28414
+ "excerptTokens": [
28415
+ {
28416
+ "kind": "Content",
28417
+ "text": "setAmbientLightColor(color: "
28418
+ },
28419
+ {
28420
+ "kind": "Reference",
28421
+ "text": "RgbColor",
28422
+ "canonicalReference": "server!RgbColor:interface"
28423
+ },
28424
+ {
28425
+ "kind": "Content",
28426
+ "text": "): "
28427
+ },
28428
+ {
28429
+ "kind": "Content",
28430
+ "text": "void"
28431
+ },
28432
+ {
28433
+ "kind": "Content",
28434
+ "text": ";"
28435
+ }
28436
+ ],
28437
+ "isStatic": false,
28438
+ "returnTypeTokenRange": {
28439
+ "startIndex": 3,
28440
+ "endIndex": 4
28441
+ },
28442
+ "releaseTag": "Public",
28443
+ "isProtected": false,
28444
+ "overloadIndex": 1,
28445
+ "parameters": [
28446
+ {
28447
+ "parameterName": "color",
28448
+ "parameterTypeTokenRange": {
28449
+ "startIndex": 1,
28450
+ "endIndex": 2
28451
+ },
28452
+ "isOptional": false
28453
+ }
28454
+ ],
28455
+ "isOptional": false,
28456
+ "isAbstract": false,
28457
+ "name": "setAmbientLightColor"
28458
+ },
28459
+ {
28460
+ "kind": "Method",
28461
+ "canonicalReference": "server!World#setAmbientLightIntensity:member(1)",
28462
+ "docComment": "/**\n * Sets the intensity of the ambient light.\n *\n * @param intensity - The intensity.\n */\n",
28463
+ "excerptTokens": [
28464
+ {
28465
+ "kind": "Content",
28466
+ "text": "setAmbientLightIntensity(intensity: "
28467
+ },
28468
+ {
28469
+ "kind": "Content",
28470
+ "text": "number"
28471
+ },
28472
+ {
28473
+ "kind": "Content",
28474
+ "text": "): "
28475
+ },
28476
+ {
28477
+ "kind": "Content",
28478
+ "text": "void"
28479
+ },
28480
+ {
28481
+ "kind": "Content",
28482
+ "text": ";"
28483
+ }
28484
+ ],
28485
+ "isStatic": false,
28486
+ "returnTypeTokenRange": {
28487
+ "startIndex": 3,
28488
+ "endIndex": 4
28489
+ },
28490
+ "releaseTag": "Public",
28491
+ "isProtected": false,
28492
+ "overloadIndex": 1,
28493
+ "parameters": [
28494
+ {
28495
+ "parameterName": "intensity",
28496
+ "parameterTypeTokenRange": {
28497
+ "startIndex": 1,
28498
+ "endIndex": 2
28499
+ },
28500
+ "isOptional": false
28501
+ }
28502
+ ],
28503
+ "isOptional": false,
28504
+ "isAbstract": false,
28505
+ "name": "setAmbientLightIntensity"
28506
+ },
28507
+ {
28508
+ "kind": "Method",
28509
+ "canonicalReference": "server!World#setDirectionalLightColor:member(1)",
28510
+ "docComment": "/**\n * Sets the color of the directional light.\n *\n * @param color - The color of the light.\n */\n",
28511
+ "excerptTokens": [
28512
+ {
28513
+ "kind": "Content",
28514
+ "text": "setDirectionalLightColor(color: "
28515
+ },
28516
+ {
28517
+ "kind": "Reference",
28518
+ "text": "RgbColor",
28519
+ "canonicalReference": "server!RgbColor:interface"
28520
+ },
28521
+ {
28522
+ "kind": "Content",
28523
+ "text": "): "
28524
+ },
28525
+ {
28526
+ "kind": "Content",
28527
+ "text": "void"
28528
+ },
28529
+ {
28530
+ "kind": "Content",
28531
+ "text": ";"
28532
+ }
28533
+ ],
28534
+ "isStatic": false,
28535
+ "returnTypeTokenRange": {
28536
+ "startIndex": 3,
28537
+ "endIndex": 4
28538
+ },
28539
+ "releaseTag": "Public",
28540
+ "isProtected": false,
28541
+ "overloadIndex": 1,
28542
+ "parameters": [
28543
+ {
28544
+ "parameterName": "color",
28545
+ "parameterTypeTokenRange": {
28546
+ "startIndex": 1,
28547
+ "endIndex": 2
28548
+ },
28549
+ "isOptional": false
28550
+ }
28551
+ ],
28552
+ "isOptional": false,
28553
+ "isAbstract": false,
28554
+ "name": "setDirectionalLightColor"
28555
+ },
28556
+ {
28557
+ "kind": "Method",
28558
+ "canonicalReference": "server!World#setDirectionalLightIntensity:member(1)",
28559
+ "docComment": "/**\n * Sets the intensity of the directional light.\n *\n * @param intensity - The intensity.\n */\n",
28560
+ "excerptTokens": [
28561
+ {
28562
+ "kind": "Content",
28563
+ "text": "setDirectionalLightIntensity(intensity: "
28564
+ },
28565
+ {
28566
+ "kind": "Content",
28567
+ "text": "number"
28568
+ },
28569
+ {
28570
+ "kind": "Content",
28571
+ "text": "): "
28572
+ },
28573
+ {
28574
+ "kind": "Content",
28575
+ "text": "void"
28576
+ },
28577
+ {
28578
+ "kind": "Content",
28579
+ "text": ";"
28580
+ }
28581
+ ],
28582
+ "isStatic": false,
28583
+ "returnTypeTokenRange": {
28584
+ "startIndex": 3,
28585
+ "endIndex": 4
28586
+ },
28587
+ "releaseTag": "Public",
28588
+ "isProtected": false,
28589
+ "overloadIndex": 1,
28590
+ "parameters": [
28591
+ {
28592
+ "parameterName": "intensity",
28593
+ "parameterTypeTokenRange": {
28594
+ "startIndex": 1,
28595
+ "endIndex": 2
28596
+ },
28597
+ "isOptional": false
28598
+ }
28599
+ ],
28600
+ "isOptional": false,
28601
+ "isAbstract": false,
28602
+ "name": "setDirectionalLightIntensity"
28603
+ },
28604
+ {
28605
+ "kind": "Method",
28606
+ "canonicalReference": "server!World#setDirectionalLightPosition:member(1)",
28607
+ "docComment": "/**\n * Sets the position the directional light originates from.\n *\n * @param position - The position in the world.\n */\n",
28608
+ "excerptTokens": [
28609
+ {
28610
+ "kind": "Content",
28611
+ "text": "setDirectionalLightPosition(position: "
28612
+ },
28613
+ {
28614
+ "kind": "Reference",
28615
+ "text": "Vector3Like",
28616
+ "canonicalReference": "server!Vector3Like:interface"
28617
+ },
28618
+ {
28619
+ "kind": "Content",
28620
+ "text": "): "
28621
+ },
28622
+ {
28623
+ "kind": "Content",
28624
+ "text": "void"
28625
+ },
28626
+ {
28627
+ "kind": "Content",
28628
+ "text": ";"
28629
+ }
28630
+ ],
28631
+ "isStatic": false,
28632
+ "returnTypeTokenRange": {
28633
+ "startIndex": 3,
28634
+ "endIndex": 4
28635
+ },
28636
+ "releaseTag": "Public",
28637
+ "isProtected": false,
28638
+ "overloadIndex": 1,
28639
+ "parameters": [
28640
+ {
28641
+ "parameterName": "position",
28642
+ "parameterTypeTokenRange": {
28643
+ "startIndex": 1,
28644
+ "endIndex": 2
28645
+ },
28646
+ "isOptional": false
28647
+ }
28648
+ ],
28649
+ "isOptional": false,
28650
+ "isAbstract": false,
28651
+ "name": "setDirectionalLightPosition"
28652
+ },
28257
28653
  {
28258
28654
  "kind": "Property",
28259
28655
  "canonicalReference": "server!World#simulation:member",
@@ -29063,6 +29459,144 @@
29063
29459
  "name": "WorldOptions",
29064
29460
  "preserveMemberOrder": false,
29065
29461
  "members": [
29462
+ {
29463
+ "kind": "PropertySignature",
29464
+ "canonicalReference": "server!WorldOptions#ambientLightColor:member",
29465
+ "docComment": "/**\n * The color of the ambient light.\n */\n",
29466
+ "excerptTokens": [
29467
+ {
29468
+ "kind": "Content",
29469
+ "text": "ambientLightColor?: "
29470
+ },
29471
+ {
29472
+ "kind": "Reference",
29473
+ "text": "RgbColor",
29474
+ "canonicalReference": "server!RgbColor:interface"
29475
+ },
29476
+ {
29477
+ "kind": "Content",
29478
+ "text": ";"
29479
+ }
29480
+ ],
29481
+ "isReadonly": false,
29482
+ "isOptional": true,
29483
+ "releaseTag": "Public",
29484
+ "name": "ambientLightColor",
29485
+ "propertyTypeTokenRange": {
29486
+ "startIndex": 1,
29487
+ "endIndex": 2
29488
+ }
29489
+ },
29490
+ {
29491
+ "kind": "PropertySignature",
29492
+ "canonicalReference": "server!WorldOptions#ambientLightIntensity:member",
29493
+ "docComment": "/**\n * The intensity of the ambient light. 0 to 1+\n */\n",
29494
+ "excerptTokens": [
29495
+ {
29496
+ "kind": "Content",
29497
+ "text": "ambientLightIntensity?: "
29498
+ },
29499
+ {
29500
+ "kind": "Content",
29501
+ "text": "number"
29502
+ },
29503
+ {
29504
+ "kind": "Content",
29505
+ "text": ";"
29506
+ }
29507
+ ],
29508
+ "isReadonly": false,
29509
+ "isOptional": true,
29510
+ "releaseTag": "Public",
29511
+ "name": "ambientLightIntensity",
29512
+ "propertyTypeTokenRange": {
29513
+ "startIndex": 1,
29514
+ "endIndex": 2
29515
+ }
29516
+ },
29517
+ {
29518
+ "kind": "PropertySignature",
29519
+ "canonicalReference": "server!WorldOptions#directionalLightColor:member",
29520
+ "docComment": "/**\n * The color of the directional light.\n */\n",
29521
+ "excerptTokens": [
29522
+ {
29523
+ "kind": "Content",
29524
+ "text": "directionalLightColor?: "
29525
+ },
29526
+ {
29527
+ "kind": "Reference",
29528
+ "text": "RgbColor",
29529
+ "canonicalReference": "server!RgbColor:interface"
29530
+ },
29531
+ {
29532
+ "kind": "Content",
29533
+ "text": ";"
29534
+ }
29535
+ ],
29536
+ "isReadonly": false,
29537
+ "isOptional": true,
29538
+ "releaseTag": "Public",
29539
+ "name": "directionalLightColor",
29540
+ "propertyTypeTokenRange": {
29541
+ "startIndex": 1,
29542
+ "endIndex": 2
29543
+ }
29544
+ },
29545
+ {
29546
+ "kind": "PropertySignature",
29547
+ "canonicalReference": "server!WorldOptions#directionalLightIntensity:member",
29548
+ "docComment": "/**\n * The intensity of the directional light. 0 to 1+\n */\n",
29549
+ "excerptTokens": [
29550
+ {
29551
+ "kind": "Content",
29552
+ "text": "directionalLightIntensity?: "
29553
+ },
29554
+ {
29555
+ "kind": "Content",
29556
+ "text": "number"
29557
+ },
29558
+ {
29559
+ "kind": "Content",
29560
+ "text": ";"
29561
+ }
29562
+ ],
29563
+ "isReadonly": false,
29564
+ "isOptional": true,
29565
+ "releaseTag": "Public",
29566
+ "name": "directionalLightIntensity",
29567
+ "propertyTypeTokenRange": {
29568
+ "startIndex": 1,
29569
+ "endIndex": 2
29570
+ }
29571
+ },
29572
+ {
29573
+ "kind": "PropertySignature",
29574
+ "canonicalReference": "server!WorldOptions#directionalLightPosition:member",
29575
+ "docComment": "/**\n * The position the directional light originates from.\n */\n",
29576
+ "excerptTokens": [
29577
+ {
29578
+ "kind": "Content",
29579
+ "text": "directionalLightPosition?: "
29580
+ },
29581
+ {
29582
+ "kind": "Reference",
29583
+ "text": "Vector3Like",
29584
+ "canonicalReference": "server!Vector3Like:interface"
29585
+ },
29586
+ {
29587
+ "kind": "Content",
29588
+ "text": ";"
29589
+ }
29590
+ ],
29591
+ "isReadonly": false,
29592
+ "isOptional": true,
29593
+ "releaseTag": "Public",
29594
+ "name": "directionalLightPosition",
29595
+ "propertyTypeTokenRange": {
29596
+ "startIndex": 1,
29597
+ "endIndex": 2
29598
+ }
29599
+ },
29066
29600
  {
29067
29601
  "kind": "PropertySignature",
29068
29602
  "canonicalReference": "server!WorldOptions#gravity:member",
package/server.d.ts CHANGED
@@ -3590,12 +3590,27 @@ export declare class World implements protocol.Serializable {
3590
3590
 
3591
3591
 
3592
3592
 
3593
+
3594
+
3595
+
3596
+
3597
+
3593
3598
  /**
3594
3599
  * @param options - The options for the world.
3595
3600
  */
3596
3601
  constructor(options: WorldOptions);
3597
3602
  /** The unique ID of the world. */
3598
3603
  get id(): number;
3604
+ /** The color of the ambient light. */
3605
+ get ambientLightColor(): RgbColor;
3606
+ /** The intensity of the ambient light. */
3607
+ get ambientLightIntensity(): number;
3608
+ /** The color of the directional light. */
3609
+ get directionalLightColor(): RgbColor;
3610
+ /** The intensity of the directional light. */
3611
+ get directionalLightIntensity(): number;
3612
+ /** The position the directional light originates from. */
3613
+ get directionalLightPosition(): Vector3Like;
3599
3614
  /** The name of the world. */
3600
3615
  get name(): string;
3601
3616
  /** The URI of the skybox cubemap for the world. */
@@ -3624,6 +3639,31 @@ export declare class World implements protocol.Serializable {
3624
3639
  * @param map - The map to load.
3625
3640
  */
3626
3641
  loadMap(map: WorldMap): void;
3642
+ /**
3643
+ * Sets the color of the ambient light.
3644
+ * @param color - The color of the light.
3645
+ */
3646
+ setAmbientLightColor(color: RgbColor): void;
3647
+ /**
3648
+ * Sets the intensity of the ambient light.
3649
+ * @param intensity - The intensity.
3650
+ */
3651
+ setAmbientLightIntensity(intensity: number): void;
3652
+ /**
3653
+ * Sets the color of the directional light.
3654
+ * @param color - The color of the light.
3655
+ */
3656
+ setDirectionalLightColor(color: RgbColor): void;
3657
+ /**
3658
+ * Sets the intensity of the directional light.
3659
+ * @param intensity - The intensity.
3660
+ */
3661
+ setDirectionalLightIntensity(intensity: number): void;
3662
+ /**
3663
+ * Sets the position the directional light originates from.
3664
+ * @param position - The position in the world.
3665
+ */
3666
+ setDirectionalLightPosition(position: Vector3Like): void;
3627
3667
  /**
3628
3668
  * Starts the world loop, which begins ticking physics, entities, etc.
3629
3669
  */
@@ -3721,6 +3761,16 @@ export declare interface WorldMap {
3721
3761
  export declare interface WorldOptions {
3722
3762
  /** The unique ID of the world. */
3723
3763
  id: number;
3764
+ /** The color of the ambient light. */
3765
+ ambientLightColor?: RgbColor;
3766
+ /** The intensity of the ambient light. 0 to 1+ */
3767
+ ambientLightIntensity?: number;
3768
+ /** The color of the directional light. */
3769
+ directionalLightColor?: RgbColor;
3770
+ /** The intensity of the directional light. 0 to 1+ */
3771
+ directionalLightIntensity?: number;
3772
+ /** The position the directional light originates from. */
3773
+ directionalLightPosition?: Vector3Like;
3724
3774
  /** The name of the world. */
3725
3775
  name: string;
3726
3776
  /** The URI of the skybox cubemap for the world. */