hytopia 0.6.11 → 0.6.13

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.11",
3
+ "version": "0.6.13",
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
@@ -4152,6 +4152,33 @@
4152
4152
  "endIndex": 2
4153
4153
  }
4154
4154
  },
4155
+ {
4156
+ "kind": "PropertySignature",
4157
+ "canonicalReference": "server!BaseEntityOptions#isEnvironmental:member",
4158
+ "docComment": "/**\n * Whether the entity is environmental, if true it will not invoke its tick function or change position. Defaults to false.\n */\n",
4159
+ "excerptTokens": [
4160
+ {
4161
+ "kind": "Content",
4162
+ "text": "isEnvironmental?: "
4163
+ },
4164
+ {
4165
+ "kind": "Content",
4166
+ "text": "boolean"
4167
+ },
4168
+ {
4169
+ "kind": "Content",
4170
+ "text": ";"
4171
+ }
4172
+ ],
4173
+ "isReadonly": false,
4174
+ "isOptional": true,
4175
+ "releaseTag": "Public",
4176
+ "name": "isEnvironmental",
4177
+ "propertyTypeTokenRange": {
4178
+ "startIndex": 1,
4179
+ "endIndex": 2
4180
+ }
4181
+ },
4155
4182
  {
4156
4183
  "kind": "PropertySignature",
4157
4184
  "canonicalReference": "server!BaseEntityOptions#name:member",
@@ -13528,6 +13555,36 @@
13528
13555
  "isProtected": false,
13529
13556
  "isAbstract": false
13530
13557
  },
13558
+ {
13559
+ "kind": "Property",
13560
+ "canonicalReference": "server!Entity#isEnvironmental:member",
13561
+ "docComment": "/**\n * Whether the entity is environmental, if true it will not invoke its tick function or change position.\n */\n",
13562
+ "excerptTokens": [
13563
+ {
13564
+ "kind": "Content",
13565
+ "text": "get isEnvironmental(): "
13566
+ },
13567
+ {
13568
+ "kind": "Content",
13569
+ "text": "boolean"
13570
+ },
13571
+ {
13572
+ "kind": "Content",
13573
+ "text": ";"
13574
+ }
13575
+ ],
13576
+ "isReadonly": true,
13577
+ "isOptional": false,
13578
+ "releaseTag": "Public",
13579
+ "name": "isEnvironmental",
13580
+ "propertyTypeTokenRange": {
13581
+ "startIndex": 1,
13582
+ "endIndex": 2
13583
+ },
13584
+ "isStatic": false,
13585
+ "isProtected": false,
13586
+ "isAbstract": false
13587
+ },
13531
13588
  {
13532
13589
  "kind": "Property",
13533
13590
  "canonicalReference": "server!Entity#isModelEntity:member",
@@ -19527,6 +19584,574 @@
19527
19584
  "endIndex": 6
19528
19585
  }
19529
19586
  },
