hytopia 0.1.72 → 0.1.74
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/docs/server.eventrouter.emit.md +20 -4
- package/docs/server.eventrouter.md +43 -1
- package/docs/server.eventrouter.on.md +1 -1
- package/docs/server.eventrouter.once.md +69 -0
- package/docs/server.eventrouter.prependon.md +69 -0
- package/docs/server.eventrouter.prependonce.md +69 -0
- package/docs/server.md +0 -11
- package/docs/server.player.input.md +1 -1
- package/docs/server.player.md +1 -1
- package/docs/{server.rigidbody.createandaddchildcollidertosimulation.md → server.rigidbody.createandaddchildcollider.md} +7 -3
- package/docs/server.rigidbody.md +4 -4
- package/examples/entity-controller/MyEntityController.ts +2 -2
- package/examples/hole-in-wall-game/assets/map.json +3 -2
- package/examples/hole-in-wall-game/assets/ui/index.html +3 -4
- package/examples/hole-in-wall-game/index.ts +122 -258
- package/examples/hole-in-wall-game/package.json +2 -2
- package/examples/hole-in-wall-game/wall-shapes.ts +145 -0
- package/package.json +1 -1
- package/server.api.json +276 -132
- package/server.d.ts +40 -25
- package/server.js +84 -84
- package/docs/server.event_2.md +0 -76
- package/docs/server.event_2.payload.md +0 -13
- package/docs/server.event_2.type.md +0 -13
- package/examples/hole-in-wall-game/hole-in-the-wall-4.zip +0 -0
package/package.json
CHANGED
package/server.api.json
CHANGED
@@ -12714,91 +12714,6 @@
|
|
12714
12714
|
],
|
12715
12715
|
"extendsTokenRanges": []
|
12716
12716
|
},
|
12717
|
-
{
|
12718
|
-
"kind": "Interface",
|
12719
|
-
"canonicalReference": "server!Event_2:interface",
|
12720
|
-
"docComment": "/**\n * An EventRouter event.\n *\n * @public\n */\n",
|
12721
|
-
"excerptTokens": [
|
12722
|
-
{
|
12723
|
-
"kind": "Content",
|
12724
|
-
"text": "export interface Event<TPayload> "
|
12725
|
-
}
|
12726
|
-
],
|
12727
|
-
"fileUrlPath": "src/events/EventRouter.ts",
|
12728
|
-
"releaseTag": "Public",
|
12729
|
-
"typeParameters": [
|
12730
|
-
{
|
12731
|
-
"typeParameterName": "TPayload",
|
12732
|
-
"constraintTokenRange": {
|
12733
|
-
"startIndex": 0,
|
12734
|
-
"endIndex": 0
|
12735
|
-
},
|
12736
|
-
"defaultTypeTokenRange": {
|
12737
|
-
"startIndex": 0,
|
12738
|
-
"endIndex": 0
|
12739
|
-
}
|
12740
|
-
}
|
12741
|
-
],
|
12742
|
-
"name": "Event_2",
|
12743
|
-
"preserveMemberOrder": false,
|
12744
|
-
"members": [
|
12745
|
-
{
|
12746
|
-
"kind": "PropertySignature",
|
12747
|
-
"canonicalReference": "server!Event_2#payload:member",
|
12748
|
-
"docComment": "/**\n * The payload of the event, passed to listeners\n */\n",
|
12749
|
-
"excerptTokens": [
|
12750
|
-
{
|
12751
|
-
"kind": "Content",
|
12752
|
-
"text": "payload: "
|
12753
|
-
},
|
12754
|
-
{
|
12755
|
-
"kind": "Content",
|
12756
|
-
"text": "TPayload"
|
12757
|
-
},
|
12758
|
-
{
|
12759
|
-
"kind": "Content",
|
12760
|
-
"text": ";"
|
12761
|
-
}
|
12762
|
-
],
|
12763
|
-
"isReadonly": false,
|
12764
|
-
"isOptional": false,
|
12765
|
-
"releaseTag": "Public",
|
12766
|
-
"name": "payload",
|
12767
|
-
"propertyTypeTokenRange": {
|
12768
|
-
"startIndex": 1,
|
12769
|
-
"endIndex": 2
|
12770
|
-
}
|
12771
|
-
},
|
12772
|
-
{
|
12773
|
-
"kind": "PropertySignature",
|
12774
|
-
"canonicalReference": "server!Event_2#type:member",
|
12775
|
-
"docComment": "/**\n * The type of event\n */\n",
|
12776
|
-
"excerptTokens": [
|
12777
|
-
{
|
12778
|
-
"kind": "Content",
|
12779
|
-
"text": "type: "
|
12780
|
-
},
|
12781
|
-
{
|
12782
|
-
"kind": "Content",
|
12783
|
-
"text": "string"
|
12784
|
-
},
|
12785
|
-
{
|
12786
|
-
"kind": "Content",
|
12787
|
-
"text": ";"
|
12788
|
-
}
|
12789
|
-
],
|
12790
|
-
"isReadonly": false,
|
12791
|
-
"isOptional": false,
|
12792
|
-
"releaseTag": "Public",
|
12793
|
-
"name": "type",
|
12794
|
-
"propertyTypeTokenRange": {
|
12795
|
-
"startIndex": 1,
|
12796
|
-
"endIndex": 2
|
12797
|
-
}
|
12798
|
-
}
|
12799
|
-
],
|
12800
|
-
"extendsTokenRanges": []
|
12801
|
-
},
|
12802
12717
|
{
|
12803
12718
|
"kind": "Class",
|
12804
12719
|
"canonicalReference": "server!EventRouter:class",
|
@@ -12850,20 +12765,23 @@
|
|
12850
12765
|
{
|
12851
12766
|
"kind": "Method",
|
12852
12767
|
"canonicalReference": "server!EventRouter#emit:member(1)",
|
12853
|
-
"docComment": "/**\n * Emit an event, invoking all registered listeners for the event type.\n *\n * @param
|
12768
|
+
"docComment": "/**\n * Emit an event, invoking all registered listeners for the event type.\n *\n * @param eventType - The type of event to emit.\n *\n * @param payload - The payload to emit.\n *\n * @returns `true` if listeners were found and invoked, `false` otherwise.\n */\n",
|
12854
12769
|
"excerptTokens": [
|
12855
12770
|
{
|
12856
12771
|
"kind": "Content",
|
12857
|
-
"text": "emit<TPayload>(
|
12772
|
+
"text": "emit<TPayload>(eventType: "
|
12858
12773
|
},
|
12859
12774
|
{
|
12860
|
-
"kind": "
|
12861
|
-
"text": "
|
12862
|
-
|
12775
|
+
"kind": "Content",
|
12776
|
+
"text": "string"
|
12777
|
+
},
|
12778
|
+
{
|
12779
|
+
"kind": "Content",
|
12780
|
+
"text": ", payload: "
|
12863
12781
|
},
|
12864
12782
|
{
|
12865
12783
|
"kind": "Content",
|
12866
|
-
"text": "
|
12784
|
+
"text": "TPayload"
|
12867
12785
|
},
|
12868
12786
|
{
|
12869
12787
|
"kind": "Content",
|
@@ -12893,18 +12811,26 @@
|
|
12893
12811
|
],
|
12894
12812
|
"isStatic": false,
|
12895
12813
|
"returnTypeTokenRange": {
|
12896
|
-
"startIndex":
|
12897
|
-
"endIndex":
|
12814
|
+
"startIndex": 5,
|
12815
|
+
"endIndex": 6
|
12898
12816
|
},
|
12899
12817
|
"releaseTag": "Public",
|
12900
12818
|
"isProtected": false,
|
12901
12819
|
"overloadIndex": 1,
|
12902
12820
|
"parameters": [
|
12903
12821
|
{
|
12904
|
-
"parameterName": "
|
12822
|
+
"parameterName": "eventType",
|
12905
12823
|
"parameterTypeTokenRange": {
|
12906
12824
|
"startIndex": 1,
|
12907
|
-
"endIndex":
|
12825
|
+
"endIndex": 2
|
12826
|
+
},
|
12827
|
+
"isOptional": false
|
12828
|
+
},
|
12829
|
+
{
|
12830
|
+
"parameterName": "payload",
|
12831
|
+
"parameterTypeTokenRange": {
|
12832
|
+
"startIndex": 3,
|
12833
|
+
"endIndex": 4
|
12908
12834
|
},
|
12909
12835
|
"isOptional": false
|
12910
12836
|
}
|
@@ -13191,7 +13117,7 @@
|
|
13191
13117
|
{
|
13192
13118
|
"kind": "Method",
|
13193
13119
|
"canonicalReference": "server!EventRouter#on:member(1)",
|
13194
|
-
"docComment": "/**\n * Register a listener for a specific event type.\n *\n * @remarks\n *\n *
|
13120
|
+
"docComment": "/**\n * Register a listener for a specific event type.\n *\n * @remarks\n *\n * Listeners are invoked in the order they are registered.\n *\n * @param eventType - The type of event to listen for.\n *\n * @param listener - The listener function to invoke when the event is emitted.\n */\n",
|
13195
13121
|
"excerptTokens": [
|
13196
13122
|
{
|
13197
13123
|
"kind": "Content",
|
@@ -13265,6 +13191,237 @@
|
|
13265
13191
|
"isAbstract": false,
|
13266
13192
|
"name": "on"
|
13267
13193
|
},
|
13194
|
+
{
|
13195
|
+
"kind": "Method",
|
13196
|
+
"canonicalReference": "server!EventRouter#once:member(1)",
|
13197
|
+
"docComment": "/**\n * Register a listener for a specific event type that will be invoked once.\n *\n * @param eventType - The type of event to listen for.\n *\n * @param listener - The listener function to invoke when the event is emitted.\n */\n",
|
13198
|
+
"excerptTokens": [
|
13199
|
+
{
|
13200
|
+
"kind": "Content",
|
13201
|
+
"text": "once<TPayload>(eventType: "
|
13202
|
+
},
|
13203
|
+
{
|
13204
|
+
"kind": "Content",
|
13205
|
+
"text": "string"
|
13206
|
+
},
|
13207
|
+
{
|
13208
|
+
"kind": "Content",
|
13209
|
+
"text": ", listener: "
|
13210
|
+
},
|
13211
|
+
{
|
13212
|
+
"kind": "Content",
|
13213
|
+
"text": "(payload: TPayload) => void"
|
13214
|
+
},
|
13215
|
+
{
|
13216
|
+
"kind": "Content",
|
13217
|
+
"text": "): "
|
13218
|
+
},
|
13219
|
+
{
|
13220
|
+
"kind": "Content",
|
13221
|
+
"text": "void"
|
13222
|
+
},
|
13223
|
+
{
|
13224
|
+
"kind": "Content",
|
13225
|
+
"text": ";"
|
13226
|
+
}
|
13227
|
+
],
|
13228
|
+
"typeParameters": [
|
13229
|
+
{
|
13230
|
+
"typeParameterName": "TPayload",
|
13231
|
+
"constraintTokenRange": {
|
13232
|
+
"startIndex": 0,
|
13233
|
+
"endIndex": 0
|
13234
|
+
},
|
13235
|
+
"defaultTypeTokenRange": {
|
13236
|
+
"startIndex": 0,
|
13237
|
+
"endIndex": 0
|
13238
|
+
}
|
13239
|
+
}
|
13240
|
+
],
|
13241
|
+
"isStatic": false,
|
13242
|
+
"returnTypeTokenRange": {
|
13243
|
+
"startIndex": 5,
|
13244
|
+
"endIndex": 6
|
13245
|
+
},
|
13246
|
+
"releaseTag": "Public",
|
13247
|
+
"isProtected": false,
|
13248
|
+
"overloadIndex": 1,
|
13249
|
+
"parameters": [
|
13250
|
+
{
|
13251
|
+
"parameterName": "eventType",
|
13252
|
+
"parameterTypeTokenRange": {
|
13253
|
+
"startIndex": 1,
|
13254
|
+
"endIndex": 2
|
13255
|
+
},
|
13256
|
+
"isOptional": false
|
13257
|
+
},
|
13258
|
+
{
|
13259
|
+
"parameterName": "listener",
|
13260
|
+
"parameterTypeTokenRange": {
|
13261
|
+
"startIndex": 3,
|
13262
|
+
"endIndex": 4
|
13263
|
+
},
|
13264
|
+
"isOptional": false
|
13265
|
+
}
|
13266
|
+
],
|
13267
|
+
"isOptional": false,
|
13268
|
+
"isAbstract": false,
|
13269
|
+
"name": "once"
|
13270
|
+
},
|
13271
|
+
{
|
13272
|
+
"kind": "Method",
|
13273
|
+
"canonicalReference": "server!EventRouter#prependOn:member(1)",
|
13274
|
+
"docComment": "/**\n * Register a listener for a specific event type that will be invoked before all other existing listeners.\n *\n * @param eventType - The type of event to listen for.\n *\n * @param listener - The listener function to invoke when the event is emitted.\n */\n",
|
13275
|
+
"excerptTokens": [
|
13276
|
+
{
|
13277
|
+
"kind": "Content",
|
13278
|
+
"text": "prependOn<TPayload>(eventType: "
|
13279
|
+
},
|
13280
|
+
{
|
13281
|
+
"kind": "Content",
|
13282
|
+
"text": "string"
|
13283
|
+
},
|
13284
|
+
{
|
13285
|
+
"kind": "Content",
|
13286
|
+
"text": ", listener: "
|
13287
|
+
},
|
13288
|
+
{
|
13289
|
+
"kind": "Content",
|
13290
|
+
"text": "(payload: TPayload) => void"
|
13291
|
+
},
|
13292
|
+
{
|
13293
|
+
"kind": "Content",
|
13294
|
+
"text": "): "
|
13295
|
+
},
|
13296
|
+
{
|
13297
|
+
"kind": "Content",
|
13298
|
+
"text": "void"
|
13299
|
+
},
|
13300
|
+
{
|
13301
|
+
"kind": "Content",
|
13302
|
+
"text": ";"
|
13303
|
+
}
|
13304
|
+
],
|
13305
|
+
"typeParameters": [
|
13306
|
+
{
|
13307
|
+
"typeParameterName": "TPayload",
|
13308
|
+
"constraintTokenRange": {
|
13309
|
+
"startIndex": 0,
|
13310
|
+
"endIndex": 0
|
13311
|
+
},
|
13312
|
+
"defaultTypeTokenRange": {
|
13313
|
+
"startIndex": 0,
|
13314
|
+
"endIndex": 0
|
13315
|
+
}
|
13316
|
+
}
|
13317
|
+
],
|
13318
|
+
"isStatic": false,
|
13319
|
+
"returnTypeTokenRange": {
|
13320
|
+
"startIndex": 5,
|
13321
|
+
"endIndex": 6
|
13322
|
+
},
|
13323
|
+
"releaseTag": "Public",
|
13324
|
+
"isProtected": false,
|
13325
|
+
"overloadIndex": 1,
|
13326
|
+
"parameters": [
|
13327
|
+
{
|
13328
|
+
"parameterName": "eventType",
|
13329
|
+
"parameterTypeTokenRange": {
|
13330
|
+
"startIndex": 1,
|
13331
|
+
"endIndex": 2
|
13332
|
+
},
|
13333
|
+
"isOptional": false
|
13334
|
+
},
|
13335
|
+
{
|
13336
|
+
"parameterName": "listener",
|
13337
|
+
"parameterTypeTokenRange": {
|
13338
|
+
"startIndex": 3,
|
13339
|
+
"endIndex": 4
|
13340
|
+
},
|
13341
|
+
"isOptional": false
|
13342
|
+
}
|
13343
|
+
],
|
13344
|
+
"isOptional": false,
|
13345
|
+
"isAbstract": false,
|
13346
|
+
"name": "prependOn"
|
13347
|
+
},
|
13348
|
+
{
|
13349
|
+
"kind": "Method",
|
13350
|
+
"canonicalReference": "server!EventRouter#prependOnce:member(1)",
|
13351
|
+
"docComment": "/**\n * Register a listener for a specific event type that will be invoked once before all other existing listeners.\n *\n * @param eventType - The type of event to listen for.\n *\n * @param listener - The listener function to invoke when the event is emitted.\n */\n",
|
13352
|
+
"excerptTokens": [
|
13353
|
+
{
|
13354
|
+
"kind": "Content",
|
13355
|
+
"text": "prependOnce<TPayload>(eventType: "
|
13356
|
+
},
|
13357
|
+
{
|
13358
|
+
"kind": "Content",
|
13359
|
+
"text": "string"
|
13360
|
+
},
|
13361
|
+
{
|
13362
|
+
"kind": "Content",
|
13363
|
+
"text": ", listener: "
|
13364
|
+
},
|
13365
|
+
{
|
13366
|
+
"kind": "Content",
|
13367
|
+
"text": "(payload: TPayload) => void"
|
13368
|
+
},
|
13369
|
+
{
|
13370
|
+
"kind": "Content",
|
13371
|
+
"text": "): "
|
13372
|
+
},
|
13373
|
+
{
|
13374
|
+
"kind": "Content",
|
13375
|
+
"text": "void"
|
13376
|
+
},
|
13377
|
+
{
|
13378
|
+
"kind": "Content",
|
13379
|
+
"text": ";"
|
13380
|
+
}
|
13381
|
+
],
|
13382
|
+
"typeParameters": [
|
13383
|
+
{
|
13384
|
+
"typeParameterName": "TPayload",
|
13385
|
+
"constraintTokenRange": {
|
13386
|
+
"startIndex": 0,
|
13387
|
+
"endIndex": 0
|
13388
|
+
},
|
13389
|
+
"defaultTypeTokenRange": {
|
13390
|
+
"startIndex": 0,
|
13391
|
+
"endIndex": 0
|
13392
|
+
}
|
13393
|
+
}
|
13394
|
+
],
|
13395
|
+
"isStatic": false,
|
13396
|
+
"returnTypeTokenRange": {
|
13397
|
+
"startIndex": 5,
|
13398
|
+
"endIndex": 6
|
13399
|
+
},
|
13400
|
+
"releaseTag": "Public",
|
13401
|
+
"isProtected": false,
|
13402
|
+
"overloadIndex": 1,
|
13403
|
+
"parameters": [
|
13404
|
+
{
|
13405
|
+
"parameterName": "eventType",
|
13406
|
+
"parameterTypeTokenRange": {
|
13407
|
+
"startIndex": 1,
|
13408
|
+
"endIndex": 2
|
13409
|
+
},
|
13410
|
+
"isOptional": false
|
13411
|
+
},
|
13412
|
+
{
|
13413
|
+
"parameterName": "listener",
|
13414
|
+
"parameterTypeTokenRange": {
|
13415
|
+
"startIndex": 3,
|
13416
|
+
"endIndex": 4
|
13417
|
+
},
|
13418
|
+
"isOptional": false
|
13419
|
+
}
|
13420
|
+
],
|
13421
|
+
"isOptional": false,
|
13422
|
+
"isAbstract": false,
|
13423
|
+
"name": "prependOnce"
|
13424
|
+
},
|
13268
13425
|
{
|
13269
13426
|
"kind": "Property",
|
13270
13427
|
"canonicalReference": "server!EventRouter.serverInstance:member",
|
@@ -16835,24 +16992,11 @@
|
|
16835
16992
|
"kind": "Content",
|
16836
16993
|
"text": "get input(): "
|
16837
16994
|
},
|
16838
|
-
{
|
16839
|
-
"kind": "Reference",
|
16840
|
-
"text": "Readonly",
|
16841
|
-
"canonicalReference": "!Readonly:type"
|
16842
|
-
},
|
16843
|
-
{
|
16844
|
-
"kind": "Content",
|
16845
|
-
"text": "<"
|
16846
|
-
},
|
16847
16995
|
{
|
16848
16996
|
"kind": "Reference",
|
16849
16997
|
"text": "PlayerInput",
|
16850
16998
|
"canonicalReference": "server!PlayerInput:type"
|
16851
16999
|
},
|
16852
|
-
{
|
16853
|
-
"kind": "Content",
|
16854
|
-
"text": ">"
|
16855
|
-
},
|
16856
17000
|
{
|
16857
17001
|
"kind": "Content",
|
16858
17002
|
"text": ";"
|
@@ -16864,7 +17008,7 @@
|
|
16864
17008
|
"name": "input",
|
16865
17009
|
"propertyTypeTokenRange": {
|
16866
17010
|
"startIndex": 1,
|
16867
|
-
"endIndex":
|
17011
|
+
"endIndex": 2
|
16868
17012
|
},
|
16869
17013
|
"isStatic": false,
|
16870
17014
|
"isProtected": false,
|
@@ -23866,22 +24010,18 @@
|
|
23866
24010
|
},
|
23867
24011
|
{
|
23868
24012
|
"kind": "Method",
|
23869
|
-
"canonicalReference": "server!RigidBody#
|
23870
|
-
"docComment": "/**\n * Creates and adds
|
24013
|
+
"canonicalReference": "server!RigidBody#createAndAddChildCollider:member(1)",
|
24014
|
+
"docComment": "/**\n * Creates and adds a child collider to the rigid body for the simulation it belongs to.\n *\n * @remarks\n *\n * If the rigid body is not simulated, the collider will be added to the rigid body as a pending child collider and also simulated when the rigid body is simulated.\n *\n * @param colliderOptions - The options for the child collider to add.\n *\n * @returns The child collider that was added to the rigid body.\n */\n",
|
23871
24015
|
"excerptTokens": [
|
23872
24016
|
{
|
23873
24017
|
"kind": "Content",
|
23874
|
-
"text": "
|
24018
|
+
"text": "createAndAddChildCollider(colliderOptions: "
|
23875
24019
|
},
|
23876
24020
|
{
|
23877
24021
|
"kind": "Reference",
|
23878
24022
|
"text": "ColliderOptions",
|
23879
24023
|
"canonicalReference": "server!ColliderOptions:interface"
|
23880
24024
|
},
|
23881
|
-
{
|
23882
|
-
"kind": "Content",
|
23883
|
-
"text": "[]"
|
23884
|
-
},
|
23885
24025
|
{
|
23886
24026
|
"kind": "Content",
|
23887
24027
|
"text": "): "
|
@@ -23891,10 +24031,6 @@
|
|
23891
24031
|
"text": "Collider",
|
23892
24032
|
"canonicalReference": "server!Collider:class"
|
23893
24033
|
},
|
23894
|
-
{
|
23895
|
-
"kind": "Content",
|
23896
|
-
"text": "[]"
|
23897
|
-
},
|
23898
24034
|
{
|
23899
24035
|
"kind": "Content",
|
23900
24036
|
"text": ";"
|
@@ -23902,8 +24038,8 @@
|
|
23902
24038
|
],
|
23903
24039
|
"isStatic": false,
|
23904
24040
|
"returnTypeTokenRange": {
|
23905
|
-
"startIndex":
|
23906
|
-
"endIndex":
|
24041
|
+
"startIndex": 3,
|
24042
|
+
"endIndex": 4
|
23907
24043
|
},
|
23908
24044
|
"releaseTag": "Public",
|
23909
24045
|
"isProtected": false,
|
@@ -23913,29 +24049,33 @@
|
|
23913
24049
|
"parameterName": "colliderOptions",
|
23914
24050
|
"parameterTypeTokenRange": {
|
23915
24051
|
"startIndex": 1,
|
23916
|
-
"endIndex":
|
24052
|
+
"endIndex": 2
|
23917
24053
|
},
|
23918
24054
|
"isOptional": false
|
23919
24055
|
}
|
23920
24056
|
],
|
23921
24057
|
"isOptional": false,
|
23922
24058
|
"isAbstract": false,
|
23923
|
-
"name": "
|
24059
|
+
"name": "createAndAddChildCollider"
|
23924
24060
|
},
|
23925
24061
|
{
|
23926
24062
|
"kind": "Method",
|
23927
|
-
"canonicalReference": "server!RigidBody#
|
23928
|
-
"docComment": "/**\n * Creates and adds
|
24063
|
+
"canonicalReference": "server!RigidBody#createAndAddChildCollidersToSimulation:member(1)",
|
24064
|
+
"docComment": "/**\n * Creates and adds multiple child colliders to the rigid body for the simulation it belongs to.\n *\n * @param colliderOptions - The options for the child colliders to add to the rigid body.\n *\n * @returns The child colliders that were added to the rigid body.\n */\n",
|
23929
24065
|
"excerptTokens": [
|
23930
24066
|
{
|
23931
24067
|
"kind": "Content",
|
23932
|
-
"text": "
|
24068
|
+
"text": "createAndAddChildCollidersToSimulation(colliderOptions: "
|
23933
24069
|
},
|
23934
24070
|
{
|
23935
24071
|
"kind": "Reference",
|
23936
24072
|
"text": "ColliderOptions",
|
23937
24073
|
"canonicalReference": "server!ColliderOptions:interface"
|
23938
24074
|
},
|
24075
|
+
{
|
24076
|
+
"kind": "Content",
|
24077
|
+
"text": "[]"
|
24078
|
+
},
|
23939
24079
|
{
|
23940
24080
|
"kind": "Content",
|
23941
24081
|
"text": "): "
|
@@ -23945,6 +24085,10 @@
|
|
23945
24085
|
"text": "Collider",
|
23946
24086
|
"canonicalReference": "server!Collider:class"
|
23947
24087
|
},
|
24088
|
+
{
|
24089
|
+
"kind": "Content",
|
24090
|
+
"text": "[]"
|
24091
|
+
},
|
23948
24092
|
{
|
23949
24093
|
"kind": "Content",
|
23950
24094
|
"text": ";"
|
@@ -23952,8 +24096,8 @@
|
|
23952
24096
|
],
|
23953
24097
|
"isStatic": false,
|
23954
24098
|
"returnTypeTokenRange": {
|
23955
|
-
"startIndex":
|
23956
|
-
"endIndex":
|
24099
|
+
"startIndex": 4,
|
24100
|
+
"endIndex": 6
|
23957
24101
|
},
|
23958
24102
|
"releaseTag": "Public",
|
23959
24103
|
"isProtected": false,
|
@@ -23963,14 +24107,14 @@
|
|
23963
24107
|
"parameterName": "colliderOptions",
|
23964
24108
|
"parameterTypeTokenRange": {
|
23965
24109
|
"startIndex": 1,
|
23966
|
-
"endIndex":
|
24110
|
+
"endIndex": 3
|
23967
24111
|
},
|
23968
24112
|
"isOptional": false
|
23969
24113
|
}
|
23970
24114
|
],
|
23971
24115
|
"isOptional": false,
|
23972
24116
|
"isAbstract": false,
|
23973
|
-
"name": "
|
24117
|
+
"name": "createAndAddChildCollidersToSimulation"
|
23974
24118
|
},
|
23975
24119
|
{
|
23976
24120
|
"kind": "Property",
|
package/server.d.ts
CHANGED
@@ -1621,15 +1621,6 @@ export declare interface EntityOptions {
|
|
1621
1621
|
tintColor?: RgbColor;
|
1622
1622
|
}
|
1623
1623
|
|
1624
|
-
/** An EventRouter event. @public */
|
1625
|
-
declare interface Event_2<TPayload> {
|
1626
|
-
/** The type of event */
|
1627
|
-
type: string;
|
1628
|
-
/** The payload of the event, passed to listeners */
|
1629
|
-
payload: TPayload;
|
1630
|
-
}
|
1631
|
-
export { Event_2 as Event }
|
1632
|
-
|
1633
1624
|
/**
|
1634
1625
|
* Manages event emission and assigned listener callbacks.
|
1635
1626
|
*
|
@@ -1646,7 +1637,6 @@ export declare class EventRouter {
|
|
1646
1637
|
/** The singleton instance for global server events. */
|
1647
1638
|
static readonly serverInstance: EventRouter;
|
1648
1639
|
private _emitter;
|
1649
|
-
private _wrappedListenerMap;
|
1650
1640
|
private _tag;
|
1651
1641
|
/** Enable logging of all events. Default: false */
|
1652
1642
|
logAllEvents: boolean;
|
@@ -1661,18 +1651,14 @@ export declare class EventRouter {
|
|
1661
1651
|
/** @param tag - Tag for logging, used to identify EventRouter instances in logs. */
|
1662
1652
|
constructor(tag: string);
|
1663
1653
|
/**
|
1664
|
-
*
|
1654
|
+
* Emit an event, invoking all registered listeners for the event type.
|
1665
1655
|
*
|
1666
|
-
* @
|
1667
|
-
*
|
1668
|
-
* emits an event a listener was registered for, the listener will
|
1669
|
-
* be invoked with the event payload. Listeners are called in the order
|
1670
|
-
* they are registered.
|
1656
|
+
* @param eventType - The type of event to emit.
|
1657
|
+
* @param payload - The payload to emit.
|
1671
1658
|
*
|
1672
|
-
* @
|
1673
|
-
* @param listener - The listener function to invoke when the event is emitted.
|
1659
|
+
* @returns `true` if listeners were found and invoked, `false` otherwise.
|
1674
1660
|
*/
|
1675
|
-
|
1661
|
+
emit<TPayload>(eventType: string, payload: TPayload): boolean;
|
1676
1662
|
/**
|
1677
1663
|
* Remove a listener for a specific event type.
|
1678
1664
|
*
|
@@ -1687,12 +1673,36 @@ export declare class EventRouter {
|
|
1687
1673
|
*/
|
1688
1674
|
offAll(eventType: string): void;
|
1689
1675
|
/**
|
1690
|
-
*
|
1676
|
+
* Register a listener for a specific event type.
|
1691
1677
|
*
|
1692
|
-
* @
|
1693
|
-
*
|
1678
|
+
* @remarks
|
1679
|
+
* Listeners are invoked in the order they are registered.
|
1680
|
+
*
|
1681
|
+
* @param eventType - The type of event to listen for.
|
1682
|
+
* @param listener - The listener function to invoke when the event is emitted.
|
1694
1683
|
*/
|
1695
|
-
|
1684
|
+
on<TPayload>(eventType: string, listener: (payload: TPayload) => void): void;
|
1685
|
+
/**
|
1686
|
+
* Register a listener for a specific event type that will be invoked once.
|
1687
|
+
*
|
1688
|
+
* @param eventType - The type of event to listen for.
|
1689
|
+
* @param listener - The listener function to invoke when the event is emitted.
|
1690
|
+
*/
|
1691
|
+
once<TPayload>(eventType: string, listener: (payload: TPayload) => void): void;
|
1692
|
+
/**
|
1693
|
+
* Register a listener for a specific event type that will be invoked before all other existing listeners.
|
1694
|
+
*
|
1695
|
+
* @param eventType - The type of event to listen for.
|
1696
|
+
* @param listener - The listener function to invoke when the event is emitted.
|
1697
|
+
*/
|
1698
|
+
prependOn<TPayload>(eventType: string, listener: (payload: TPayload) => void): void;
|
1699
|
+
/**
|
1700
|
+
* Register a listener for a specific event type that will be invoked once before all other existing listeners.
|
1701
|
+
*
|
1702
|
+
* @param eventType - The type of event to listen for.
|
1703
|
+
* @param listener - The listener function to invoke when the event is emitted.
|
1704
|
+
*/
|
1705
|
+
prependOnce<TPayload>(eventType: string, listener: (payload: TPayload) => void): void;
|
1696
1706
|
}
|
1697
1707
|
|
1698
1708
|
/**
|
@@ -2160,7 +2170,7 @@ export declare class Player {
|
|
2160
2170
|
|
2161
2171
|
|
2162
2172
|
/** The current {@link PlayerInput} of the player. */
|
2163
|
-
get input():
|
2173
|
+
get input(): PlayerInput;
|
2164
2174
|
/** The current {@link World} the player is in. */
|
2165
2175
|
get world(): World | undefined;
|
2166
2176
|
/**
|
@@ -3184,10 +3194,15 @@ export declare class RigidBody {
|
|
3184
3194
|
applyTorqueImpulse(impulse: Vector3Like): void;
|
3185
3195
|
/**
|
3186
3196
|
* Creates and adds a child collider to the rigid body for the simulation it belongs to.
|
3197
|
+
*
|
3198
|
+
* @remarks
|
3199
|
+
* If the rigid body is not simulated, the collider will be added to the rigid body as a pending child collider
|
3200
|
+
* and also simulated when the rigid body is simulated.
|
3201
|
+
*
|
3187
3202
|
* @param colliderOptions - The options for the child collider to add.
|
3188
3203
|
* @returns The child collider that was added to the rigid body.
|
3189
3204
|
*/
|
3190
|
-
|
3205
|
+
createAndAddChildCollider(colliderOptions: ColliderOptions): Collider;
|
3191
3206
|
/**
|
3192
3207
|
* Creates and adds multiple child colliders to the rigid body for the simulation it belongs to.
|
3193
3208
|
* @param colliderOptions - The options for the child colliders to add to the rigid body.
|