hytopia 0.1.36 → 0.1.38
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.audio.md +1 -1
- package/docs/server.audio.position.md +1 -1
- package/docs/server.audio.setposition.md +2 -2
- package/docs/server.audioeventpayload.setposition.md +1 -1
- package/docs/server.audioeventpayload.setposition.position.md +1 -1
- package/docs/server.audiooptions.md +1 -1
- package/docs/server.audiooptions.position.md +1 -1
- package/docs/server.block.globalcoordinate.md +1 -1
- package/docs/server.block.md +1 -1
- package/docs/server.chunk.blockindextolocalcoordinate.md +2 -2
- package/docs/server.chunk.getblock.md +2 -2
- package/docs/server.chunk.globalcoordinatetolocalcoordinate.md +3 -3
- package/docs/server.chunk.globalcoordinatetoorigincoordinate.md +3 -3
- package/docs/server.chunk.hasblock.md +2 -2
- package/docs/server.chunk.isvalidorigincoordinate.md +2 -2
- package/docs/server.chunk.md +1 -1
- package/docs/server.chunk.origincoordinate.md +1 -1
- package/docs/server.chunk.setblock.md +2 -2
- package/docs/server.chunk.spawn.md +2 -2
- package/docs/server.chunkeventpayload.setblock.globalcoordinate.md +1 -1
- package/docs/server.chunkeventpayload.setblock.localcoordinate.md +1 -1
- package/docs/server.chunkeventpayload.setblock.md +2 -2
- package/docs/server.chunklattice.getblock.md +2 -2
- package/docs/server.chunklattice.getchunk.md +2 -2
- package/docs/server.chunklattice.hasblock.md +2 -2
- package/docs/server.chunklattice.haschunk.md +2 -2
- package/docs/server.chunklattice.setblock.md +2 -2
- package/docs/server.collider.getrelativerotation.md +2 -2
- package/docs/server.collider.getrelativetranslation.md +2 -2
- package/docs/server.collider.setrelativerotation.md +2 -2
- package/docs/server.collider.setrelativetranslation.md +2 -2
- package/docs/server.collideroptions.halfextents.md +1 -1
- package/docs/server.collideroptions.md +3 -3
- package/docs/server.collideroptions.relativerotation.md +1 -1
- package/docs/server.collideroptions.relativetranslation.md +1 -1
- package/docs/server.entity.blockhalfextents.md +1 -1
- package/docs/server.entity.md +36 -1
- package/docs/server.entity.modelhiddennodes.md +13 -0
- package/docs/server.entity.setmodelhiddennodes.md +53 -0
- package/docs/server.entity.spawn.md +2 -2
- package/docs/server.entityeventpayload.md +9 -0
- package/docs/server.entityeventpayload.setmodelhiddennodes.entity.md +11 -0
- package/docs/server.entityeventpayload.setmodelhiddennodes.md +70 -0
- package/docs/server.entityeventpayload.setmodelhiddennodes.modelhiddennodes.md +11 -0
- package/docs/server.entityeventpayload.updaterotation.md +1 -1
- package/docs/server.entityeventpayload.updaterotation.rotation.md +1 -1
- package/docs/server.entityeventpayload.updatetranslation.md +1 -1
- package/docs/server.entityeventpayload.updatetranslation.translation.md +1 -1
- package/docs/server.entityeventtype.md +14 -0
- package/docs/server.entityoptions.blockhalfextents.md +1 -1
- package/docs/server.entityoptions.md +20 -1
- package/docs/server.entityoptions.modelhiddennodes.md +13 -0
- package/docs/server.facecallback.md +2 -2
- package/docs/server.facecompletecallback.md +2 -2
- package/docs/server.hytopia.audio.md +1 -1
- package/docs/server.hytopia.audio.position.md +1 -1
- package/docs/server.hytopia.audio.setposition.md +2 -2
- package/docs/server.hytopia.audioeventpayload.setposition.md +1 -1
- package/docs/server.hytopia.audioeventpayload.setposition.position.md +1 -1
- package/docs/server.hytopia.audiooptions.md +1 -1
- package/docs/server.hytopia.audiooptions.position.md +1 -1
- package/docs/server.hytopia.block.globalcoordinate.md +1 -1
- package/docs/server.hytopia.block.md +1 -1
- package/docs/server.hytopia.chunk.blockindextolocalcoordinate.md +2 -2
- package/docs/server.hytopia.chunk.getblock.md +2 -2
- package/docs/server.hytopia.chunk.globalcoordinatetolocalcoordinate.md +3 -3
- package/docs/server.hytopia.chunk.globalcoordinatetoorigincoordinate.md +3 -3
- package/docs/server.hytopia.chunk.hasblock.md +2 -2
- package/docs/server.hytopia.chunk.isvalidorigincoordinate.md +2 -2
- package/docs/server.hytopia.chunk.md +1 -1
- package/docs/server.hytopia.chunk.origincoordinate.md +1 -1
- package/docs/server.hytopia.chunk.setblock.md +2 -2
- package/docs/server.hytopia.chunk.spawn.md +2 -2
- package/docs/server.hytopia.chunkeventpayload.setblock.globalcoordinate.md +1 -1
- package/docs/server.hytopia.chunkeventpayload.setblock.localcoordinate.md +1 -1
- package/docs/server.hytopia.chunkeventpayload.setblock.md +2 -2
- package/docs/server.hytopia.chunklattice.getblock.md +2 -2
- package/docs/server.hytopia.chunklattice.getchunk.md +2 -2
- package/docs/server.hytopia.chunklattice.hasblock.md +2 -2
- package/docs/server.hytopia.chunklattice.haschunk.md +2 -2
- package/docs/server.hytopia.chunklattice.setblock.md +2 -2
- package/docs/server.hytopia.collider.getrelativerotation.md +2 -2
- package/docs/server.hytopia.collider.getrelativetranslation.md +2 -2
- package/docs/server.hytopia.collider.setrelativerotation.md +2 -2
- package/docs/server.hytopia.collider.setrelativetranslation.md +2 -2
- package/docs/server.hytopia.collideroptions.halfextents.md +1 -1
- package/docs/server.hytopia.collideroptions.md +3 -3
- package/docs/server.hytopia.collideroptions.relativerotation.md +1 -1
- package/docs/server.hytopia.collideroptions.relativetranslation.md +1 -1
- package/docs/server.hytopia.entity.blockhalfextents.md +1 -1
- package/docs/server.hytopia.entity.md +36 -1
- package/docs/server.hytopia.entity.modelhiddennodes.md +13 -0
- package/docs/server.hytopia.entity.setmodelhiddennodes.md +53 -0
- package/docs/server.hytopia.entity.spawn.md +2 -2
- package/docs/server.hytopia.entityeventpayload.md +9 -0
- package/docs/server.hytopia.entityeventpayload.setmodelhiddennodes.entity.md +11 -0
- package/docs/server.hytopia.entityeventpayload.setmodelhiddennodes.md +70 -0
- package/docs/server.hytopia.entityeventpayload.setmodelhiddennodes.modelhiddennodes.md +11 -0
- package/docs/server.hytopia.entityeventpayload.updaterotation.md +1 -1
- package/docs/server.hytopia.entityeventpayload.updaterotation.rotation.md +1 -1
- package/docs/server.hytopia.entityeventpayload.updatetranslation.md +1 -1
- package/docs/server.hytopia.entityeventpayload.updatetranslation.translation.md +1 -1
- package/docs/server.hytopia.entityeventtype.md +14 -0
- package/docs/server.hytopia.entityoptions.blockhalfextents.md +1 -1
- package/docs/server.hytopia.entityoptions.md +20 -1
- package/docs/server.hytopia.entityoptions.modelhiddennodes.md +13 -0
- package/docs/server.hytopia.facecallback.md +2 -2
- package/docs/server.hytopia.facecompletecallback.md +2 -2
- package/docs/server.hytopia.md +32 -10
- package/docs/server.hytopia.movecallback.md +2 -2
- package/docs/server.hytopia.movecompletecallback.md +2 -2
- package/docs/server.hytopia.playercamera.attachedtoposition.md +1 -1
- package/docs/server.hytopia.playercamera.lookatposition.md +2 -2
- package/docs/server.hytopia.playercamera.md +13 -13
- package/docs/{server.hytopia.playercamera.hiddenmodelnodes.md → server.hytopia.playercamera.modelhiddennodes.md} +3 -3
- package/docs/server.hytopia.playercamera.offset.md +1 -1
- package/docs/server.hytopia.playercamera.setattachedtoposition.md +2 -2
- package/docs/{server.hytopia.playercamera.sethiddenmodelnodes.md → server.hytopia.playercamera.setmodelhiddennodes.md} +4 -4
- package/docs/server.hytopia.playercamera.setoffset.md +2 -2
- package/docs/server.hytopia.playercamera.settrackedposition.md +2 -2
- package/docs/server.hytopia.playercamera.trackedposition.md +1 -1
- package/docs/server.hytopia.playercameraeventpayload.lookatposition.md +1 -1
- package/docs/server.hytopia.playercameraeventpayload.lookatposition.position.md +1 -1
- package/docs/server.hytopia.playercameraeventpayload.md +2 -2
- package/docs/server.hytopia.playercameraeventpayload.setattachedtoposition.md +1 -1
- package/docs/server.hytopia.playercameraeventpayload.setattachedtoposition.position.md +1 -1
- package/docs/{server.hytopia.playercameraeventpayload.sethiddenmodelnodes.md → server.hytopia.playercameraeventpayload.setmodelhiddennodes.md} +6 -6
- package/docs/server.hytopia.playercameraeventpayload.setmodelhiddennodes.modelhiddennodes.md +11 -0
- package/docs/server.hytopia.playercameraeventpayload.setmodelhiddennodes.playercamera.md +11 -0
- package/docs/server.hytopia.playercameraeventpayload.setoffset.md +1 -1
- package/docs/server.hytopia.playercameraeventpayload.setoffset.offset.md +1 -1
- package/docs/server.hytopia.playercameraeventpayload.settrackedposition.md +1 -1
- package/docs/server.hytopia.playercameraeventpayload.settrackedposition.position.md +1 -1
- package/docs/server.hytopia.playercameraeventtype.md +4 -4
- package/docs/server.hytopia.quaternion._constructor_.md +89 -0
- package/docs/server.hytopia.quaternion.clone.md +19 -0
- package/docs/server.hytopia.quaternion.conjugate.md +19 -0
- package/docs/server.hytopia.quaternion.copy.md +53 -0
- package/docs/server.hytopia.quaternion.dot.md +53 -0
- package/docs/server.hytopia.quaternion.equals.md +53 -0
- package/docs/server.hytopia.quaternion.exactequals.md +53 -0
- package/docs/server.hytopia.quaternion.exponential.md +19 -0
- package/docs/server.hytopia.quaternion.fromeuler.md +85 -0
- package/docs/server.hytopia.quaternion.fromquaternionlike.md +53 -0
- package/docs/server.hytopia.quaternion.getangle.md +53 -0
- package/docs/server.hytopia.quaternion.invert.md +19 -0
- package/docs/server.hytopia.quaternion.lerp.md +69 -0
- package/docs/server.hytopia.quaternion.magnitude.md +13 -0
- package/docs/server.hytopia.quaternion.md +501 -0
- package/docs/server.hytopia.quaternion.multiply.md +53 -0
- package/docs/server.hytopia.quaternion.normalize.md +19 -0
- package/docs/server.hytopia.quaternion.rotatex.md +55 -0
- package/docs/server.hytopia.quaternion.rotatey.md +55 -0
- package/docs/server.hytopia.quaternion.rotatez.md +55 -0
- package/docs/server.hytopia.quaternion.scale.md +55 -0
- package/docs/server.hytopia.quaternion.slerp.md +71 -0
- package/docs/server.hytopia.quaternion.squaredmagnitude.md +13 -0
- package/docs/server.hytopia.quaternion.tostring.md +19 -0
- package/docs/server.hytopia.quaternion.w.md +15 -0
- package/docs/server.hytopia.quaternion.x.md +15 -0
- package/docs/server.hytopia.quaternion.y.md +15 -0
- package/docs/server.hytopia.quaternion.z.md +15 -0
- package/docs/{server.hytopia.rotation.md → server.hytopia.quaternionlike.md} +8 -8
- package/docs/{server.hytopia.rotation.w.md → server.hytopia.quaternionlike.w.md} +2 -2
- package/docs/server.hytopia.quaternionlike.x.md +11 -0
- package/docs/server.hytopia.quaternionlike.y.md +11 -0
- package/docs/server.hytopia.quaternionlike.z.md +11 -0
- package/docs/server.hytopia.rigidbody.addforce.md +2 -2
- package/docs/server.hytopia.rigidbody.addtorque.md +2 -2
- package/docs/server.hytopia.rigidbody.applyimpulse.md +2 -2
- package/docs/server.hytopia.rigidbody.applyimpulseatpoint.md +3 -3
- package/docs/server.hytopia.rigidbody.applytorqueimpulse.md +2 -2
- package/docs/server.hytopia.rigidbody.getangularvelocity.md +2 -2
- package/docs/server.hytopia.rigidbody.getdirectionfromrotation.md +2 -2
- package/docs/server.hytopia.rigidbody.geteffectiveinversemass.md +2 -2
- package/docs/server.hytopia.rigidbody.getinverseprincipalangularinertiasqrt.md +2 -2
- package/docs/server.hytopia.rigidbody.getlinearvelocity.md +2 -2
- package/docs/server.hytopia.rigidbody.getlocalcenterofmass.md +2 -2
- package/docs/server.hytopia.rigidbody.getnextkinematicrotation.md +2 -2
- package/docs/server.hytopia.rigidbody.getnextkinematictranslation.md +2 -2
- package/docs/server.hytopia.rigidbody.getprincipalangularinertia.md +2 -2
- package/docs/server.hytopia.rigidbody.getprincipalangularinertialocalframe.md +2 -2
- package/docs/server.hytopia.rigidbody.getrotation.md +2 -2
- package/docs/server.hytopia.rigidbody.gettranslation.md +2 -2
- package/docs/server.hytopia.rigidbody.getworldcenterofmass.md +2 -2
- package/docs/server.hytopia.rigidbody.setangularvelocity.md +2 -2
- package/docs/server.hytopia.rigidbody.setlinearvelocity.md +2 -2
- package/docs/server.hytopia.rigidbody.setnextkinematicrotation.md +2 -2
- package/docs/server.hytopia.rigidbody.setnextkinematictranslation.md +2 -2
- package/docs/server.hytopia.rigidbody.setrotation.md +2 -2
- package/docs/server.hytopia.rigidbody.settranslation.md +2 -2
- package/docs/server.hytopia.rigidbodyadditionalmassproperties.md +4 -4
- package/docs/server.hytopia.rigidbodyoptions.angularvelocity.md +1 -1
- package/docs/server.hytopia.rigidbodyoptions.linearvelocity.md +1 -1
- package/docs/server.hytopia.rigidbodyoptions.md +4 -4
- package/docs/server.hytopia.rigidbodyoptions.rotation.md +1 -1
- package/docs/server.hytopia.rigidbodyoptions.translation.md +1 -1
- package/docs/server.hytopia.simplecharactercontroller.face.md +2 -2
- package/docs/server.hytopia.simplecharactercontroller.move.md +2 -2
- package/docs/server.hytopia.vector3._constructor_.md +75 -0
- package/docs/server.hytopia.vector3.add.md +55 -0
- package/docs/server.hytopia.vector3.ceil.md +19 -0
- package/docs/server.hytopia.vector3.clone.md +19 -0
- package/docs/server.hytopia.vector3.copy.md +55 -0
- package/docs/server.hytopia.vector3.cross.md +55 -0
- package/docs/server.hytopia.vector3.distance.md +55 -0
- package/docs/server.hytopia.vector3.divide.md +55 -0
- package/docs/server.hytopia.vector3.equals.md +55 -0
- package/docs/server.hytopia.vector3.exactequals.md +55 -0
- package/docs/server.hytopia.vector3.floor.md +19 -0
- package/docs/server.hytopia.vector3.fromvector3like.md +55 -0
- package/docs/server.hytopia.vector3.invert.md +19 -0
- package/docs/server.hytopia.vector3.lerp.md +71 -0
- package/docs/server.hytopia.vector3.magnitude.md +13 -0
- package/docs/server.hytopia.vector3.max.md +55 -0
- package/docs/server.hytopia.vector3.md +464 -3
- package/docs/server.hytopia.vector3.min.md +55 -0
- package/docs/server.hytopia.vector3.multiply.md +55 -0
- package/docs/server.hytopia.vector3.negate.md +19 -0
- package/docs/server.hytopia.vector3.normalize.md +19 -0
- package/docs/server.hytopia.vector3.rotatex.md +71 -0
- package/docs/server.hytopia.vector3.rotatey.md +71 -0
- package/docs/server.hytopia.vector3.rotatez.md +71 -0
- package/docs/server.hytopia.vector3.round.md +19 -0
- package/docs/server.hytopia.vector3.scale.md +55 -0
- package/docs/server.hytopia.vector3.squaredmagnitude.md +13 -0
- package/docs/server.hytopia.vector3.subtract.md +55 -0
- package/docs/server.hytopia.vector3.tostring.md +19 -0
- package/docs/server.hytopia.vector3.x.md +5 -1
- package/docs/server.hytopia.vector3.y.md +5 -1
- package/docs/server.hytopia.vector3.z.md +5 -1
- package/docs/server.hytopia.vector3like.md +89 -0
- package/docs/{server.hytopia.rotation.x.md → server.hytopia.vector3like.x.md} +2 -2
- package/docs/{server.hytopia.rotation.y.md → server.hytopia.vector3like.y.md} +2 -2
- package/docs/{server.hytopia.rotation.z.md → server.hytopia.vector3like.z.md} +2 -2
- package/docs/server.hytopia.worldoptions.gravity.md +1 -1
- package/docs/server.hytopia.worldoptions.md +1 -1
- package/docs/server.md +32 -10
- package/docs/server.movecallback.md +2 -2
- package/docs/server.movecompletecallback.md +2 -2
- package/docs/server.playercamera.attachedtoposition.md +1 -1
- package/docs/server.playercamera.lookatposition.md +2 -2
- package/docs/server.playercamera.md +13 -13
- package/docs/{server.playercamera.hiddenmodelnodes.md → server.playercamera.modelhiddennodes.md} +3 -3
- package/docs/server.playercamera.offset.md +1 -1
- package/docs/server.playercamera.setattachedtoposition.md +2 -2
- package/docs/{server.playercamera.sethiddenmodelnodes.md → server.playercamera.setmodelhiddennodes.md} +4 -4
- package/docs/server.playercamera.setoffset.md +2 -2
- package/docs/server.playercamera.settrackedposition.md +2 -2
- package/docs/server.playercamera.trackedposition.md +1 -1
- package/docs/server.playercameraeventpayload.lookatposition.md +1 -1
- package/docs/server.playercameraeventpayload.lookatposition.position.md +1 -1
- package/docs/server.playercameraeventpayload.md +2 -2
- package/docs/server.playercameraeventpayload.setattachedtoposition.md +1 -1
- package/docs/server.playercameraeventpayload.setattachedtoposition.position.md +1 -1
- package/docs/{server.playercameraeventpayload.sethiddenmodelnodes.md → server.playercameraeventpayload.setmodelhiddennodes.md} +6 -6
- package/docs/server.playercameraeventpayload.setmodelhiddennodes.modelhiddennodes.md +11 -0
- package/docs/{server.playercameraeventpayload.sethiddenmodelnodes.playercamera.md → server.playercameraeventpayload.setmodelhiddennodes.playercamera.md} +2 -2
- package/docs/server.playercameraeventpayload.setoffset.md +1 -1
- package/docs/server.playercameraeventpayload.setoffset.offset.md +1 -1
- package/docs/server.playercameraeventpayload.settrackedposition.md +1 -1
- package/docs/server.playercameraeventpayload.settrackedposition.position.md +1 -1
- package/docs/server.playercameraeventtype.md +4 -4
- package/docs/server.quaternion._constructor_.md +89 -0
- package/docs/server.quaternion.clone.md +19 -0
- package/docs/server.quaternion.conjugate.md +19 -0
- package/docs/server.quaternion.copy.md +53 -0
- package/docs/server.quaternion.dot.md +53 -0
- package/docs/server.quaternion.equals.md +53 -0
- package/docs/server.quaternion.exactequals.md +53 -0
- package/docs/server.quaternion.exponential.md +19 -0
- package/docs/server.quaternion.fromeuler.md +85 -0
- package/docs/server.quaternion.fromquaternionlike.md +53 -0
- package/docs/server.quaternion.getangle.md +53 -0
- package/docs/server.quaternion.invert.md +19 -0
- package/docs/server.quaternion.lerp.md +69 -0
- package/docs/server.quaternion.magnitude.md +13 -0
- package/docs/server.quaternion.md +501 -0
- package/docs/server.quaternion.multiply.md +53 -0
- package/docs/server.quaternion.normalize.md +19 -0
- package/docs/server.quaternion.rotatex.md +55 -0
- package/docs/server.quaternion.rotatey.md +55 -0
- package/docs/server.quaternion.rotatez.md +55 -0
- package/docs/server.quaternion.scale.md +55 -0
- package/docs/server.quaternion.slerp.md +71 -0
- package/docs/server.quaternion.squaredmagnitude.md +13 -0
- package/docs/server.quaternion.tostring.md +19 -0
- package/docs/server.quaternion.w.md +15 -0
- package/docs/server.quaternion.x.md +15 -0
- package/docs/server.quaternion.y.md +15 -0
- package/docs/server.quaternion.z.md +15 -0
- package/docs/{server.rotation.md → server.quaternionlike.md} +8 -8
- package/docs/server.quaternionlike.w.md +11 -0
- package/docs/server.quaternionlike.x.md +11 -0
- package/docs/server.quaternionlike.y.md +11 -0
- package/docs/server.quaternionlike.z.md +11 -0
- package/docs/server.rigidbody.addforce.md +2 -2
- package/docs/server.rigidbody.addtorque.md +2 -2
- package/docs/server.rigidbody.applyimpulse.md +2 -2
- package/docs/server.rigidbody.applyimpulseatpoint.md +3 -3
- package/docs/server.rigidbody.applytorqueimpulse.md +2 -2
- package/docs/server.rigidbody.getangularvelocity.md +2 -2
- package/docs/server.rigidbody.getdirectionfromrotation.md +2 -2
- package/docs/server.rigidbody.geteffectiveinversemass.md +2 -2
- package/docs/server.rigidbody.getinverseprincipalangularinertiasqrt.md +2 -2
- package/docs/server.rigidbody.getlinearvelocity.md +2 -2
- package/docs/server.rigidbody.getlocalcenterofmass.md +2 -2
- package/docs/server.rigidbody.getnextkinematicrotation.md +2 -2
- package/docs/server.rigidbody.getnextkinematictranslation.md +2 -2
- package/docs/server.rigidbody.getprincipalangularinertia.md +2 -2
- package/docs/server.rigidbody.getprincipalangularinertialocalframe.md +2 -2
- package/docs/server.rigidbody.getrotation.md +2 -2
- package/docs/server.rigidbody.gettranslation.md +2 -2
- package/docs/server.rigidbody.getworldcenterofmass.md +2 -2
- package/docs/server.rigidbody.setangularvelocity.md +2 -2
- package/docs/server.rigidbody.setlinearvelocity.md +2 -2
- package/docs/server.rigidbody.setnextkinematicrotation.md +2 -2
- package/docs/server.rigidbody.setnextkinematictranslation.md +2 -2
- package/docs/server.rigidbody.setrotation.md +2 -2
- package/docs/server.rigidbody.settranslation.md +2 -2
- package/docs/server.rigidbodyadditionalmassproperties.md +4 -4
- package/docs/server.rigidbodyoptions.angularvelocity.md +1 -1
- package/docs/server.rigidbodyoptions.linearvelocity.md +1 -1
- package/docs/server.rigidbodyoptions.md +4 -4
- package/docs/server.rigidbodyoptions.rotation.md +1 -1
- package/docs/server.rigidbodyoptions.translation.md +1 -1
- package/docs/server.simplecharactercontroller.face.md +2 -2
- package/docs/server.simplecharactercontroller.move.md +2 -2
- package/docs/server.vector3._constructor_.md +75 -0
- package/docs/server.vector3.add.md +55 -0
- package/docs/server.vector3.ceil.md +19 -0
- package/docs/server.vector3.clone.md +19 -0
- package/docs/server.vector3.copy.md +55 -0
- package/docs/server.vector3.cross.md +55 -0
- package/docs/server.vector3.distance.md +55 -0
- package/docs/server.vector3.divide.md +55 -0
- package/docs/server.vector3.equals.md +55 -0
- package/docs/server.vector3.exactequals.md +55 -0
- package/docs/server.vector3.floor.md +19 -0
- package/docs/server.vector3.fromvector3like.md +55 -0
- package/docs/server.vector3.invert.md +19 -0
- package/docs/server.vector3.lerp.md +71 -0
- package/docs/server.vector3.magnitude.md +13 -0
- package/docs/server.vector3.max.md +55 -0
- package/docs/server.vector3.md +464 -3
- package/docs/server.vector3.min.md +55 -0
- package/docs/server.vector3.multiply.md +55 -0
- package/docs/server.vector3.negate.md +19 -0
- package/docs/server.vector3.normalize.md +19 -0
- package/docs/server.vector3.rotatex.md +71 -0
- package/docs/server.vector3.rotatey.md +71 -0
- package/docs/server.vector3.rotatez.md +71 -0
- package/docs/server.vector3.round.md +19 -0
- package/docs/server.vector3.scale.md +55 -0
- package/docs/server.vector3.squaredmagnitude.md +13 -0
- package/docs/server.vector3.subtract.md +55 -0
- package/docs/server.vector3.tostring.md +19 -0
- package/docs/server.vector3.x.md +5 -1
- package/docs/server.vector3.y.md +5 -1
- package/docs/server.vector3.z.md +5 -1
- package/docs/server.vector3like.md +89 -0
- package/docs/server.vector3like.x.md +11 -0
- package/docs/server.vector3like.y.md +11 -0
- package/docs/server.vector3like.z.md +11 -0
- package/docs/server.worldoptions.gravity.md +1 -1
- package/docs/server.worldoptions.md +1 -1
- package/examples/block-entity/index.ts +7 -7
- package/examples/payload-game/index.ts +9 -9
- package/package.json +2 -2
- package/server.api.json +14034 -8254
- package/server.d.ts +488 -104
- package/server.js +89 -89
- package/docs/server.hytopia.playercameraeventpayload.sethiddenmodelnodes.hiddenmodelnodes.md +0 -11
- package/docs/server.hytopia.playercameraeventpayload.sethiddenmodelnodes.playercamera.md +0 -11
- package/docs/server.playercameraeventpayload.sethiddenmodelnodes.hiddenmodelnodes.md +0 -11
- package/docs/server.rotation.w.md +0 -11
- package/docs/server.rotation.x.md +0 -11
- package/docs/server.rotation.y.md +0 -11
- package/docs/server.rotation.z.md +0 -11
package/server.d.ts
CHANGED
@@ -9,7 +9,6 @@ import protocol from '@hytopia.com/server-protocol';
|
|
9
9
|
import RAPIER from '@dimforge/rapier3d-compat';
|
10
10
|
import { SdpMatrix3 } from '@dimforge/rapier3d-compat';
|
11
11
|
import type { Socket as Socket_2 } from 'net';
|
12
|
-
import { Vector } from '@dimforge/rapier3d-compat';
|
13
12
|
import { WebSocket as WebSocket_2 } from 'ws';
|
14
13
|
|
15
14
|
/**
|
@@ -72,7 +71,7 @@ export declare class Audio implements protocol.Serializable {
|
|
72
71
|
/** Whether the audio is positional (Entity or position attached). */
|
73
72
|
get isPositional(): boolean;
|
74
73
|
/** The position of the audio in the world if explicitly set. */
|
75
|
-
get position():
|
74
|
+
get position(): Vector3Like | undefined;
|
76
75
|
/** The playback rate of the audio if explicitly set. */
|
77
76
|
get playbackRate(): number | undefined;
|
78
77
|
/** The reference distance of the audio if explicitly set. */
|
@@ -119,7 +118,7 @@ export declare class Audio implements protocol.Serializable {
|
|
119
118
|
*
|
120
119
|
* @param position - The position in the world.
|
121
120
|
*/
|
122
|
-
setPosition(position:
|
121
|
+
setPosition(position: Vector3Like): void;
|
123
122
|
/**
|
124
123
|
* Sets the playback rate of the audio.
|
125
124
|
*
|
@@ -167,7 +166,7 @@ export declare namespace AudioEventPayload {
|
|
167
166
|
}
|
168
167
|
export interface SetPosition {
|
169
168
|
audio: Audio;
|
170
|
-
position:
|
169
|
+
position: Vector3Like;
|
171
170
|
}
|
172
171
|
export interface SetPlaybackRate {
|
173
172
|
audio: Audio;
|
@@ -266,7 +265,7 @@ export declare interface AudioOptions {
|
|
266
265
|
/** The offset time in seconds from which the audio should start playing. */
|
267
266
|
offset?: number;
|
268
267
|
/** The position in the world where the audio is played. */
|
269
|
-
position?:
|
268
|
+
position?: Vector3Like;
|
270
269
|
/** The playback speed of the audio. Defaults to 1. */
|
271
270
|
playbackRate?: number;
|
272
271
|
/** The reference distance for reducing volume as the audio source moves away from the listener. */
|
@@ -342,7 +341,7 @@ export declare abstract class BaseCharacterController {
|
|
342
341
|
*/
|
343
342
|
export declare class Block {
|
344
343
|
/** The global coordinate of the block. */
|
345
|
-
readonly globalCoordinate:
|
344
|
+
readonly globalCoordinate: Vector3Like;
|
346
345
|
/** The block type of the block. */
|
347
346
|
readonly blockType: BlockType;
|
348
347
|
|
@@ -626,7 +625,7 @@ export declare class Chunk implements protocol.Serializable {
|
|
626
625
|
/** Whether the chunk has been spawned. */
|
627
626
|
get isSpawned(): boolean;
|
628
627
|
/** The origin coordinate of the chunk. */
|
629
|
-
get originCoordinate():
|
628
|
+
get originCoordinate(): Vector3Like | undefined;
|
630
629
|
/** The world the chunk belongs to. */
|
631
630
|
get world(): World | undefined;
|
632
631
|
/**
|
@@ -634,31 +633,31 @@ export declare class Chunk implements protocol.Serializable {
|
|
634
633
|
* @param index - The index of the block to convert.
|
635
634
|
* @returns The local coordinate of the block.
|
636
635
|
*/
|
637
|
-
static blockIndexToLocalCoordinate(index: number):
|
636
|
+
static blockIndexToLocalCoordinate(index: number): Vector3Like;
|
638
637
|
/**
|
639
638
|
* Convert a global coordinate to a local coordinate.
|
640
639
|
* @param globalCoordinate - The global coordinate to convert.
|
641
640
|
* @returns The local coordinate.
|
642
641
|
*/
|
643
|
-
static globalCoordinateToLocalCoordinate(globalCoordinate:
|
642
|
+
static globalCoordinateToLocalCoordinate(globalCoordinate: Vector3Like): Vector3Like;
|
644
643
|
/**
|
645
644
|
* Convert a global coordinate to an origin coordinate.
|
646
645
|
* @param globalCoordinate - The global coordinate to convert.
|
647
646
|
* @returns The origin coordinate.
|
648
647
|
*/
|
649
|
-
static globalCoordinateToOriginCoordinate(globalCoordinate:
|
648
|
+
static globalCoordinateToOriginCoordinate(globalCoordinate: Vector3Like): Vector3Like;
|
650
649
|
/**
|
651
650
|
* Check if an origin coordinate is valid.
|
652
651
|
* @param coordinate - The coordinate to check.
|
653
652
|
* @returns Whether the coordinate is valid.
|
654
653
|
*/
|
655
|
-
static isValidOriginCoordinate(coordinate:
|
654
|
+
static isValidOriginCoordinate(coordinate: Vector3Like): boolean;
|
656
655
|
/**
|
657
656
|
* Spawn the chunk in the world.
|
658
657
|
* @param world - The world to spawn the chunk in.
|
659
658
|
* @param originCoordinate - The origin coordinate of the chunk.
|
660
659
|
*/
|
661
|
-
spawn(world: World, originCoordinate:
|
660
|
+
spawn(world: World, originCoordinate: Vector3Like): void;
|
662
661
|
/**
|
663
662
|
* Despawn the chunk from the world.
|
664
663
|
*/
|
@@ -668,19 +667,19 @@ export declare class Chunk implements protocol.Serializable {
|
|
668
667
|
* @param localCoordinate - The local coordinate of the block to get.
|
669
668
|
* @returns The block type id.
|
670
669
|
*/
|
671
|
-
getBlock(localCoordinate:
|
670
|
+
getBlock(localCoordinate: Vector3Like): number;
|
672
671
|
/**
|
673
672
|
* Check if a block exists at a specific local coordinate.
|
674
673
|
* @param localCoordinate - The local coordinate of the block to check.
|
675
674
|
* @returns Whether a block exists.
|
676
675
|
*/
|
677
|
-
hasBlock(localCoordinate:
|
676
|
+
hasBlock(localCoordinate: Vector3Like): boolean;
|
678
677
|
/**
|
679
678
|
* Set the block at a specific local coordinate by block type id.
|
680
679
|
* @param localCoordinate - The local coordinate of the block to set.
|
681
680
|
* @param blockTypeId - The block type id to set.
|
682
681
|
*/
|
683
|
-
setBlock(localCoordinate:
|
682
|
+
setBlock(localCoordinate: Vector3Like, blockTypeId: number): void;
|
684
683
|
|
685
684
|
|
686
685
|
|
@@ -697,8 +696,8 @@ export declare namespace ChunkEventPayload {
|
|
697
696
|
}
|
698
697
|
export interface SetBlock {
|
699
698
|
chunk: Chunk;
|
700
|
-
globalCoordinate:
|
701
|
-
localCoordinate:
|
699
|
+
globalCoordinate: Vector3Like;
|
700
|
+
localCoordinate: Vector3Like;
|
702
701
|
blockTypeId: number;
|
703
702
|
}
|
704
703
|
export interface Spawn {
|
@@ -737,13 +736,13 @@ export declare class ChunkLattice {
|
|
737
736
|
* @param globalCoordinate - The global coordinate of the block to get.
|
738
737
|
* @returns The block type id, 0 if no block is set.
|
739
738
|
*/
|
740
|
-
getBlock(globalCoordinate:
|
739
|
+
getBlock(globalCoordinate: Vector3Like): number;
|
741
740
|
/**
|
742
741
|
* Get a chunk by its origin coordinate.
|
743
742
|
* @param originCoordinate - The origin coordinate of the chunk to get.
|
744
743
|
* @returns The chunk at the given origin coordinate or undefined if not found.
|
745
744
|
*/
|
746
|
-
getChunk(originCoordinate:
|
745
|
+
getChunk(originCoordinate: Vector3Like): Chunk | undefined;
|
747
746
|
/**
|
748
747
|
* Get all chunks in the lattice.
|
749
748
|
* @returns An array of all chunks in the lattice.
|
@@ -754,20 +753,20 @@ export declare class ChunkLattice {
|
|
754
753
|
* @param globalCoordinate - The global coordinate of the block to check.
|
755
754
|
* @returns Whether a block exists.
|
756
755
|
*/
|
757
|
-
hasBlock(globalCoordinate:
|
756
|
+
hasBlock(globalCoordinate: Vector3Like): boolean;
|
758
757
|
/**
|
759
758
|
* Check if a chunk exists by its origin coordinate.
|
760
759
|
* @param originCoordinate - The origin coordinate of the chunk to check.
|
761
760
|
* @returns Whether the chunk exists.
|
762
761
|
*/
|
763
|
-
hasChunk(originCoordinate:
|
762
|
+
hasChunk(originCoordinate: Vector3Like): boolean;
|
764
763
|
/**
|
765
764
|
* Set the block at a global coordinate by block type id, automatically
|
766
765
|
* creating a chunk if it doesn't exist. Use block type id 0 for air.
|
767
766
|
* @param globalCoordinate - The global coordinate of the block to set.
|
768
767
|
* @param blockTypeId - The block type id to set. Use 0 to remove the block and replace with air.
|
769
768
|
*/
|
770
|
-
setBlock(globalCoordinate:
|
769
|
+
setBlock(globalCoordinate: Vector3Like, blockTypeId: number): void;
|
771
770
|
|
772
771
|
|
773
772
|
}
|
@@ -832,12 +831,12 @@ export declare class Collider {
|
|
832
831
|
* Gets the relative rotation of the collider.
|
833
832
|
* @returns The relative rotation of the collider.
|
834
833
|
*/
|
835
|
-
getRelativeRotation():
|
834
|
+
getRelativeRotation(): QuaternionLike;
|
836
835
|
/**
|
837
836
|
* Gets the relative translation of the collider to its parent rigid body.
|
838
837
|
* @returns The relative translation of the collider.
|
839
838
|
*/
|
840
|
-
getRelativeTranslation():
|
839
|
+
getRelativeTranslation(): Vector3Like;
|
841
840
|
/**
|
842
841
|
* Sets the bounciness of the collider.
|
843
842
|
* @param bounciness - The bounciness of the collider.
|
@@ -872,12 +871,12 @@ export declare class Collider {
|
|
872
871
|
* Sets the relative rotation of the collider.
|
873
872
|
* @param rotation - The relative rotation of the collider.
|
874
873
|
*/
|
875
|
-
setRelativeRotation(rotation:
|
874
|
+
setRelativeRotation(rotation: QuaternionLike): void;
|
876
875
|
/**
|
877
876
|
* Sets the relative translation of the collider to its parent rigid body.
|
878
877
|
* @param translation - The relative translation of the collider.
|
879
878
|
*/
|
880
|
-
setRelativeTranslation(translation:
|
879
|
+
setRelativeTranslation(translation: Vector3Like): void;
|
881
880
|
/**
|
882
881
|
* Sets whether the collider is a sensor.
|
883
882
|
* @param sensor - Whether the collider is a sensor.
|
@@ -932,7 +931,7 @@ export declare interface ColliderOptions {
|
|
932
931
|
/** The friction of the collider. */
|
933
932
|
friction?: number;
|
934
933
|
/** The half extents of the collider if the shape is a block. */
|
935
|
-
halfExtents?:
|
934
|
+
halfExtents?: Vector3Like;
|
936
935
|
/** The half height of the collider if the shape is a capsule, cone, cylinder, or round cylinder. */
|
937
936
|
halfHeight?: number;
|
938
937
|
/** Whether the collider is a sensor. */
|
@@ -946,9 +945,9 @@ export declare interface ColliderOptions {
|
|
946
945
|
/** The radius of the collider if the shape is a ball, capsule, cone, cylinder, or round cylinder. */
|
947
946
|
radius?: number;
|
948
947
|
/** The relative rotation of the collider. Relative to parent rigid body. */
|
949
|
-
relativeRotation?:
|
948
|
+
relativeRotation?: QuaternionLike;
|
950
949
|
/** The relative translation of the collider. Relative to parent rigid body. */
|
951
|
-
relativeTranslation?:
|
950
|
+
relativeTranslation?: Vector3Like;
|
952
951
|
/** The simulation the collider is in, if provided the collider will automatically be added to the simulation. */
|
953
952
|
simulation?: Simulation;
|
954
953
|
/** An arbitrary identifier tag of the collider. Useful for your own logic. */
|
@@ -1293,6 +1292,7 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
|
|
1293
1292
|
|
1294
1293
|
|
1295
1294
|
|
1295
|
+
|
1296
1296
|
/**
|
1297
1297
|
* @param options - The options for the entity.
|
1298
1298
|
*/
|
@@ -1302,11 +1302,13 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
|
|
1302
1302
|
/** The character controller for the entity. */
|
1303
1303
|
get characterController(): BaseCharacterController | undefined;
|
1304
1304
|
/** The half extends of the visual size of the block entity when blockTextureUri is set. */
|
1305
|
-
get blockHalfExtents():
|
1305
|
+
get blockHalfExtents(): Vector3Like | undefined;
|
1306
1306
|
/** The URI or path to the texture to be used, if this is set, the entity is a block entity. */
|
1307
1307
|
get blockTextureUri(): string | undefined;
|
1308
1308
|
/** The URI or path to the .gltf model asset to be used for the entity. */
|
1309
1309
|
get modelUri(): string | undefined;
|
1310
|
+
/** The nodes to hide on the entity's model. */
|
1311
|
+
get modelHiddenNodes(): ReadonlySet<string>;
|
1310
1312
|
/** The looped animations to start when the entity is spawned. */
|
1311
1313
|
get modelLoopedAnimations(): ReadonlySet<string>;
|
1312
1314
|
/** The scale of the entity's model. */
|
@@ -1326,7 +1328,7 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
|
|
1326
1328
|
* @param world - The world to spawn the entity in.
|
1327
1329
|
* @param coordinate - The coordinate to spawn the entity at.
|
1328
1330
|
*/
|
1329
|
-
spawn(world: World, coordinate:
|
1331
|
+
spawn(world: World, coordinate: Vector3Like): void;
|
1330
1332
|
/**
|
1331
1333
|
* Despawns the entity from the world.
|
1332
1334
|
*/
|
@@ -1336,6 +1338,13 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
|
|
1336
1338
|
* @param characterController - The character controller to set.
|
1337
1339
|
*/
|
1338
1340
|
setCharacterController(characterController: BaseCharacterController): void;
|
1341
|
+
/**
|
1342
|
+
* Sets the nodes to hide on the entity's model. Matched nodes
|
1343
|
+
* will be hidden for all players. Uses case insensitive
|
1344
|
+
* substring matching.
|
1345
|
+
* @param modelHiddenNodes - The nodes to hide on the entity's model.
|
1346
|
+
*/
|
1347
|
+
setModelHiddenNodes(modelHiddenNodes: string[]): void;
|
1339
1348
|
/**
|
1340
1349
|
* Sets the tint color of the entity.
|
1341
1350
|
* @param tintColor - The tint color of the entity.
|
@@ -1372,6 +1381,10 @@ export declare namespace EntityEventPayload {
|
|
1372
1381
|
export interface Despawn {
|
1373
1382
|
entity: Entity;
|
1374
1383
|
}
|
1384
|
+
export interface SetModelHiddenNodes {
|
1385
|
+
entity: Entity;
|
1386
|
+
modelHiddenNodes: Set<string>;
|
1387
|
+
}
|
1375
1388
|
export interface SetTintColor {
|
1376
1389
|
entity: Entity;
|
1377
1390
|
tintColor: RgbColor | undefined;
|
@@ -1393,17 +1406,18 @@ export declare namespace EntityEventPayload {
|
|
1393
1406
|
}
|
1394
1407
|
export interface UpdateRotation {
|
1395
1408
|
entity: Entity;
|
1396
|
-
rotation:
|
1409
|
+
rotation: QuaternionLike;
|
1397
1410
|
}
|
1398
1411
|
export interface UpdateTranslation {
|
1399
1412
|
entity: Entity;
|
1400
|
-
translation:
|
1413
|
+
translation: Vector3Like;
|
1401
1414
|
}
|
1402
1415
|
}
|
1403
1416
|
|
1404
1417
|
/** Event types an Entity instance can emit. @public */
|
1405
1418
|
export declare enum EntityEventType {
|
1406
1419
|
DESPAWN = "ENTITY.DESPAWN",
|
1420
|
+
SET_MODEL_HIDDEN_NODES = "ENTITY.SET_MODEL_HIDDEN_NODES",
|
1407
1421
|
SET_TINT_COLOR = "ENTITY.SET_TINT_COLOR",
|
1408
1422
|
SPAWN = "ENTITY.SPAWN",
|
1409
1423
|
START_MODEL_LOOPED_ANIMATIONS = "ENTITY.START_MODEL_LOOPED_ANIMATIONS",
|
@@ -1476,7 +1490,7 @@ export declare class EntityManager {
|
|
1476
1490
|
/** Options for creating an Entity instance. @public */
|
1477
1491
|
export declare interface EntityOptions {
|
1478
1492
|
/** The half extents of the visual size of the block entity when blockTextureUri is set. If no rigidBodyOptions.colliders are provided, a block collider with the size of the half extents will be created. */
|
1479
|
-
blockHalfExtents?:
|
1493
|
+
blockHalfExtents?: Vector3Like;
|
1480
1494
|
/** The texture uri of a entity if the entity is a block entity, if set rigidBodyOptions collider shape [0] must be a block */
|
1481
1495
|
blockTextureUri?: string;
|
1482
1496
|
/**
|
@@ -1487,6 +1501,8 @@ export declare interface EntityOptions {
|
|
1487
1501
|
createCustomCharacterController?: (entity: Entity) => BaseCharacterController;
|
1488
1502
|
/** The URI or path to the .gltf model asset to be used for the entity. */
|
1489
1503
|
modelUri?: string;
|
1504
|
+
/** The nodes to hide on the entity's model. */
|
1505
|
+
modelHiddenNodes?: string[];
|
1490
1506
|
/** The looped animations to start when the entity is spawned. */
|
1491
1507
|
modelLoopedAnimations?: string[];
|
1492
1508
|
/** The scale of the entity's model. */
|
@@ -1583,7 +1599,7 @@ export declare class EventRouter {
|
|
1583
1599
|
* @param targetRotation - The target rotation of the entity.
|
1584
1600
|
* @public
|
1585
1601
|
*/
|
1586
|
-
export declare type FaceCallback = (currentRotation:
|
1602
|
+
export declare type FaceCallback = (currentRotation: QuaternionLike, targetRotation: QuaternionLike) => void;
|
1587
1603
|
|
1588
1604
|
/**
|
1589
1605
|
* A callback function called when the entity associated with the
|
@@ -1592,7 +1608,7 @@ export declare type FaceCallback = (currentRotation: Rotation, targetRotation: R
|
|
1592
1608
|
* @param endRotation - The rotation of the entity after it has finished rotating.
|
1593
1609
|
* @public
|
1594
1610
|
*/
|
1595
|
-
export declare type FaceCompleteCallback = (endRotation:
|
1611
|
+
export declare type FaceCompleteCallback = (endRotation: QuaternionLike) => void;
|
1596
1612
|
|
1597
1613
|
/**
|
1598
1614
|
* Options for the {@link SimpleCharacterController.face} method.
|
@@ -1697,9 +1713,11 @@ declare namespace HYTOPIA {
|
|
1697
1713
|
startServer,
|
1698
1714
|
GameServerEventPayload,
|
1699
1715
|
RgbColor,
|
1700
|
-
|
1701
|
-
SpdMatrix3,
|
1716
|
+
Quaternion,
|
1702
1717
|
Vector3,
|
1718
|
+
QuaternionLike,
|
1719
|
+
SpdMatrix3,
|
1720
|
+
Vector3Like,
|
1703
1721
|
Vector3Boolean,
|
1704
1722
|
Player,
|
1705
1723
|
PlayerEventType,
|
@@ -1745,7 +1763,7 @@ export default HYTOPIA;
|
|
1745
1763
|
* @param targetTranslation - The target translation of the entity.
|
1746
1764
|
* @public
|
1747
1765
|
*/
|
1748
|
-
export declare type MoveCallback = (currentTranslation:
|
1766
|
+
export declare type MoveCallback = (currentTranslation: Vector3Like, targetTranslation: Vector3Like) => void;
|
1749
1767
|
|
1750
1768
|
/**
|
1751
1769
|
* A callback function called when the entity associated with the
|
@@ -1754,7 +1772,7 @@ export declare type MoveCallback = (currentTranslation: Vector3, targetTranslati
|
|
1754
1772
|
* @param endTranslation - The translation of the entity after it has finished moving.
|
1755
1773
|
* @public
|
1756
1774
|
*/
|
1757
|
-
export declare type MoveCompleteCallback = (endTranslation:
|
1775
|
+
export declare type MoveCompleteCallback = (endTranslation: Vector3Like) => void;
|
1758
1776
|
|
1759
1777
|
/**
|
1760
1778
|
* Options for the {@link SimpleCharacterController.move} method.
|
@@ -1860,7 +1878,7 @@ export declare class PlayerCamera implements protocol.Serializable {
|
|
1860
1878
|
/** The entity the camera is attached to. */
|
1861
1879
|
get attachedToEntity(): Entity | undefined;
|
1862
1880
|
/** The position the camera is attached to. */
|
1863
|
-
get attachedToPosition():
|
1881
|
+
get attachedToPosition(): Vector3Like | undefined;
|
1864
1882
|
/** The film offset of the camera. A positive value shifts the camera right, a negative value shifts it left. */
|
1865
1883
|
get filmOffset(): number;
|
1866
1884
|
/** Only used in first-person mode. The forward offset of the camera. A positive number shifts the camera forward, a negative number shifts it backward. */
|
@@ -1868,15 +1886,15 @@ export declare class PlayerCamera implements protocol.Serializable {
|
|
1868
1886
|
/** The field of view of the camera. */
|
1869
1887
|
get fov(): number;
|
1870
1888
|
/** The nodes of the model the camera is attached to that will not be rendered for the player. Uses case insensitive substring matching. */
|
1871
|
-
get
|
1889
|
+
get modelHiddenNodes(): Set<string>;
|
1872
1890
|
/** The mode of the camera. */
|
1873
1891
|
get mode(): PlayerCameraMode;
|
1874
1892
|
/** The relative offset of the camera from the entity or position it is attached to. */
|
1875
|
-
get offset():
|
1893
|
+
get offset(): Vector3Like;
|
1876
1894
|
/** The entity the camera will constantly look at, even if the camera attached or tracked entity moves. */
|
1877
1895
|
get trackedEntity(): Entity | undefined;
|
1878
1896
|
/** The position the camera will constantly look at, even if the camera attached entity moves. */
|
1879
|
-
get trackedPosition():
|
1897
|
+
get trackedPosition(): Vector3Like | undefined;
|
1880
1898
|
/** The zoom of the camera. */
|
1881
1899
|
get zoom(): number;
|
1882
1900
|
/**
|
@@ -1892,7 +1910,7 @@ export declare class PlayerCamera implements protocol.Serializable {
|
|
1892
1910
|
* stop tracking.
|
1893
1911
|
* @param position - The position to look at.
|
1894
1912
|
*/
|
1895
|
-
lookAtPosition(position:
|
1913
|
+
lookAtPosition(position: Vector3Like): void;
|
1896
1914
|
/**
|
1897
1915
|
* Sets the entity the camera is attached to.
|
1898
1916
|
* @param entity - The entity to attach the camera to.
|
@@ -1902,7 +1920,7 @@ export declare class PlayerCamera implements protocol.Serializable {
|
|
1902
1920
|
* Sets the position the camera is attached to.
|
1903
1921
|
* @param position - The position to attach the camera to.
|
1904
1922
|
*/
|
1905
|
-
setAttachedToPosition(position:
|
1923
|
+
setAttachedToPosition(position: Vector3Like): void;
|
1906
1924
|
/**
|
1907
1925
|
* Sets the film offset of the camera. A positive value
|
1908
1926
|
* shifts the camera right, a negative value shifts it left.
|
@@ -1925,9 +1943,9 @@ export declare class PlayerCamera implements protocol.Serializable {
|
|
1925
1943
|
* Sets the nodes of the model the camera is attached to
|
1926
1944
|
* that will not be rendered for the player. Uses case
|
1927
1945
|
* insensitive substring matching.
|
1928
|
-
* @param
|
1946
|
+
* @param modelHiddenNodes - Determines nodes to hide that match these case insensitive substrings.
|
1929
1947
|
*/
|
1930
|
-
|
1948
|
+
setModelHiddenNodes(modelHiddenNodes: string[]): void;
|
1931
1949
|
/**
|
1932
1950
|
* Sets the mode of the camera.
|
1933
1951
|
* @param mode - The mode to set.
|
@@ -1938,7 +1956,7 @@ export declare class PlayerCamera implements protocol.Serializable {
|
|
1938
1956
|
* entity or position it is attached to.
|
1939
1957
|
* @param offset - The offset to set.
|
1940
1958
|
*/
|
1941
|
-
setOffset(offset:
|
1959
|
+
setOffset(offset: Vector3Like): void;
|
1942
1960
|
/**
|
1943
1961
|
* Sets the entity the camera will constantly look at,
|
1944
1962
|
* even if the camera attached or tracked entity moves.
|
@@ -1950,7 +1968,7 @@ export declare class PlayerCamera implements protocol.Serializable {
|
|
1950
1968
|
* even if the camera attached entity moves.
|
1951
1969
|
* @param position - The position to track or undefined to stop tracking.
|
1952
1970
|
*/
|
1953
|
-
setTrackedPosition(position:
|
1971
|
+
setTrackedPosition(position: Vector3Like | undefined): void;
|
1954
1972
|
/**
|
1955
1973
|
* Sets the zoom of the camera.
|
1956
1974
|
* @param zoom - The zoom to set, 0 to infinity.
|
@@ -1968,7 +1986,7 @@ export declare namespace PlayerCameraEventPayload {
|
|
1968
1986
|
}
|
1969
1987
|
export interface LookAtPosition {
|
1970
1988
|
playerCamera: PlayerCamera;
|
1971
|
-
position:
|
1989
|
+
position: Vector3Like;
|
1972
1990
|
}
|
1973
1991
|
export interface SetAttachedToEntity {
|
1974
1992
|
playerCamera: PlayerCamera;
|
@@ -1976,7 +1994,7 @@ export declare namespace PlayerCameraEventPayload {
|
|
1976
1994
|
}
|
1977
1995
|
export interface SetAttachedToPosition {
|
1978
1996
|
playerCamera: PlayerCamera;
|
1979
|
-
position:
|
1997
|
+
position: Vector3Like;
|
1980
1998
|
}
|
1981
1999
|
export interface SetFilmOffset {
|
1982
2000
|
playerCamera: PlayerCamera;
|
@@ -1990,9 +2008,9 @@ export declare namespace PlayerCameraEventPayload {
|
|
1990
2008
|
playerCamera: PlayerCamera;
|
1991
2009
|
fov: number;
|
1992
2010
|
}
|
1993
|
-
export interface
|
2011
|
+
export interface SetModelHiddenNodes {
|
1994
2012
|
playerCamera: PlayerCamera;
|
1995
|
-
|
2013
|
+
modelHiddenNodes: Set<string>;
|
1996
2014
|
}
|
1997
2015
|
export interface SetMode {
|
1998
2016
|
playerCamera: PlayerCamera;
|
@@ -2000,7 +2018,7 @@ export declare namespace PlayerCameraEventPayload {
|
|
2000
2018
|
}
|
2001
2019
|
export interface SetOffset {
|
2002
2020
|
playerCamera: PlayerCamera;
|
2003
|
-
offset:
|
2021
|
+
offset: Vector3Like;
|
2004
2022
|
}
|
2005
2023
|
export interface SetTrackedEntity {
|
2006
2024
|
playerCamera: PlayerCamera;
|
@@ -2008,7 +2026,7 @@ export declare namespace PlayerCameraEventPayload {
|
|
2008
2026
|
}
|
2009
2027
|
export interface SetTrackedPosition {
|
2010
2028
|
playerCamera: PlayerCamera;
|
2011
|
-
position:
|
2029
|
+
position: Vector3Like | undefined;
|
2012
2030
|
}
|
2013
2031
|
export interface SetZoom {
|
2014
2032
|
playerCamera: PlayerCamera;
|
@@ -2025,7 +2043,7 @@ export declare enum PlayerCameraEventType {
|
|
2025
2043
|
SET_FILM_OFFSET = "PLAYER_CAMERA.SET_FILM_OFFSET",
|
2026
2044
|
SET_FORWARD_OFFSET = "PLAYER_CAMERA.SET_FORWARD_OFFSET",
|
2027
2045
|
SET_FOV = "PLAYER_CAMERA.SET_FOV",
|
2028
|
-
|
2046
|
+
SET_MODEL_HIDDEN_NODES = "PLAYER_CAMERA.SET_MODEL_HIDDEN_NODES",
|
2029
2047
|
SET_MODE = "PLAYER_CAMERA.SET_MODE",
|
2030
2048
|
SET_OFFSET = "PLAYER_CAMERA.SET_OFFSET",
|
2031
2049
|
SET_TRACKED_ENTITY = "PLAYER_CAMERA.SET_TRACKED_ENTITY",
|
@@ -2171,6 +2189,181 @@ export declare type PlayerOrientationState = {
|
|
2171
2189
|
*/
|
2172
2190
|
export declare const PORT: string | 8080;
|
2173
2191
|
|
2192
|
+
/**
|
2193
|
+
* Represents a quaternion.
|
2194
|
+
*
|
2195
|
+
* @remarks
|
2196
|
+
* All quaternion methods result in mutation of the quaternion instance.
|
2197
|
+
* This class extends `Float32Array` to provide an efficient way to
|
2198
|
+
* create and manipulate a quaternion. Various convenience methods are
|
2199
|
+
* provided for common quaternion operations.
|
2200
|
+
*
|
2201
|
+
* @public
|
2202
|
+
*/
|
2203
|
+
export declare class Quaternion extends Float32Array implements QuaternionLike {
|
2204
|
+
constructor(x: number, y: number, z: number, w: number);
|
2205
|
+
/** The magnitude of the quaternion. Also known as the length. */
|
2206
|
+
get magnitude(): number;
|
2207
|
+
/** The squared magnitude of the quaternion. Also known as the squared length. */
|
2208
|
+
get squaredMagnitude(): number;
|
2209
|
+
/** The x-component of the quaternion. */
|
2210
|
+
get x(): number;
|
2211
|
+
set x(value: number);
|
2212
|
+
/** The y-component of the quaternion. */
|
2213
|
+
get y(): number;
|
2214
|
+
set y(value: number);
|
2215
|
+
/** The z-component of the quaternion. */
|
2216
|
+
get z(): number;
|
2217
|
+
set z(value: number);
|
2218
|
+
/** The w-component of the quaternion. */
|
2219
|
+
get w(): number;
|
2220
|
+
set w(value: number);
|
2221
|
+
/**
|
2222
|
+
* Creates a quaternion from Euler angles.
|
2223
|
+
*
|
2224
|
+
* @param x - The x-component of the Euler angles in degrees.
|
2225
|
+
* @param y - The y-component of the Euler angles in degrees.
|
2226
|
+
* @param z - The z-component of the Euler angles in degrees.
|
2227
|
+
*/
|
2228
|
+
static fromEuler(x: number, y: number, z: number): Quaternion;
|
2229
|
+
/**
|
2230
|
+
* Creates a quaternion from a `QuaternionLike` object.
|
2231
|
+
*
|
2232
|
+
* @param quaternionLike - The `QuaternionLike` object to create the quaternion from.
|
2233
|
+
*/
|
2234
|
+
static fromQuaternionLike(quaternionLike: QuaternionLike): Quaternion;
|
2235
|
+
/**
|
2236
|
+
* Creates a clone of the current quaternion.
|
2237
|
+
*
|
2238
|
+
* @returns A new `Quaternion` instance.
|
2239
|
+
*/
|
2240
|
+
clone(): Quaternion;
|
2241
|
+
/**
|
2242
|
+
* Conjugates the current quaternion.
|
2243
|
+
*
|
2244
|
+
* @returns The current quaternion.
|
2245
|
+
*/
|
2246
|
+
conjugate(): Quaternion;
|
2247
|
+
/**
|
2248
|
+
* Copies the components of a `QuaternionLike` object to the current quaternion.
|
2249
|
+
*
|
2250
|
+
* @param quaternionLike - The `QuaternionLike` object to copy the components from.
|
2251
|
+
* @returns The current quaternion.
|
2252
|
+
*/
|
2253
|
+
copy(quaternion: Quaternion): Quaternion;
|
2254
|
+
/**
|
2255
|
+
* Calculates the dot product of the current quaternion and another quaternion.
|
2256
|
+
*
|
2257
|
+
* @param quaternionLike - The quaternion to calculate the dot product with.
|
2258
|
+
* @returns The dot product.
|
2259
|
+
*/
|
2260
|
+
dot(quaternion: Quaternion): number;
|
2261
|
+
/**
|
2262
|
+
* Calculates and sets the current quaternion to its exponential.
|
2263
|
+
*
|
2264
|
+
* @returns The current quaternion.
|
2265
|
+
*/
|
2266
|
+
exponential(): Quaternion;
|
2267
|
+
/**
|
2268
|
+
* Checks if the current quaternion is approximately equal to another quaternion.
|
2269
|
+
*
|
2270
|
+
* @param quaternionLike - The quaternion to check against.
|
2271
|
+
* @returns `true` if the quaternions are approximately equal, `false` otherwise.
|
2272
|
+
*/
|
2273
|
+
equals(quaternion: Quaternion): boolean;
|
2274
|
+
/**
|
2275
|
+
* Checks if the current quaternion is exactly equal to another quaternion.
|
2276
|
+
*
|
2277
|
+
* @param quaternionLike - The quaternion to check against.
|
2278
|
+
* @returns `true` if the quaternions are exactly equal, `false` otherwise.
|
2279
|
+
*/
|
2280
|
+
exactEquals(quaternion: Quaternion): boolean;
|
2281
|
+
/**
|
2282
|
+
* Calculates and returns the angle between the current quaternion and another quaternion.
|
2283
|
+
*
|
2284
|
+
* @param quaternionLike - The quaternion to calculate the angle with.
|
2285
|
+
* @returns The angle in degrees.
|
2286
|
+
*/
|
2287
|
+
getAngle(quaternion: Quaternion): number;
|
2288
|
+
/**
|
2289
|
+
* Inverts each component of the quaternion.
|
2290
|
+
*
|
2291
|
+
* @returns The current quaternion.
|
2292
|
+
*/
|
2293
|
+
invert(): Quaternion;
|
2294
|
+
/**
|
2295
|
+
* Linearly interpolates between the current quaternion and another quaternion.
|
2296
|
+
*
|
2297
|
+
* @param quaternionLike - The quaternion to interpolate with.
|
2298
|
+
* @param t - The interpolation factor.
|
2299
|
+
* @returns The current quaternion.
|
2300
|
+
*/
|
2301
|
+
lerp(quaternion: Quaternion, t: number): Quaternion;
|
2302
|
+
/**
|
2303
|
+
* Multiplies the quaternion by another quaternion.
|
2304
|
+
*
|
2305
|
+
* @param quaternionLike - The quaternion to multiply by.
|
2306
|
+
* @returns The current quaternion.
|
2307
|
+
*/
|
2308
|
+
multiply(quaternion: Quaternion): Quaternion;
|
2309
|
+
/**
|
2310
|
+
* Normalizes the quaternion.
|
2311
|
+
*
|
2312
|
+
* @returns The current quaternion.
|
2313
|
+
*/
|
2314
|
+
normalize(): Quaternion;
|
2315
|
+
/**
|
2316
|
+
* Rotates the quaternion around the x-axis.
|
2317
|
+
*
|
2318
|
+
* @param angle - The angle to rotate in degrees.
|
2319
|
+
* @returns The current quaternion.
|
2320
|
+
*/
|
2321
|
+
rotateX(angle: number): Quaternion;
|
2322
|
+
/**
|
2323
|
+
* Rotates the quaternion around the y-axis.
|
2324
|
+
*
|
2325
|
+
* @param angle - The angle to rotate in degrees.
|
2326
|
+
* @returns The current quaternion.
|
2327
|
+
*/
|
2328
|
+
rotateY(angle: number): Quaternion;
|
2329
|
+
/**
|
2330
|
+
* Rotates the quaternion around the z-axis.
|
2331
|
+
*
|
2332
|
+
* @param angle - The angle to rotate in degrees.
|
2333
|
+
* @returns The current quaternion.
|
2334
|
+
*/
|
2335
|
+
rotateZ(angle: number): Quaternion;
|
2336
|
+
/**
|
2337
|
+
* Scales the quaternion by a scalar value.
|
2338
|
+
*
|
2339
|
+
* @param scale - The scalar value to scale the quaternion by.
|
2340
|
+
* @returns The current quaternion.
|
2341
|
+
*/
|
2342
|
+
scale(scale: number): Quaternion;
|
2343
|
+
/**
|
2344
|
+
* Spherically interpolates between the current quaternion and another quaternion.
|
2345
|
+
*
|
2346
|
+
* @param quaternion - The quaternion to interpolate with.
|
2347
|
+
* @param t - The interpolation factor.
|
2348
|
+
* @returns The current quaternion.
|
2349
|
+
*/
|
2350
|
+
slerp(quaternion: Quaternion, t: number): Quaternion;
|
2351
|
+
/**
|
2352
|
+
* Returns a string representation of the quaternion in x,y,z,w format.
|
2353
|
+
*
|
2354
|
+
* @returns A string representation of the quaternion in the format x,y,z,w.
|
2355
|
+
*/
|
2356
|
+
toString(): string;
|
2357
|
+
}
|
2358
|
+
|
2359
|
+
/** A quaternion. @public */
|
2360
|
+
export declare interface QuaternionLike {
|
2361
|
+
x: number;
|
2362
|
+
y: number;
|
2363
|
+
z: number;
|
2364
|
+
w: number;
|
2365
|
+
}
|
2366
|
+
|
2174
2367
|
/** A raw set of collision groups represented as a 32-bit number. @public */
|
2175
2368
|
export declare type RawCollisionGroups = RAPIER.InteractionGroups;
|
2176
2369
|
|
@@ -2268,7 +2461,7 @@ export declare class RigidBody {
|
|
2268
2461
|
* Gets the angular velocity of the rigid body.
|
2269
2462
|
* @returns The angular velocity of the rigid body.
|
2270
2463
|
*/
|
2271
|
-
getAngularVelocity():
|
2464
|
+
getAngularVelocity(): Vector3Like;
|
2272
2465
|
/**
|
2273
2466
|
* Gets the colliders of the rigid body by tag.
|
2274
2467
|
* @param tag - The tag to filter by.
|
@@ -2284,7 +2477,7 @@ export declare class RigidBody {
|
|
2284
2477
|
* Gets the direction from the rotation of the rigid body.
|
2285
2478
|
* @returns The direction from the rotation of the rigid body.
|
2286
2479
|
*/
|
2287
|
-
getDirectionFromRotation():
|
2480
|
+
getDirectionFromRotation(): Vector3Like;
|
2288
2481
|
/**
|
2289
2482
|
* Gets the effective angular inertia of the rigid body.
|
2290
2483
|
* @returns The effective angular inertia of the rigid body.
|
@@ -2294,7 +2487,7 @@ export declare class RigidBody {
|
|
2294
2487
|
* Gets the effective inverse mass of the rigid body.
|
2295
2488
|
* @returns The effective inverse mass of the rigid body.
|
2296
2489
|
*/
|
2297
|
-
getEffectiveInverseMass():
|
2490
|
+
getEffectiveInverseMass(): Vector3Like | undefined;
|
2298
2491
|
/**
|
2299
2492
|
* Gets the effective world inverse principal angular inertia square root of the rigid body.
|
2300
2493
|
* @returns The effective world inverse principal angular inertia square root of the rigid body.
|
@@ -2324,7 +2517,7 @@ export declare class RigidBody {
|
|
2324
2517
|
* Gets the inverse principal angular inertia square root of the rigid body.
|
2325
2518
|
* @returns The inverse principal angular inertia square root of the rigid body.
|
2326
2519
|
*/
|
2327
|
-
getInversePrincipalAngularInertiaSqrt():
|
2520
|
+
getInversePrincipalAngularInertiaSqrt(): Vector3Like | undefined;
|
2328
2521
|
/**
|
2329
2522
|
* Gets the linear damping of the rigid body.
|
2330
2523
|
* @returns The linear damping of the rigid body.
|
@@ -2334,12 +2527,12 @@ export declare class RigidBody {
|
|
2334
2527
|
* Gets the linear velocity of the rigid body.
|
2335
2528
|
* @returns The linear velocity of the rigid body.
|
2336
2529
|
*/
|
2337
|
-
getLinearVelocity():
|
2530
|
+
getLinearVelocity(): Vector3Like;
|
2338
2531
|
/**
|
2339
2532
|
* Gets the local center of mass of the rigid body.
|
2340
2533
|
* @returns The local center of mass of the rigid body.
|
2341
2534
|
*/
|
2342
|
-
getLocalCenterOfMass():
|
2535
|
+
getLocalCenterOfMass(): Vector3Like;
|
2343
2536
|
/**
|
2344
2537
|
* Gets the mass of the rigid body.
|
2345
2538
|
* @returns The mass of the rigid body.
|
@@ -2349,27 +2542,27 @@ export declare class RigidBody {
|
|
2349
2542
|
* Gets the next kinematic rotation of the rigid body.
|
2350
2543
|
* @returns The next kinematic rotation of the rigid body.
|
2351
2544
|
*/
|
2352
|
-
getNextKinematicRotation():
|
2545
|
+
getNextKinematicRotation(): QuaternionLike;
|
2353
2546
|
/**
|
2354
2547
|
* Gets the next kinematic translation of the rigid body.
|
2355
2548
|
* @returns The next kinematic translation of the rigid body.
|
2356
2549
|
*/
|
2357
|
-
getNextKinematicTranslation():
|
2550
|
+
getNextKinematicTranslation(): Vector3Like;
|
2358
2551
|
/**
|
2359
2552
|
* Gets the principal angular inertia of the rigid body.
|
2360
2553
|
* @returns The principal angular inertia of the rigid body.
|
2361
2554
|
*/
|
2362
|
-
getPrincipalAngularInertia():
|
2555
|
+
getPrincipalAngularInertia(): Vector3Like;
|
2363
2556
|
/**
|
2364
2557
|
* Gets the principal angular inertia local frame of the rigid body.
|
2365
2558
|
* @returns The principal angular inertia local frame of the rigid body.
|
2366
2559
|
*/
|
2367
|
-
getPrincipalAngularInertiaLocalFrame():
|
2560
|
+
getPrincipalAngularInertiaLocalFrame(): QuaternionLike | undefined;
|
2368
2561
|
/**
|
2369
2562
|
* Gets the rotation of the rigid body.
|
2370
2563
|
* @returns The rotation of the rigid body.
|
2371
2564
|
*/
|
2372
|
-
getRotation():
|
2565
|
+
getRotation(): QuaternionLike;
|
2373
2566
|
/**
|
2374
2567
|
* Gets the soft ccd prediction of the rigid body.
|
2375
2568
|
* @returns The soft ccd prediction of the rigid body.
|
@@ -2379,7 +2572,7 @@ export declare class RigidBody {
|
|
2379
2572
|
* Gets the translation of the rigid body.
|
2380
2573
|
* @returns The translation of the rigid body.
|
2381
2574
|
*/
|
2382
|
-
getTranslation():
|
2575
|
+
getTranslation(): Vector3Like;
|
2383
2576
|
/**
|
2384
2577
|
* Gets the type of the rigid body.
|
2385
2578
|
* @returns The type of the rigid body.
|
@@ -2389,7 +2582,7 @@ export declare class RigidBody {
|
|
2389
2582
|
* Gets the world center of mass of the rigid body.
|
2390
2583
|
* @returns The world center of mass of the rigid body.
|
2391
2584
|
*/
|
2392
|
-
getWorldCenterOfMass():
|
2585
|
+
getWorldCenterOfMass(): Vector3Like | undefined;
|
2393
2586
|
/**
|
2394
2587
|
* Sets the additional mass of the rigid body.
|
2395
2588
|
* @param additionalMass - The additional mass of the rigid body.
|
@@ -2414,7 +2607,7 @@ export declare class RigidBody {
|
|
2414
2607
|
* Sets the angular velocity of the rigid body.
|
2415
2608
|
* @param angularVelocity - The angular velocity of the rigid body.
|
2416
2609
|
*/
|
2417
|
-
setAngularVelocity(angularVelocity:
|
2610
|
+
setAngularVelocity(angularVelocity: Vector3Like): void;
|
2418
2611
|
/**
|
2419
2612
|
* Sets whether the rigid body has continuous collision detection enabled.
|
2420
2613
|
* @param ccdEnabled - Whether the rigid body has continuous collision detection enabled.
|
@@ -2454,22 +2647,22 @@ export declare class RigidBody {
|
|
2454
2647
|
* Sets the linear velocity of the rigid body.
|
2455
2648
|
* @param linearVelocity - The linear velocity of the rigid body.
|
2456
2649
|
*/
|
2457
|
-
setLinearVelocity(linearVelocity:
|
2650
|
+
setLinearVelocity(linearVelocity: Vector3Like): void;
|
2458
2651
|
/**
|
2459
2652
|
* Sets the next kinematic rotation of the rigid body.
|
2460
2653
|
* @param nextKinematicRotation - The next kinematic rotation of the rigid body.
|
2461
2654
|
*/
|
2462
|
-
setNextKinematicRotation(nextKinematicRotation:
|
2655
|
+
setNextKinematicRotation(nextKinematicRotation: QuaternionLike): void;
|
2463
2656
|
/**
|
2464
2657
|
* Sets the next kinematic translation of the rigid body.
|
2465
2658
|
* @param nextKinematicTranslation - The next kinematic translation of the rigid body.
|
2466
2659
|
*/
|
2467
|
-
setNextKinematicTranslation(nextKinematicTranslation:
|
2660
|
+
setNextKinematicTranslation(nextKinematicTranslation: Vector3Like): void;
|
2468
2661
|
/**
|
2469
2662
|
* Sets the rotation of the rigid body.
|
2470
2663
|
* @param rotation - The rotation of the rigid body.
|
2471
2664
|
*/
|
2472
|
-
setRotation(rotation:
|
2665
|
+
setRotation(rotation: QuaternionLike): void;
|
2473
2666
|
/**
|
2474
2667
|
* Sets whether the rigid body is sleeping.
|
2475
2668
|
* @param sleeping - Whether the rigid body is sleeping.
|
@@ -2489,7 +2682,7 @@ export declare class RigidBody {
|
|
2489
2682
|
* Sets the translation of the rigid body.
|
2490
2683
|
* @param translation - The translation of the rigid body.
|
2491
2684
|
*/
|
2492
|
-
setTranslation(translation:
|
2685
|
+
setTranslation(translation: Vector3Like): void;
|
2493
2686
|
/**
|
2494
2687
|
* Sets the type of the rigid body.
|
2495
2688
|
* @param type - The type of the rigid body.
|
@@ -2499,12 +2692,12 @@ export declare class RigidBody {
|
|
2499
2692
|
* Adds a force to the rigid body.
|
2500
2693
|
* @param force - The force to add to the rigid body.
|
2501
2694
|
*/
|
2502
|
-
addForce(force:
|
2695
|
+
addForce(force: Vector3Like): void;
|
2503
2696
|
/**
|
2504
2697
|
* Adds a torque to the rigid body.
|
2505
2698
|
* @param torque - The torque to add to the rigid body.
|
2506
2699
|
*/
|
2507
|
-
addTorque(torque:
|
2700
|
+
addTorque(torque: Vector3Like): void;
|
2508
2701
|
/**
|
2509
2702
|
* Adds an unsimulated child collider to the rigid body for the simulation it belongs to.
|
2510
2703
|
* @param collider - The child collider to add to the rigid body for the simulation it belongs to.
|
@@ -2519,18 +2712,18 @@ export declare class RigidBody {
|
|
2519
2712
|
* Applies an impulse to the rigid body.
|
2520
2713
|
* @param impulse - The impulse to apply to the rigid body.
|
2521
2714
|
*/
|
2522
|
-
applyImpulse(impulse:
|
2715
|
+
applyImpulse(impulse: Vector3Like): void;
|
2523
2716
|
/**
|
2524
2717
|
* Applies an impulse to the rigid body at a point.
|
2525
2718
|
* @param impulse - The impulse to apply to the rigid body.
|
2526
2719
|
* @param point - The point at which to apply the impulse.
|
2527
2720
|
*/
|
2528
|
-
applyImpulseAtPoint(impulse:
|
2721
|
+
applyImpulseAtPoint(impulse: Vector3Like, point: Vector3Like): void;
|
2529
2722
|
/**
|
2530
2723
|
* Applies a torque impulse to the rigid body.
|
2531
2724
|
* @param impulse - The torque impulse to apply to the rigid body.
|
2532
2725
|
*/
|
2533
|
-
applyTorqueImpulse(impulse:
|
2726
|
+
applyTorqueImpulse(impulse: Vector3Like): void;
|
2534
2727
|
/**
|
2535
2728
|
* Creates and adds a child collider to the rigid body for the simulation it belongs to.
|
2536
2729
|
* @param colliderOptions - The options for the child collider to add.
|
@@ -2584,9 +2777,9 @@ export declare class RigidBody {
|
|
2584
2777
|
/** Additional mass properties for a RigidBody. @public */
|
2585
2778
|
export declare type RigidBodyAdditionalMassProperties = {
|
2586
2779
|
additionalMass: number;
|
2587
|
-
centerOfMass:
|
2588
|
-
principalAngularInertia:
|
2589
|
-
principalAngularInertiaLocalFrame:
|
2780
|
+
centerOfMass: Vector3Like;
|
2781
|
+
principalAngularInertia: Vector3Like;
|
2782
|
+
principalAngularInertiaLocalFrame: QuaternionLike;
|
2590
2783
|
};
|
2591
2784
|
|
2592
2785
|
/** Options for creating a RigidBody instance. @public */
|
@@ -2602,7 +2795,7 @@ export declare interface RigidBodyOptions {
|
|
2602
2795
|
/** The angular damping of the rigid body. */
|
2603
2796
|
angularDamping?: number;
|
2604
2797
|
/** The angular velocity of the rigid body. */
|
2605
|
-
angularVelocity?:
|
2798
|
+
angularVelocity?: Vector3Like;
|
2606
2799
|
/** Whether the rigid body has continuous collision detection enabled. */
|
2607
2800
|
ccdEnabled?: boolean;
|
2608
2801
|
/** The colliders of the rigid body, provided as {@link ColliderOptions}. */
|
@@ -2620,9 +2813,9 @@ export declare interface RigidBodyOptions {
|
|
2620
2813
|
/** The linear damping of the rigid body. */
|
2621
2814
|
linearDamping?: number;
|
2622
2815
|
/** The linear velocity of the rigid body. */
|
2623
|
-
linearVelocity?:
|
2816
|
+
linearVelocity?: Vector3Like;
|
2624
2817
|
/** The rotation of the rigid body. */
|
2625
|
-
rotation?:
|
2818
|
+
rotation?: QuaternionLike;
|
2626
2819
|
/** The simulation the rigid body is in. If provided, the rigid body will be automatically added to the simulation. */
|
2627
2820
|
simulation?: Simulation;
|
2628
2821
|
/** Whether the rigid body is sleeping. */
|
@@ -2630,7 +2823,7 @@ export declare interface RigidBodyOptions {
|
|
2630
2823
|
/** The soft continuous collision detection prediction of the rigid body. */
|
2631
2824
|
softCcdPrediction?: number;
|
2632
2825
|
/** The translation of the rigid body. */
|
2633
|
-
translation?:
|
2826
|
+
translation?: Vector3Like;
|
2634
2827
|
}
|
2635
2828
|
|
2636
2829
|
/** The types a RigidBody can be. @public */
|
@@ -2641,14 +2834,6 @@ export declare enum RigidBodyType {
|
|
2641
2834
|
KINEMATIC_VELOCITY = "kinematic_velocity"
|
2642
2835
|
}
|
2643
2836
|
|
2644
|
-
/** A rotation in quaternion form. @public */
|
2645
|
-
export declare interface Rotation {
|
2646
|
-
x: number;
|
2647
|
-
y: number;
|
2648
|
-
z: number;
|
2649
|
-
w: number;
|
2650
|
-
}
|
2651
|
-
|
2652
2837
|
/**
|
2653
2838
|
* A simple character controller with basic movement functions.
|
2654
2839
|
*
|
@@ -2704,7 +2889,7 @@ export declare class SimpleCharacterController extends BaseCharacterController {
|
|
2704
2889
|
* @param speed - The speed at which to rotate to the target coordinate.
|
2705
2890
|
* @param options - Additional options for the face operation, such as callbacks.
|
2706
2891
|
*/
|
2707
|
-
face(target:
|
2892
|
+
face(target: Vector3Like, speed: number, options?: FaceOptions): void;
|
2708
2893
|
/**
|
2709
2894
|
* Moves the entity at a given speed in a straight line to a target coordinate.
|
2710
2895
|
*
|
@@ -2717,7 +2902,7 @@ export declare class SimpleCharacterController extends BaseCharacterController {
|
|
2717
2902
|
* @param speed - The speed at which to move to the target coordinate.
|
2718
2903
|
* @param options - Additional options for the move operation, such as callbacks.
|
2719
2904
|
*/
|
2720
|
-
move(target:
|
2905
|
+
move(target: Vector3Like, speed: number, options?: MoveOptions): void;
|
2721
2906
|
|
2722
2907
|
}
|
2723
2908
|
|
@@ -2802,11 +2987,203 @@ export declare function startServer(init: (world: World) => void): void;
|
|
2802
2987
|
/** The input keys that can be included in the PlayerInputState. @public */
|
2803
2988
|
export declare const SUPPORTED_INPUT_KEYS: readonly ["w", "a", "s", "d", "sp", "sh", "tb", "ml", "mr", "q", "e", "r", "f", "z", "x", "c", "v", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"];
|
2804
2989
|
|
2805
|
-
/**
|
2806
|
-
|
2807
|
-
|
2808
|
-
|
2809
|
-
|
2990
|
+
/**
|
2991
|
+
* Represents a 3-dimensional vector.
|
2992
|
+
*
|
2993
|
+
* @remarks
|
2994
|
+
* All vector methods result in mutation of the vector instance.
|
2995
|
+
* This class extends `Float32Array` to provide an efficient way to
|
2996
|
+
* create and manipulate a 3-dimensional vector. Various convenience
|
2997
|
+
* methods are provided for common vector operations.
|
2998
|
+
*
|
2999
|
+
* @public
|
3000
|
+
*/
|
3001
|
+
export declare class Vector3 extends Float32Array implements Vector3Like {
|
3002
|
+
constructor(x: number, y: number, z: number);
|
3003
|
+
/** The magnitude of the vector. Also known as the length. */
|
3004
|
+
get magnitude(): number;
|
3005
|
+
/** The squared magnitude of the vector. Also known as the squared length. */
|
3006
|
+
get squaredMagnitude(): number;
|
3007
|
+
/** The x-component of the vector. */
|
3008
|
+
get x(): number;
|
3009
|
+
set x(value: number);
|
3010
|
+
/** The y-component of the vector. */
|
3011
|
+
get y(): number;
|
3012
|
+
set y(value: number);
|
3013
|
+
/** The z-component of the vector. */
|
3014
|
+
get z(): number;
|
3015
|
+
set z(value: number);
|
3016
|
+
/**
|
3017
|
+
* Creates a new `Vector3` instance from a `Vector3Like` object.
|
3018
|
+
*
|
3019
|
+
* @param vector3Like - The `Vector3Like` object to create the `Vector3` instance from.
|
3020
|
+
* @returns A new `Vector3` instance.
|
3021
|
+
*/
|
3022
|
+
static fromVector3Like(vector3Like: Vector3Like): Vector3;
|
3023
|
+
/**
|
3024
|
+
* Adds a vector to the current vector.
|
3025
|
+
*
|
3026
|
+
* @param vector3 - The vector to add to the current vector.
|
3027
|
+
* @returns The current vector.
|
3028
|
+
*/
|
3029
|
+
add(vector3: Vector3): Vector3;
|
3030
|
+
/**
|
3031
|
+
* Rounds each component of the vector up to the nearest integer.
|
3032
|
+
*
|
3033
|
+
* @returns The current vector.
|
3034
|
+
*/
|
3035
|
+
ceil(): Vector3;
|
3036
|
+
/**
|
3037
|
+
* Returns a new vector with the same components as the current vector.
|
3038
|
+
*
|
3039
|
+
* @returns A new vector.
|
3040
|
+
*/
|
3041
|
+
clone(): Vector3;
|
3042
|
+
/**
|
3043
|
+
* Copies the components of a vector to the current vector.
|
3044
|
+
*
|
3045
|
+
* @param vector3 - The vector to copy the components from.
|
3046
|
+
* @returns The current vector.
|
3047
|
+
*/
|
3048
|
+
copy(vector3: Vector3): Vector3;
|
3049
|
+
/**
|
3050
|
+
* Calculates the cross product of the current vector and another vector.
|
3051
|
+
*
|
3052
|
+
* @param vector3 - The vector to calculate the cross product with.
|
3053
|
+
* @returns The current vector.
|
3054
|
+
*/
|
3055
|
+
cross(vector3: Vector3): Vector3;
|
3056
|
+
/**
|
3057
|
+
* Calculates the distance between the current vector and another vector.
|
3058
|
+
*
|
3059
|
+
* @param vector3 - The vector to calculate the distance to.
|
3060
|
+
* @returns The distance between the two vectors.
|
3061
|
+
*/
|
3062
|
+
distance(vector3: Vector3): number;
|
3063
|
+
/**
|
3064
|
+
* Divides each component of the current vector by the corresponding component of another vector.
|
3065
|
+
*
|
3066
|
+
* @param vector3 - The vector to divide the current vector by.
|
3067
|
+
* @returns The current vector.
|
3068
|
+
*/
|
3069
|
+
divide(vector3: Vector3): Vector3;
|
3070
|
+
/**
|
3071
|
+
* Checks if the current vector is approximately equal to another vector.
|
3072
|
+
*
|
3073
|
+
* @param vector3 - The vector to compare to.
|
3074
|
+
* @returns A boolean indicating whether the two vectors are approximately equal.
|
3075
|
+
*/
|
3076
|
+
equals(vector3: Vector3): boolean;
|
3077
|
+
/**
|
3078
|
+
* Checks if the current vector is exactly equal to another vector.
|
3079
|
+
*
|
3080
|
+
* @param vector3 - The vector to compare to.
|
3081
|
+
* @returns A boolean indicating whether the two vectors are exactly equal.
|
3082
|
+
*/
|
3083
|
+
exactEquals(vector3: Vector3): boolean;
|
3084
|
+
/**
|
3085
|
+
* Rounds each component of the vector down to the nearest integer.
|
3086
|
+
*
|
3087
|
+
* @returns The current vector.
|
3088
|
+
*/
|
3089
|
+
floor(): Vector3;
|
3090
|
+
/**
|
3091
|
+
* Inverts each component of the vector.
|
3092
|
+
*
|
3093
|
+
* @returns The current vector.
|
3094
|
+
*/
|
3095
|
+
invert(): Vector3;
|
3096
|
+
/**
|
3097
|
+
* Linearly interpolates between the current vector and another vector.
|
3098
|
+
*
|
3099
|
+
* @param vector3 - The vector to interpolate to.
|
3100
|
+
* @param t - The interpolation factor. A value between 0 and 1.
|
3101
|
+
* @returns The current vector.
|
3102
|
+
*/
|
3103
|
+
lerp(vector3: Vector3, t: number): Vector3;
|
3104
|
+
/**
|
3105
|
+
* Sets each component of the vector to the maximum of the current vector and another vector.
|
3106
|
+
*
|
3107
|
+
* @param vector3 - The vector to compare to.
|
3108
|
+
* @returns The current vector.
|
3109
|
+
*/
|
3110
|
+
max(vector3: Vector3): Vector3;
|
3111
|
+
/**
|
3112
|
+
* Sets each component of the vector to the minimum of the current vector and another vector.
|
3113
|
+
*
|
3114
|
+
* @param vector3 - The vector to compare to.
|
3115
|
+
* @returns The current vector.
|
3116
|
+
*/
|
3117
|
+
min(vector3: Vector3): Vector3;
|
3118
|
+
/**
|
3119
|
+
* Multiplies each component of the current vector by the corresponding component of another vector.
|
3120
|
+
*
|
3121
|
+
* @param vector3 - The vector to multiply the current vector by.
|
3122
|
+
* @returns The current vector.
|
3123
|
+
*/
|
3124
|
+
multiply(vector3: Vector3): Vector3;
|
3125
|
+
/**
|
3126
|
+
* Negates each component of the vector.
|
3127
|
+
*
|
3128
|
+
* @returns The current vector.
|
3129
|
+
*/
|
3130
|
+
negate(): Vector3;
|
3131
|
+
/**
|
3132
|
+
* Normalizes the vector.
|
3133
|
+
*
|
3134
|
+
* @returns The current vector.
|
3135
|
+
*/
|
3136
|
+
normalize(): Vector3;
|
3137
|
+
/**
|
3138
|
+
* Rotates the vector around the x-axis.
|
3139
|
+
*
|
3140
|
+
* @param vector3 - The origin vector to rotate around.
|
3141
|
+
* @param angle - The angle to rotate the vector by.
|
3142
|
+
* @returns The current vector.
|
3143
|
+
*/
|
3144
|
+
rotateX(vector3: Vector3, angle: number): Vector3;
|
3145
|
+
/**
|
3146
|
+
* Rotates the vector around the y-axis.
|
3147
|
+
*
|
3148
|
+
* @param vector3 - The origin vector to rotate around.
|
3149
|
+
* @param angle - The angle to rotate the vector by.
|
3150
|
+
* @returns The current vector.
|
3151
|
+
*/
|
3152
|
+
rotateY(vector3: Vector3, angle: number): Vector3;
|
3153
|
+
/**
|
3154
|
+
* Rotates the vector around the z-axis.
|
3155
|
+
*
|
3156
|
+
* @param vector3 - The origin vector to rotate around.
|
3157
|
+
* @param angle - The angle to rotate the vector by.
|
3158
|
+
* @returns The current vector.
|
3159
|
+
*/
|
3160
|
+
rotateZ(vector3: Vector3, angle: number): Vector3;
|
3161
|
+
/**
|
3162
|
+
* Rounds each component of the vector to the nearest integer.
|
3163
|
+
*
|
3164
|
+
* @returns The current vector.
|
3165
|
+
*/
|
3166
|
+
round(): Vector3;
|
3167
|
+
/**
|
3168
|
+
* Scales each component of the vector by a scalar value.
|
3169
|
+
*
|
3170
|
+
* @param scale - The scalar value to scale the vector by.
|
3171
|
+
* @returns The current vector.
|
3172
|
+
*/
|
3173
|
+
scale(scale: number): Vector3;
|
3174
|
+
/**
|
3175
|
+
* Subtracts a vector from the current vector.
|
3176
|
+
*
|
3177
|
+
* @param vector3 - The vector to subtract from the current vector.
|
3178
|
+
* @returns The current vector.
|
3179
|
+
*/
|
3180
|
+
subtract(vector3: Vector3): Vector3;
|
3181
|
+
/**
|
3182
|
+
* Returns a string representation of the vector in x,y,z format.
|
3183
|
+
*
|
3184
|
+
* @returns A string representation of the vector in the format x,y,z.
|
3185
|
+
*/
|
3186
|
+
toString(): string;
|
2810
3187
|
}
|
2811
3188
|
|
2812
3189
|
/** A 3-dimensional vector of boolean values. @public */
|
@@ -2816,6 +3193,13 @@ export declare interface Vector3Boolean {
|
|
2816
3193
|
z: boolean;
|
2817
3194
|
}
|
2818
3195
|
|
3196
|
+
/** A 3-dimensional vector. @public */
|
3197
|
+
export declare interface Vector3Like {
|
3198
|
+
x: number;
|
3199
|
+
y: number;
|
3200
|
+
z: number;
|
3201
|
+
}
|
3202
|
+
|
2819
3203
|
/**
|
2820
3204
|
* Represents a world in the game server.
|
2821
3205
|
*
|
@@ -3001,7 +3385,7 @@ export declare interface WorldOptions {
|
|
3001
3385
|
/** The tick rate for the world. */
|
3002
3386
|
tickRate?: number;
|
3003
3387
|
/** The gravity vector for the world. */
|
3004
|
-
gravity?:
|
3388
|
+
gravity?: Vector3Like;
|
3005
3389
|
}
|
3006
3390
|
|
3007
3391
|
export { }
|