19587
+ {
19588
+ "kind": "Class",
19589
+ "canonicalReference": "server!IterationMap:class",
19590
+ "docComment": "/**\n * A high-performance Map-like data structure optimized for frequent iteration.\n *\n * @remarks\n *\n * IterationMap maintains both a Map for O(1) lookups and an Array for fast iteration, eliminating the need for Array.from() calls and providing ~2x faster iteration than Map.values(). Optimized for \"build up, iterate, clear\" usage patterns common in game loops.\n *\n * @example\n * ```typescript\n * const iterationMap = new IterationMap<number, string>();\n * iterationMap.set(1, 'hello');\n * iterationMap.set(2, 'world');\n *\n * // Fast O(1) lookup\n * const value = iterationMap.get(1);\n *\n * // Fast array iteration (no Map.values() overhead)\n * for (const item of iterationMap.valuesArray) {\n * console.log(item);\n * }\n *\n * // Efficient bulk clear\n * iterationMap.clear();\n * ```\n *\n * @public\n */\n",
19591
+ "excerptTokens": [
19592
+ {
19593
+ "kind": "Content",
19594
+ "text": "export default class IterationMap<K, V> "
19595
+ }
19596
+ ],
19597
+ "fileUrlPath": "src/shared/classes/IterationMap.ts",
19598
+ "releaseTag": "Public",
19599
+ "typeParameters": [
19600
+ {
19601
+ "typeParameterName": "K",
19602
+ "constraintTokenRange": {
19603
+ "startIndex": 0,
19604
+ "endIndex": 0
19605
+ },
19606
+ "defaultTypeTokenRange": {
19607
+ "startIndex": 0,
19608
+ "endIndex": 0
19609
+ }
19610
+ },
19611
+ {
19612
+ "typeParameterName": "V",
19613
+ "constraintTokenRange": {
19614
+ "startIndex": 0,
19615
+ "endIndex": 0
19616
+ },
19617
+ "defaultTypeTokenRange": {
19618
+ "startIndex": 0,
19619
+ "endIndex": 0
19620
+ }
19621
+ }
19622
+ ],
19623
+ "isAbstract": false,
19624
+ "name": "IterationMap",
19625
+ "preserveMemberOrder": false,
19626
+ "members": [
19627
+ {
19628
+ "kind": "Method",
19629
+ "canonicalReference": "server!IterationMap#[Symbol.iterator]:member(1)",
19630
+ "docComment": "/**\n * Returns an iterator for the key-value pairs in the IterationMap.\n *\n * @returns An iterator for the entries.\n */\n",
19631
+ "excerptTokens": [
19632
+ {
19633
+ "kind": "Content",
19634
+ "text": "["
19635
+ },
19636
+ {
19637
+ "kind": "Reference",
19638
+ "text": "Symbol.iterator",
19639
+ "canonicalReference": "!SymbolConstructor#iterator"
19640
+ },
19641
+ {
19642
+ "kind": "Content",
19643
+ "text": "](): "
19644
+ },
19645
+ {
19646
+ "kind": "Reference",
19647
+ "text": "IterableIterator",
19648
+ "canonicalReference": "!IterableIterator:interface"
19649
+ },
19650
+ {
19651
+ "kind": "Content",
19652
+ "text": "<[K, V]>"
19653
+ },
19654
+ {
19655
+ "kind": "Content",
19656
+ "text": ";"
19657
+ }
19658
+ ],
19659
+ "isStatic": false,
19660
+ "returnTypeTokenRange": {
19661
+ "startIndex": 3,
19662
+ "endIndex": 5
19663
+ },
19664
+ "releaseTag": "Public",
19665
+ "isProtected": false,
19666
+ "overloadIndex": 1,
19667
+ "parameters": [],
19668
+ "isOptional": false,
19669
+ "isAbstract": false,
19670
+ "name": "[Symbol.iterator]"
19671
+ },
19672
+ {
19673
+ "kind": "Method",
19674
+ "canonicalReference": "server!IterationMap#clear:member(1)",
19675
+ "docComment": "/**\n * Removes all key-value pairs from the IterationMap. Highly optimized for the common \"build up, iterate, clear\" pattern.\n */\n",
19676
+ "excerptTokens": [
19677
+ {
19678
+ "kind": "Content",
19679
+ "text": "clear(): "
19680
+ },
19681
+ {
19682
+ "kind": "Content",
19683
+ "text": "void"
19684
+ },
19685
+ {
19686
+ "kind": "Content",
19687
+ "text": ";"
19688
+ }
19689
+ ],
19690
+ "isStatic": false,
19691
+ "returnTypeTokenRange": {
19692
+ "startIndex": 1,
19693
+ "endIndex": 2
19694
+ },
19695
+ "releaseTag": "Public",
19696
+ "isProtected": false,
19697
+ "overloadIndex": 1,
19698
+ "parameters": [],
19699
+ "isOptional": false,
19700
+ "isAbstract": false,
19701
+ "name": "clear"
19702
+ },
19703
+ {
19704
+ "kind": "Method",
19705
+ "canonicalReference": "server!IterationMap#delete:member(1)",
19706
+ "docComment": "/**\n * Removes the key-value pair from the IterationMap.\n *\n * @param key - The key to delete.\n *\n * @returns True if the key existed and was deleted, false otherwise.\n */\n",
19707
+ "excerptTokens": [
19708
+ {
19709
+ "kind": "Content",
19710
+ "text": "delete(key: "
19711
+ },
19712
+ {
19713
+ "kind": "Content",
19714
+ "text": "K"
19715
+ },
19716
+ {
19717
+ "kind": "Content",
19718
+ "text": "): "
19719
+ },
19720
+ {
19721
+ "kind": "Content",
19722
+ "text": "boolean"
19723
+ },
19724
+ {
19725
+ "kind": "Content",
19726
+ "text": ";"
19727
+ }
19728
+ ],
19729
+ "isStatic": false,
19730
+ "returnTypeTokenRange": {
19731
+ "startIndex": 3,
19732
+ "endIndex": 4
19733
+ },
19734
+ "releaseTag": "Public",
19735
+ "isProtected": false,
19736
+ "overloadIndex": 1,
19737
+ "parameters": [
19738
+ {
19739
+ "parameterName": "key",
19740
+ "parameterTypeTokenRange": {
19741
+ "startIndex": 1,
19742
+ "endIndex": 2
19743
+ },
19744
+ "isOptional": false
19745
+ }
19746
+ ],
19747
+ "isOptional": false,
19748
+ "isAbstract": false,
19749
+ "name": "delete"
19750
+ },
19751
+ {
19752
+ "kind": "Method",
19753
+ "canonicalReference": "server!IterationMap#entries:member(1)",
19754
+ "docComment": "/**\n * Returns an iterator for the key-value pairs in the IterationMap.\n *\n * @returns An iterator for the entries.\n */\n",
19755
+ "excerptTokens": [
19756
+ {
19757
+ "kind": "Content",
19758
+ "text": "entries(): "
19759
+ },
19760
+ {
19761
+ "kind": "Reference",
19762
+ "text": "IterableIterator",
19763
+ "canonicalReference": "!IterableIterator:interface"
19764
+ },
19765
+ {
19766
+ "kind": "Content",
19767
+ "text": "<[K, V]>"
19768
+ },
19769
+ {
19770
+ "kind": "Content",
19771
+ "text": ";"
19772
+ }
19773
+ ],
19774
+ "isStatic": false,
19775
+ "returnTypeTokenRange": {
19776
+ "startIndex": 1,
19777
+ "endIndex": 3
19778
+ },
19779
+ "releaseTag": "Public",
19780
+ "isProtected": false,
19781
+ "overloadIndex": 1,
19782
+ "parameters": [],
19783
+ "isOptional": false,
19784
+ "isAbstract": false,
19785
+ "name": "entries"
19786
+ },
19787
+ {
19788
+ "kind": "Method",
19789
+ "canonicalReference": "server!IterationMap#forEach:member(1)",
19790
+ "docComment": "/**\n * Executes a provided function once for each key-value pair.\n *\n * @param callbackfn - Function to execute for each element.\n *\n * @param thisArg - Value to use as this when executing callback.\n */\n",
19791
+ "excerptTokens": [
19792
+ {
19793
+ "kind": "Content",
19794
+ "text": "forEach(callbackfn: "
19795
+ },
19796
+ {
19797
+ "kind": "Content",
19798
+ "text": "(value: V, key: K, map: "
19799
+ },
19800
+ {
19801
+ "kind": "Reference",
19802
+ "text": "IterationMap",
19803
+ "canonicalReference": "server!IterationMap:class"
19804
+ },
19805
+ {
19806
+ "kind": "Content",
19807
+ "text": "<K, V>) => void"
19808
+ },
19809
+ {
19810
+ "kind": "Content",
19811
+ "text": ", thisArg?: "
19812
+ },
19813
+ {
19814
+ "kind": "Content",
19815
+ "text": "any"
19816
+ },
19817
+ {
19818
+ "kind": "Content",
19819
+ "text": "): "
19820
+ },
19821
+ {
19822
+ "kind": "Content",
19823
+ "text": "void"
19824
+ },
19825
+ {
19826
+ "kind": "Content",
19827
+ "text": ";"
19828
+ }
19829
+ ],
19830
+ "isStatic": false,
19831
+ "returnTypeTokenRange": {
19832
+ "startIndex": 7,
19833
+ "endIndex": 8
19834
+ },
19835
+ "releaseTag": "Public",
19836
+ "isProtected": false,
19837
+ "overloadIndex": 1,
19838
+ "parameters": [
19839
+ {
19840
+ "parameterName": "callbackfn",
19841
+ "parameterTypeTokenRange": {
19842
+ "startIndex": 1,
19843
+ "endIndex": 4
19844
+ },
19845
+ "isOptional": false
19846
+ },
19847
+ {
19848
+ "parameterName": "thisArg",
19849
+ "parameterTypeTokenRange": {
19850
+ "startIndex": 5,
19851
+ "endIndex": 6
19852
+ },
19853
+ "isOptional": true
19854
+ }
19855
+ ],
19856
+ "isOptional": false,
19857
+ "isAbstract": false,
19858
+ "name": "forEach"
19859
+ },
19860
+ {
19861
+ "kind": "Method",
19862
+ "canonicalReference": "server!IterationMap#get:member(1)",
19863
+ "docComment": "/**\n * Returns the value associated with the key, or undefined if the key doesn't exist.\n *\n * @param key - The key to look up.\n *\n * @returns The value associated with the key, or undefined.\n */\n",
19864
+ "excerptTokens": [
19865
+ {
19866
+ "kind": "Content",
19867
+ "text": "get(key: "
19868
+ },
19869
+ {
19870
+ "kind": "Content",
19871
+ "text": "K"
19872
+ },
19873
+ {
19874
+ "kind": "Content",
19875
+ "text": "): "
19876
+ },
19877
+ {
19878
+ "kind": "Content",
19879
+ "text": "V | undefined"
19880
+ },
19881
+ {
19882
+ "kind": "Content",
19883
+ "text": ";"
19884
+ }
19885
+ ],
19886
+ "isStatic": false,
19887
+ "returnTypeTokenRange": {
19888
+ "startIndex": 3,
19889
+ "endIndex": 4
19890
+ },
19891
+ "releaseTag": "Public",
19892
+ "isProtected": false,
19893
+ "overloadIndex": 1,
19894
+ "parameters": [
19895
+ {
19896
+ "parameterName": "key",
19897
+ "parameterTypeTokenRange": {
19898
+ "startIndex": 1,
19899
+ "endIndex": 2
19900
+ },
19901
+ "isOptional": false
19902
+ }
19903
+ ],
19904
+ "isOptional": false,
19905
+ "isAbstract": false,
19906
+ "name": "get"
19907
+ },
19908
+ {
19909
+ "kind": "Method",
19910
+ "canonicalReference": "server!IterationMap#has:member(1)",
19911
+ "docComment": "/**\n * Returns true if the key exists in the IterationMap.\n *\n * @param key - The key to check.\n *\n * @returns True if the key exists, false otherwise.\n */\n",
19912
+ "excerptTokens": [
19913
+ {
19914
+ "kind": "Content",
19915
+ "text": "has(key: "
19916
+ },
19917
+ {
19918
+ "kind": "Content",
19919
+ "text": "K"
19920
+ },
19921
+ {
19922
+ "kind": "Content",
19923
+ "text": "): "
19924
+ },
19925
+ {
19926
+ "kind": "Content",
19927
+ "text": "boolean"
19928
+ },
19929
+ {
19930
+ "kind": "Content",
19931
+ "text": ";"
19932
+ }
19933
+ ],
19934
+ "isStatic": false,
19935
+ "returnTypeTokenRange": {
19936
+ "startIndex": 3,
19937
+ "endIndex": 4
19938
+ },
19939
+ "releaseTag": "Public",
19940
+ "isProtected": false,
19941
+ "overloadIndex": 1,
19942
+ "parameters": [
19943
+ {
19944
+ "parameterName": "key",
19945
+ "parameterTypeTokenRange": {
19946
+ "startIndex": 1,
19947
+ "endIndex": 2
19948
+ },
19949
+ "isOptional": false
19950
+ }
19951
+ ],
19952
+ "isOptional": false,
19953
+ "isAbstract": false,
19954
+ "name": "has"
19955
+ },
19956
+ {
19957
+ "kind": "Method",
19958
+ "canonicalReference": "server!IterationMap#keys:member(1)",
19959
+ "docComment": "/**\n * Returns an iterator for the keys in the IterationMap.\n *\n * @returns An iterator for the keys.\n */\n",
19960
+ "excerptTokens": [
19961
+ {
19962
+ "kind": "Content",
19963
+ "text": "keys(): "
19964
+ },
19965
+ {
19966
+ "kind": "Reference",
19967
+ "text": "IterableIterator",
19968
+ "canonicalReference": "!IterableIterator:interface"
19969
+ },
19970
+ {
19971
+ "kind": "Content",
19972
+ "text": "<K>"
19973
+ },
19974
+ {
19975
+ "kind": "Content",
19976
+ "text": ";"
19977
+ }
19978
+ ],
19979
+ "isStatic": false,
19980
+ "returnTypeTokenRange": {
19981
+ "startIndex": 1,
19982
+ "endIndex": 3
19983
+ },
19984
+ "releaseTag": "Public",
19985
+ "isProtected": false,
19986
+ "overloadIndex": 1,
19987
+ "parameters": [],
19988
+ "isOptional": false,
19989
+ "isAbstract": false,
19990
+ "name": "keys"
19991
+ },
19992
+ {
19993
+ "kind": "Method",
19994
+ "canonicalReference": "server!IterationMap#set:member(1)",
19995
+ "docComment": "/**\n * Sets the value for the key in the IterationMap.\n *\n * @param key - The key to set.\n *\n * @param value - The value to set.\n *\n * @returns The IterationMap instance for chaining.\n */\n",
19996
+ "excerptTokens": [
19997
+ {
19998
+ "kind": "Content",
19999
+ "text": "set(key: "
20000
+ },
20001
+ {
20002
+ "kind": "Content",
20003
+ "text": "K"
20004
+ },
20005
+ {
20006
+ "kind": "Content",
20007
+ "text": ", value: "
20008
+ },
20009
+ {
20010
+ "kind": "Content",
20011
+ "text": "V"
20012
+ },
20013
+ {
20014
+ "kind": "Content",
20015
+ "text": "): "
20016
+ },
20017
+ {
20018
+ "kind": "Content",
20019
+ "text": "this"
20020
+ },
20021
+ {
20022
+ "kind": "Content",
20023
+ "text": ";"
20024
+ }
20025
+ ],
20026
+ "isStatic": false,
20027
+ "returnTypeTokenRange": {
20028
+ "startIndex": 5,
20029
+ "endIndex": 6
20030
+ },
20031
+ "releaseTag": "Public",
20032
+ "isProtected": false,
20033
+ "overloadIndex": 1,
20034
+ "parameters": [
20035
+ {
20036
+ "parameterName": "key",
20037
+ "parameterTypeTokenRange": {
20038
+ "startIndex": 1,
20039
+ "endIndex": 2
20040
+ },
20041
+ "isOptional": false
20042
+ },
20043
+ {
20044
+ "parameterName": "value",
20045
+ "parameterTypeTokenRange": {
20046
+ "startIndex": 3,
20047
+ "endIndex": 4
20048
+ },
20049
+ "isOptional": false
20050
+ }
20051
+ ],
20052
+ "isOptional": false,
20053
+ "isAbstract": false,
20054
+ "name": "set"
20055
+ },
20056
+ {
20057
+ "kind": "Property",
20058
+ "canonicalReference": "server!IterationMap#size:member",
20059
+ "docComment": "/**\n * Returns the number of key-value pairs in the IterationMap.\n */\n",
20060
+ "excerptTokens": [
20061
+ {
20062
+ "kind": "Content",
20063
+ "text": "get size(): "
20064
+ },
20065
+ {
20066
+ "kind": "Content",
20067
+ "text": "number"
20068
+ },
20069
+ {
20070
+ "kind": "Content",
20071
+ "text": ";"
20072
+ }
20073
+ ],
20074
+ "isReadonly": true,
20075
+ "isOptional": false,
20076
+ "releaseTag": "Public",
20077
+ "name": "size",
20078
+ "propertyTypeTokenRange": {
20079
+ "startIndex": 1,
20080
+ "endIndex": 2
20081
+ },
20082
+ "isStatic": false,
20083
+ "isProtected": false,
20084
+ "isAbstract": false
20085
+ },
20086
+ {
20087
+ "kind": "Method",
20088
+ "canonicalReference": "server!IterationMap#values:member(1)",
20089
+ "docComment": "/**\n * Returns an iterator for the values in the IterationMap. Note: For performance-critical iteration, use .valuesArray instead.\n *\n * @returns An iterator for the values.\n */\n",
20090
+ "excerptTokens": [
20091
+ {
20092
+ "kind": "Content",
20093
+ "text": "values(): "
20094
+ },
20095
+ {
20096
+ "kind": "Reference",
20097
+ "text": "IterableIterator",
20098
+ "canonicalReference": "!IterableIterator:interface"
20099
+ },
20100
+ {
20101
+ "kind": "Content",
20102
+ "text": "<V>"
20103
+ },
20104
+ {
20105
+ "kind": "Content",
20106
+ "text": ";"
20107
+ }
20108
+ ],
20109
+ "isStatic": false,
20110
+ "returnTypeTokenRange": {
20111
+ "startIndex": 1,
20112
+ "endIndex": 3
20113
+ },
20114
+ "releaseTag": "Public",
20115
+ "isProtected": false,
20116
+ "overloadIndex": 1,
20117
+ "parameters": [],
20118
+ "isOptional": false,
20119
+ "isAbstract": false,
20120
+ "name": "values"
20121
+ },
20122
+ {
20123
+ "kind": "Property",
20124
+ "canonicalReference": "server!IterationMap#valuesArray:member",
20125
+ "docComment": "/**\n * Returns a readonly array of all values for fast iteration. This is the key performance feature - use this instead of .values() for iteration.\n */\n",
20126
+ "excerptTokens": [
20127
+ {
20128
+ "kind": "Content",
20129
+ "text": "get valuesArray(): "
20130
+ },
20131
+ {
20132
+ "kind": "Content",
20133
+ "text": "readonly V[]"
20134
+ },
20135
+ {
20136
+ "kind": "Content",
20137
+ "text": ";"
20138
+ }
20139
+ ],
20140
+ "isReadonly": true,
20141
+ "isOptional": false,
20142
+ "releaseTag": "Public",
20143
+ "name": "valuesArray",
20144
+ "propertyTypeTokenRange": {
20145
+ "startIndex": 1,
20146
+ "endIndex": 2
20147
+ },
20148
+ "isStatic": false,
20149
+ "isProtected": false,
20150
+ "isAbstract": false
20151
+ }
20152
+ ],
20153
+ "implementsTokenRanges": []
20154
+ },
19530
20155
  {
19531
20156
  "kind": "Interface",
19532
20157
  "canonicalReference": "server!KinematicPositionRigidBodyOptions:interface",