hytopia 0.1.51 → 0.1.53
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.basecharactercontroller.md +2 -2
- package/docs/server.basecharactercontroller.ontickwithplayerinput.md +1 -1
- package/docs/server.basecharactercontroller.tickwithplayerinput.md +1 -1
- package/docs/server.blocktype.md +1 -1
- package/docs/server.contactforcedata.md +18 -0
- package/docs/server.contactmanifold.md +19 -0
- package/docs/server.entity.md +2 -2
- package/docs/server.md +42 -0
- package/docs/server.raycasthit.md +17 -0
- package/docs/server.raycastoptions.md +20 -0
- package/docs/server.simulation.getcontactmanifolds.md +1 -1
- package/docs/server.simulation.md +8 -8
- package/docs/{server.simulation.castray.md → server.simulation.raycast.md} +10 -6
- package/examples/payload-game/assets/ui/index.html +2 -2
- package/package.json +1 -1
- package/server.api.json +322 -119
- package/server.d.ts +22 -7
- package/server.js +39 -39
package/server.api.json
CHANGED
@@ -2786,7 +2786,7 @@
|
|
2786
2786
|
{
|
2787
2787
|
"kind": "Property",
|
2788
2788
|
"canonicalReference": "server!BaseCharacterController#onTickWithPlayerInput:member",
|
2789
|
-
"docComment": "/**\n * A callback function for when the controller ticks player movement
|
2789
|
+
"docComment": "/**\n * A callback function for when the controller ticks player movement.\n *\n * @param input - The current input state of the player.\n *\n * @param cameraOrientation - The current camera orientation state of the player.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
|
2790
2790
|
"excerptTokens": [
|
2791
2791
|
{
|
2792
2792
|
"kind": "Content",
|
@@ -2882,7 +2882,7 @@
|
|
2882
2882
|
{
|
2883
2883
|
"kind": "Method",
|
2884
2884
|
"canonicalReference": "server!BaseCharacterController#tickWithPlayerInput:member(1)",
|
2885
|
-
"docComment": "/**\n * Override this method to handle entity movements based on player input for your character controller.\n *\n * @param input - The current input state of the player.\n *\n * @param cameraOrientation - The current camera orientation state of the player.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
|
2885
|
+
"docComment": "/**\n * Override this method to handle entity movements based on player input for your character controller. This is called every tick by a PlayerEntity with a character controller.\n *\n * @param input - The current input state of the player.\n *\n * @param cameraOrientation - The current camera orientation state of the player.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
|
2886
2886
|
"excerptTokens": [
|
2887
2887
|
{
|
2888
2888
|
"kind": "Content",
|
@@ -3324,7 +3324,7 @@
|
|
3324
3324
|
{
|
3325
3325
|
"kind": "Reference",
|
3326
3326
|
"text": "ContactForceData",
|
3327
|
-
"canonicalReference": "server
|
3327
|
+
"canonicalReference": "server!ContactForceData:type"
|
3328
3328
|
},
|
3329
3329
|
{
|
3330
3330
|
"kind": "Content",
|
@@ -8434,6 +8434,103 @@
|
|
8434
8434
|
"endIndex": 4
|
8435
8435
|
}
|
8436
8436
|
},
|
8437
|
+
{
|
8438
|
+
"kind": "TypeAlias",
|
8439
|
+
"canonicalReference": "server!ContactForceData:type",
|
8440
|
+
"docComment": "/**\n * Data for contact forces.\n *\n * @public\n */\n",
|
8441
|
+
"excerptTokens": [
|
8442
|
+
{
|
8443
|
+
"kind": "Content",
|
8444
|
+
"text": "export type ContactForceData = "
|
8445
|
+
},
|
8446
|
+
{
|
8447
|
+
"kind": "Content",
|
8448
|
+
"text": "{\n totalForce: "
|
8449
|
+
},
|
8450
|
+
{
|
8451
|
+
"kind": "Reference",
|
8452
|
+
"text": "RAPIER.Vector",
|
8453
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Vector:interface"
|
8454
|
+
},
|
8455
|
+
{
|
8456
|
+
"kind": "Content",
|
8457
|
+
"text": ";\n totalForceMagnitude: number;\n maxForceDirection: "
|
8458
|
+
},
|
8459
|
+
{
|
8460
|
+
"kind": "Reference",
|
8461
|
+
"text": "RAPIER.Vector",
|
8462
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Vector:interface"
|
8463
|
+
},
|
8464
|
+
{
|
8465
|
+
"kind": "Content",
|
8466
|
+
"text": ";\n maxForceMagnitude: number;\n}"
|
8467
|
+
},
|
8468
|
+
{
|
8469
|
+
"kind": "Content",
|
8470
|
+
"text": ";"
|
8471
|
+
}
|
8472
|
+
],
|
8473
|
+
"fileUrlPath": "src/world/physics/Simulation.ts",
|
8474
|
+
"releaseTag": "Public",
|
8475
|
+
"name": "ContactForceData",
|
8476
|
+
"typeTokenRange": {
|
8477
|
+
"startIndex": 1,
|
8478
|
+
"endIndex": 6
|
8479
|
+
}
|
8480
|
+
},
|
8481
|
+
{
|
8482
|
+
"kind": "TypeAlias",
|
8483
|
+
"canonicalReference": "server!ContactManifold:type",
|
8484
|
+
"docComment": "/**\n * A contact manifold.\n *\n * @public\n */\n",
|
8485
|
+
"excerptTokens": [
|
8486
|
+
{
|
8487
|
+
"kind": "Content",
|
8488
|
+
"text": "export type ContactManifold = "
|
8489
|
+
},
|
8490
|
+
{
|
8491
|
+
"kind": "Content",
|
8492
|
+
"text": "{\n localNormalA: "
|
8493
|
+
},
|
8494
|
+
{
|
8495
|
+
"kind": "Reference",
|
8496
|
+
"text": "Vector3Like",
|
8497
|
+
"canonicalReference": "server!Vector3Like:interface"
|
8498
|
+
},
|
8499
|
+
{
|
8500
|
+
"kind": "Content",
|
8501
|
+
"text": ";\n localNormalB: "
|
8502
|
+
},
|
8503
|
+
{
|
8504
|
+
"kind": "Reference",
|
8505
|
+
"text": "Vector3Like",
|
8506
|
+
"canonicalReference": "server!Vector3Like:interface"
|
8507
|
+
},
|
8508
|
+
{
|
8509
|
+
"kind": "Content",
|
8510
|
+
"text": ";\n normal: "
|
8511
|
+
},
|
8512
|
+
{
|
8513
|
+
"kind": "Reference",
|
8514
|
+
"text": "Vector3Like",
|
8515
|
+
"canonicalReference": "server!Vector3Like:interface"
|
8516
|
+
},
|
8517
|
+
{
|
8518
|
+
"kind": "Content",
|
8519
|
+
"text": ";\n}"
|
8520
|
+
},
|
8521
|
+
{
|
8522
|
+
"kind": "Content",
|
8523
|
+
"text": ";"
|
8524
|
+
}
|
8525
|
+
],
|
8526
|
+
"fileUrlPath": "src/world/physics/Simulation.ts",
|
8527
|
+
"releaseTag": "Public",
|
8528
|
+
"name": "ContactManifold",
|
8529
|
+
"typeTokenRange": {
|
8530
|
+
"startIndex": 1,
|
8531
|
+
"endIndex": 8
|
8532
|
+
}
|
8533
|
+
},
|
8437
8534
|
{
|
8438
8535
|
"kind": "TypeAlias",
|
8439
8536
|
"canonicalReference": "server!DecodedCollisionGroups:type",
|
@@ -9812,7 +9909,7 @@
|
|
9812
9909
|
{
|
9813
9910
|
"kind": "Reference",
|
9814
9911
|
"text": "ContactForceData",
|
9815
|
-
"canonicalReference": "server
|
9912
|
+
"canonicalReference": "server!ContactForceData:type"
|
9816
9913
|
},
|
9817
9914
|
{
|
9818
9915
|
"kind": "Content",
|
@@ -9974,7 +10071,7 @@
|
|
9974
10071
|
{
|
9975
10072
|
"kind": "Reference",
|
9976
10073
|
"text": "ContactForceData",
|
9977
|
-
"canonicalReference": "server
|
10074
|
+
"canonicalReference": "server!ContactForceData:type"
|
9978
10075
|
},
|
9979
10076
|
{
|
9980
10077
|
"kind": "Content",
|
@@ -18583,6 +18680,121 @@
|
|
18583
18680
|
"endIndex": 2
|
18584
18681
|
}
|
18585
18682
|
},
|
18683
|
+
{
|
18684
|
+
"kind": "TypeAlias",
|
18685
|
+
"canonicalReference": "server!RaycastHit:type",
|
18686
|
+
"docComment": "",
|
18687
|
+
"excerptTokens": [
|
18688
|
+
{
|
18689
|
+
"kind": "Content",
|
18690
|
+
"text": "export type RaycastHit = "
|
18691
|
+
},
|
18692
|
+
{
|
18693
|
+
"kind": "Content",
|
18694
|
+
"text": "{\n hitObject: "
|
18695
|
+
},
|
18696
|
+
{
|
18697
|
+
"kind": "Reference",
|
18698
|
+
"text": "Block",
|
18699
|
+
"canonicalReference": "server!Block:class"
|
18700
|
+
},
|
18701
|
+
{
|
18702
|
+
"kind": "Content",
|
18703
|
+
"text": " | "
|
18704
|
+
},
|
18705
|
+
{
|
18706
|
+
"kind": "Reference",
|
18707
|
+
"text": "Entity",
|
18708
|
+
"canonicalReference": "server!Entity:class"
|
18709
|
+
},
|
18710
|
+
{
|
18711
|
+
"kind": "Content",
|
18712
|
+
"text": ";\n hitPoint: "
|
18713
|
+
},
|
18714
|
+
{
|
18715
|
+
"kind": "Reference",
|
18716
|
+
"text": "Vector3Like",
|
18717
|
+
"canonicalReference": "server!Vector3Like:interface"
|
18718
|
+
},
|
18719
|
+
{
|
18720
|
+
"kind": "Content",
|
18721
|
+
"text": ";\n hitDistance: number;\n}"
|
18722
|
+
},
|
18723
|
+
{
|
18724
|
+
"kind": "Content",
|
18725
|
+
"text": ";"
|
18726
|
+
}
|
18727
|
+
],
|
18728
|
+
"fileUrlPath": "src/world/physics/Simulation.ts",
|
18729
|
+
"releaseTag": "Public",
|
18730
|
+
"name": "RaycastHit",
|
18731
|
+
"typeTokenRange": {
|
18732
|
+
"startIndex": 1,
|
18733
|
+
"endIndex": 8
|
18734
|
+
}
|
18735
|
+
},
|
18736
|
+
{
|
18737
|
+
"kind": "TypeAlias",
|
18738
|
+
"canonicalReference": "server!RaycastOptions:type",
|
18739
|
+
"docComment": "/**\n * Options for raycasting.\n *\n * @public\n */\n",
|
18740
|
+
"excerptTokens": [
|
18741
|
+
{
|
18742
|
+
"kind": "Content",
|
18743
|
+
"text": "export type RaycastOptions = "
|
18744
|
+
},
|
18745
|
+
{
|
18746
|
+
"kind": "Content",
|
18747
|
+
"text": "{\n ignoresSensors?: boolean;\n filterFlags?: "
|
18748
|
+
},
|
18749
|
+
{
|
18750
|
+
"kind": "Reference",
|
18751
|
+
"text": "RAPIER.QueryFilterFlags",
|
18752
|
+
"canonicalReference": "@dimforge/rapier3d-compat!QueryFilterFlags:enum"
|
18753
|
+
},
|
18754
|
+
{
|
18755
|
+
"kind": "Content",
|
18756
|
+
"text": ";\n filterGroups?: number;\n filterExcludeCollider?: "
|
18757
|
+
},
|
18758
|
+
{
|
18759
|
+
"kind": "Reference",
|
18760
|
+
"text": "RAPIER.Collider",
|
18761
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Collider:class"
|
18762
|
+
},
|
18763
|
+
{
|
18764
|
+
"kind": "Content",
|
18765
|
+
"text": ";\n filterExcludeRigidBody?: "
|
18766
|
+
},
|
18767
|
+
{
|
18768
|
+
"kind": "Reference",
|
18769
|
+
"text": "RAPIER.RigidBody",
|
18770
|
+
"canonicalReference": "@dimforge/rapier3d-compat!RigidBody:class"
|
18771
|
+
},
|
18772
|
+
{
|
18773
|
+
"kind": "Content",
|
18774
|
+
"text": ";\n filterPredicate?: (collider: "
|
18775
|
+
},
|
18776
|
+
{
|
18777
|
+
"kind": "Reference",
|
18778
|
+
"text": "RAPIER.Collider",
|
18779
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Collider:class"
|
18780
|
+
},
|
18781
|
+
{
|
18782
|
+
"kind": "Content",
|
18783
|
+
"text": ") => boolean;\n}"
|
18784
|
+
},
|
18785
|
+
{
|
18786
|
+
"kind": "Content",
|
18787
|
+
"text": ";"
|
18788
|
+
}
|
18789
|
+
],
|
18790
|
+
"fileUrlPath": "src/world/physics/Simulation.ts",
|
18791
|
+
"releaseTag": "Public",
|
18792
|
+
"name": "RaycastOptions",
|
18793
|
+
"typeTokenRange": {
|
18794
|
+
"startIndex": 1,
|
18795
|
+
"endIndex": 10
|
18796
|
+
}
|
18797
|
+
},
|
18586
18798
|
{
|
18587
18799
|
"kind": "Interface",
|
18588
18800
|
"canonicalReference": "server!RgbColor:interface",
|
@@ -22685,119 +22897,6 @@
|
|
22685
22897
|
"name": "Simulation",
|
22686
22898
|
"preserveMemberOrder": false,
|
22687
22899
|
"members": [
|
22688
|
-
{
|
22689
|
-
"kind": "Method",
|
22690
|
-
"canonicalReference": "server!Simulation#castRay:member(1)",
|
22691
|
-
"docComment": "/**\n * Casts a ray through the simulation.\n *\n * @param origin - The origin of the ray.\n *\n * @param direction - The direction of the ray.\n *\n * @param length - The length of the ray.\n *\n * @param options - The options for the raycast.\n *\n * @returns The first block or entity hit by the ray, or null if no hit.\n */\n",
|
22692
|
-
"excerptTokens": [
|
22693
|
-
{
|
22694
|
-
"kind": "Content",
|
22695
|
-
"text": "castRay(origin: "
|
22696
|
-
},
|
22697
|
-
{
|
22698
|
-
"kind": "Reference",
|
22699
|
-
"text": "RAPIER.Vector3",
|
22700
|
-
"canonicalReference": "@dimforge/rapier3d-compat!Vector3:class"
|
22701
|
-
},
|
22702
|
-
{
|
22703
|
-
"kind": "Content",
|
22704
|
-
"text": ", direction: "
|
22705
|
-
},
|
22706
|
-
{
|
22707
|
-
"kind": "Reference",
|
22708
|
-
"text": "RAPIER.Vector3",
|
22709
|
-
"canonicalReference": "@dimforge/rapier3d-compat!Vector3:class"
|
22710
|
-
},
|
22711
|
-
{
|
22712
|
-
"kind": "Content",
|
22713
|
-
"text": ", length: "
|
22714
|
-
},
|
22715
|
-
{
|
22716
|
-
"kind": "Content",
|
22717
|
-
"text": "number"
|
22718
|
-
},
|
22719
|
-
{
|
22720
|
-
"kind": "Content",
|
22721
|
-
"text": ", options?: "
|
22722
|
-
},
|
22723
|
-
{
|
22724
|
-
"kind": "Reference",
|
22725
|
-
"text": "RayCastOptions",
|
22726
|
-
"canonicalReference": "server!~RayCastOptions:type"
|
22727
|
-
},
|
22728
|
-
{
|
22729
|
-
"kind": "Content",
|
22730
|
-
"text": "): "
|
22731
|
-
},
|
22732
|
-
{
|
22733
|
-
"kind": "Reference",
|
22734
|
-
"text": "Block",
|
22735
|
-
"canonicalReference": "server!Block:class"
|
22736
|
-
},
|
22737
|
-
{
|
22738
|
-
"kind": "Content",
|
22739
|
-
"text": " | "
|
22740
|
-
},
|
22741
|
-
{
|
22742
|
-
"kind": "Reference",
|
22743
|
-
"text": "Entity",
|
22744
|
-
"canonicalReference": "server!Entity:class"
|
22745
|
-
},
|
22746
|
-
{
|
22747
|
-
"kind": "Content",
|
22748
|
-
"text": " | null"
|
22749
|
-
},
|
22750
|
-
{
|
22751
|
-
"kind": "Content",
|
22752
|
-
"text": ";"
|
22753
|
-
}
|
22754
|
-
],
|
22755
|
-
"isStatic": false,
|
22756
|
-
"returnTypeTokenRange": {
|
22757
|
-
"startIndex": 9,
|
22758
|
-
"endIndex": 13
|
22759
|
-
},
|
22760
|
-
"releaseTag": "Public",
|
22761
|
-
"isProtected": false,
|
22762
|
-
"overloadIndex": 1,
|
22763
|
-
"parameters": [
|
22764
|
-
{
|
22765
|
-
"parameterName": "origin",
|
22766
|
-
"parameterTypeTokenRange": {
|
22767
|
-
"startIndex": 1,
|
22768
|
-
"endIndex": 2
|
22769
|
-
},
|
22770
|
-
"isOptional": false
|
22771
|
-
},
|
22772
|
-
{
|
22773
|
-
"parameterName": "direction",
|
22774
|
-
"parameterTypeTokenRange": {
|
22775
|
-
"startIndex": 3,
|
22776
|
-
"endIndex": 4
|
22777
|
-
},
|
22778
|
-
"isOptional": false
|
22779
|
-
},
|
22780
|
-
{
|
22781
|
-
"parameterName": "length",
|
22782
|
-
"parameterTypeTokenRange": {
|
22783
|
-
"startIndex": 5,
|
22784
|
-
"endIndex": 6
|
22785
|
-
},
|
22786
|
-
"isOptional": false
|
22787
|
-
},
|
22788
|
-
{
|
22789
|
-
"parameterName": "options",
|
22790
|
-
"parameterTypeTokenRange": {
|
22791
|
-
"startIndex": 7,
|
22792
|
-
"endIndex": 8
|
22793
|
-
},
|
22794
|
-
"isOptional": true
|
22795
|
-
}
|
22796
|
-
],
|
22797
|
-
"isOptional": false,
|
22798
|
-
"isAbstract": false,
|
22799
|
-
"name": "castRay"
|
22800
|
-
},
|
22801
22900
|
{
|
22802
22901
|
"kind": "Method",
|
22803
22902
|
"canonicalReference": "server!Simulation#enableDebugRaycasting:member(1)",
|
@@ -22924,7 +23023,7 @@
|
|
22924
23023
|
{
|
22925
23024
|
"kind": "Reference",
|
22926
23025
|
"text": "ContactManifold",
|
22927
|
-
"canonicalReference": "server
|
23026
|
+
"canonicalReference": "server!ContactManifold:type"
|
22928
23027
|
},
|
22929
23028
|
{
|
22930
23029
|
"kind": "Content",
|
@@ -23056,6 +23155,110 @@
|
|
23056
23155
|
"isProtected": false,
|
23057
23156
|
"isAbstract": false
|
23058
23157
|
},
|
23158
|
+
{
|
23159
|
+
"kind": "Method",
|
23160
|
+
"canonicalReference": "server!Simulation#raycast:member(1)",
|
23161
|
+
"docComment": "/**\n * Casts a ray through the simulation.\n *\n * @remarks\n *\n * The cast ray will stop at the the first block or entity hit within the length of the ray.\n *\n * @param origin - The origin of the ray.\n *\n * @param direction - The direction of the ray.\n *\n * @param length - The length of the ray.\n *\n * @param options - The options for the raycast.\n *\n * @returns A RaycastHit object containing the first block or entity hit by the ray, or null if no hit.\n */\n",
|
23162
|
+
"excerptTokens": [
|
23163
|
+
{
|
23164
|
+
"kind": "Content",
|
23165
|
+
"text": "raycast(origin: "
|
23166
|
+
},
|
23167
|
+
{
|
23168
|
+
"kind": "Reference",
|
23169
|
+
"text": "RAPIER.Vector3",
|
23170
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Vector3:class"
|
23171
|
+
},
|
23172
|
+
{
|
23173
|
+
"kind": "Content",
|
23174
|
+
"text": ", direction: "
|
23175
|
+
},
|
23176
|
+
{
|
23177
|
+
"kind": "Reference",
|
23178
|
+
"text": "RAPIER.Vector3",
|
23179
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Vector3:class"
|
23180
|
+
},
|
23181
|
+
{
|
23182
|
+
"kind": "Content",
|
23183
|
+
"text": ", length: "
|
23184
|
+
},
|
23185
|
+
{
|
23186
|
+
"kind": "Content",
|
23187
|
+
"text": "number"
|
23188
|
+
},
|
23189
|
+
{
|
23190
|
+
"kind": "Content",
|
23191
|
+
"text": ", options?: "
|
23192
|
+
},
|
23193
|
+
{
|
23194
|
+
"kind": "Reference",
|
23195
|
+
"text": "RaycastOptions",
|
23196
|
+
"canonicalReference": "server!RaycastOptions:type"
|
23197
|
+
},
|
23198
|
+
{
|
23199
|
+
"kind": "Content",
|
23200
|
+
"text": "): "
|
23201
|
+
},
|
23202
|
+
{
|
23203
|
+
"kind": "Reference",
|
23204
|
+
"text": "RaycastHit",
|
23205
|
+
"canonicalReference": "server!RaycastHit:type"
|
23206
|
+
},
|
23207
|
+
{
|
23208
|
+
"kind": "Content",
|
23209
|
+
"text": " | null"
|
23210
|
+
},
|
23211
|
+
{
|
23212
|
+
"kind": "Content",
|
23213
|
+
"text": ";"
|
23214
|
+
}
|
23215
|
+
],
|
23216
|
+
"isStatic": false,
|
23217
|
+
"returnTypeTokenRange": {
|
23218
|
+
"startIndex": 9,
|
23219
|
+
"endIndex": 11
|
23220
|
+
},
|
23221
|
+
"releaseTag": "Public",
|
23222
|
+
"isProtected": false,
|
23223
|
+
"overloadIndex": 1,
|
23224
|
+
"parameters": [
|
23225
|
+
{
|
23226
|
+
"parameterName": "origin",
|
23227
|
+
"parameterTypeTokenRange": {
|
23228
|
+
"startIndex": 1,
|
23229
|
+
"endIndex": 2
|
23230
|
+
},
|
23231
|
+
"isOptional": false
|
23232
|
+
},
|
23233
|
+
{
|
23234
|
+
"parameterName": "direction",
|
23235
|
+
"parameterTypeTokenRange": {
|
23236
|
+
"startIndex": 3,
|
23237
|
+
"endIndex": 4
|
23238
|
+
},
|
23239
|
+
"isOptional": false
|
23240
|
+
},
|
23241
|
+
{
|
23242
|
+
"parameterName": "length",
|
23243
|
+
"parameterTypeTokenRange": {
|
23244
|
+
"startIndex": 5,
|
23245
|
+
"endIndex": 6
|
23246
|
+
},
|
23247
|
+
"isOptional": false
|
23248
|
+
},
|
23249
|
+
{
|
23250
|
+
"parameterName": "options",
|
23251
|
+
"parameterTypeTokenRange": {
|
23252
|
+
"startIndex": 7,
|
23253
|
+
"endIndex": 8
|
23254
|
+
},
|
23255
|
+
"isOptional": true
|
23256
|
+
}
|
23257
|
+
],
|
23258
|
+
"isOptional": false,
|
23259
|
+
"isAbstract": false,
|
23260
|
+
"name": "raycast"
|
23261
|
+
},
|
23059
23262
|
{
|
23060
23263
|
"kind": "Method",
|
23061
23264
|
"canonicalReference": "server!Simulation#setGravity:member(1)",
|
package/server.d.ts
CHANGED
@@ -296,8 +296,7 @@ export declare abstract class BaseCharacterController {
|
|
296
296
|
onTick?: (deltaTimeMs: number) => void;
|
297
297
|
/**
|
298
298
|
* A callback function for when the controller ticks
|
299
|
-
* player movement.
|
300
|
-
* PlayerEntity with a character controller.
|
299
|
+
* player movement.
|
301
300
|
* @param input - The current input state of the player.
|
302
301
|
* @param cameraOrientation - The current camera orientation state of the player.
|
303
302
|
* @param deltaTimeMs - The delta time in milliseconds since the last tick.
|
@@ -317,6 +316,8 @@ export declare abstract class BaseCharacterController {
|
|
317
316
|
/**
|
318
317
|
* Override this method to handle entity movements
|
319
318
|
* based on player input for your character controller.
|
319
|
+
* This is called every tick by a PlayerEntity with a
|
320
|
+
* character controller.
|
320
321
|
* @param input - The current input state of the player.
|
321
322
|
* @param cameraOrientation - The current camera orientation state of the player.
|
322
323
|
* @param deltaTimeMs - The delta time in milliseconds since the last tick.
|
@@ -1120,7 +1121,7 @@ export declare class CollisionGroupsBuilder {
|
|
1120
1121
|
export declare type CommandCallback = (player: Player, args: string[], message: string) => void;
|
1121
1122
|
|
1122
1123
|
/** Data for contact forces. @public */
|
1123
|
-
declare type ContactForceData = {
|
1124
|
+
export declare type ContactForceData = {
|
1124
1125
|
/** The total force vector. */
|
1125
1126
|
totalForce: RAPIER.Vector;
|
1126
1127
|
/** The magnitude of the total force. */
|
@@ -1132,7 +1133,7 @@ declare type ContactForceData = {
|
|
1132
1133
|
};
|
1133
1134
|
|
1134
1135
|
/** A contact manifold. @public */
|
1135
|
-
declare type ContactManifold = {
|
1136
|
+
export declare type ContactManifold = {
|
1136
1137
|
/** The local normal vector of the first collider. */
|
1137
1138
|
localNormalA: Vector3Like;
|
1138
1139
|
/** The local normal vector of the second collider. */
|
@@ -2432,8 +2433,17 @@ export declare interface QuaternionLike {
|
|
2432
2433
|
/** A raw set of collision groups represented as a 32-bit number. @public */
|
2433
2434
|
export declare type RawCollisionGroups = RAPIER.InteractionGroups;
|
2434
2435
|
|
2436
|
+
export declare type RaycastHit = {
|
2437
|
+
/** The block or entity the raycast hit. */
|
2438
|
+
hitObject: Block | Entity;
|
2439
|
+
/** The point in global coordinate space the raycast hit the object. */
|
2440
|
+
hitPoint: Vector3Like;
|
2441
|
+
/** The distance from origin where the raycast hit. */
|
2442
|
+
hitDistance: number;
|
2443
|
+
};
|
2444
|
+
|
2435
2445
|
/** Options for raycasting. @public */
|
2436
|
-
declare type
|
2446
|
+
export declare type RaycastOptions = {
|
2437
2447
|
/** Whether to ignore sensor colliders. */
|
2438
2448
|
ignoresSensors?: boolean;
|
2439
2449
|
/** The query filter flags. */
|
@@ -3003,13 +3013,18 @@ export declare class Simulation {
|
|
3003
3013
|
get world(): World;
|
3004
3014
|
/**
|
3005
3015
|
* Casts a ray through the simulation.
|
3016
|
+
*
|
3017
|
+
* @remarks
|
3018
|
+
* The cast ray will stop at the the first block or
|
3019
|
+
* entity hit within the length of the ray.
|
3020
|
+
*
|
3006
3021
|
* @param origin - The origin of the ray.
|
3007
3022
|
* @param direction - The direction of the ray.
|
3008
3023
|
* @param length - The length of the ray.
|
3009
3024
|
* @param options - The options for the raycast.
|
3010
|
-
* @returns
|
3025
|
+
* @returns A RaycastHit object containing the first block or entity hit by the ray, or null if no hit.
|
3011
3026
|
*/
|
3012
|
-
|
3027
|
+
raycast(origin: RAPIER.Vector3, direction: RAPIER.Vector3, length: number, options?: RaycastOptions): RaycastHit | null;
|
3013
3028
|
|
3014
3029
|
|
3015
3030
|
/**
|