hytopia 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +16 -12
- package/boilerplate/assets/audio/sfx/step.wav +0 -0
- package/boilerplate/assets/map.json +2623 -0
- package/boilerplate/index.ts +103 -0
- package/docs/index.md +29 -0
- package/docs/server.audio._constructor_.md +47 -0
- package/docs/server.audio.attachedtoentity.md +13 -0
- package/docs/server.audio.detune.md +13 -0
- package/docs/server.audio.distortion.md +13 -0
- package/docs/server.audio.duration.md +13 -0
- package/docs/server.audio.id.md +13 -0
- package/docs/server.audio.isloaded.md +13 -0
- package/docs/server.audio.isplaying.md +13 -0
- package/docs/server.audio.ispositional.md +13 -0
- package/docs/server.audio.loop.md +13 -0
- package/docs/server.audio.md +591 -0
- package/docs/server.audio.offset.md +13 -0
- package/docs/server.audio.pause.md +17 -0
- package/docs/server.audio.play.md +69 -0
- package/docs/server.audio.playbackrate.md +13 -0
- package/docs/server.audio.position.md +13 -0
- package/docs/server.audio.referencedistance.md +13 -0
- package/docs/server.audio.setattachedtoentity.md +53 -0
- package/docs/server.audio.setdetune.md +53 -0
- package/docs/server.audio.setdistortion.md +53 -0
- package/docs/server.audio.setplaybackrate.md +53 -0
- package/docs/server.audio.setposition.md +53 -0
- package/docs/server.audio.setreferencedistance.md +53 -0
- package/docs/server.audio.setvolume.md +53 -0
- package/docs/server.audio.starttick.md +13 -0
- package/docs/server.audio.uri.md +13 -0
- package/docs/server.audio.volume.md +13 -0
- package/docs/server.audio.world.md +13 -0
- package/docs/server.audioeventpayload.md +118 -0
- package/docs/server.audioeventpayload.pause.audio.md +11 -0
- package/docs/server.audioeventpayload.pause.md +53 -0
- package/docs/server.audioeventpayload.play.audio.md +11 -0
- package/docs/server.audioeventpayload.play.md +53 -0
- package/docs/server.audioeventpayload.playrestart.audio.md +11 -0
- package/docs/server.audioeventpayload.playrestart.md +53 -0
- package/docs/server.audioeventpayload.setattachedtoentity.audio.md +11 -0
- package/docs/server.audioeventpayload.setattachedtoentity.entity.md +11 -0
- package/docs/server.audioeventpayload.setattachedtoentity.md +70 -0
- package/docs/server.audioeventpayload.setdetune.audio.md +11 -0
- package/docs/server.audioeventpayload.setdetune.detune.md +11 -0
- package/docs/server.audioeventpayload.setdetune.md +70 -0
- package/docs/server.audioeventpayload.setdistortion.audio.md +11 -0
- package/docs/server.audioeventpayload.setdistortion.distortion.md +11 -0
- package/docs/server.audioeventpayload.setdistortion.md +70 -0
- package/docs/server.audioeventpayload.setplaybackrate.audio.md +11 -0
- package/docs/server.audioeventpayload.setplaybackrate.md +70 -0
- package/docs/server.audioeventpayload.setplaybackrate.playbackrate.md +11 -0
- package/docs/server.audioeventpayload.setposition.audio.md +11 -0
- package/docs/server.audioeventpayload.setposition.md +70 -0
- package/docs/server.audioeventpayload.setposition.position.md +11 -0
- package/docs/server.audioeventpayload.setreferencedistance.audio.md +11 -0
- package/docs/server.audioeventpayload.setreferencedistance.md +70 -0
- package/docs/server.audioeventpayload.setreferencedistance.referencedistance.md +11 -0
- package/docs/server.audioeventpayload.setvolume.audio.md +11 -0
- package/docs/server.audioeventpayload.setvolume.md +70 -0
- package/docs/server.audioeventpayload.setvolume.volume.md +11 -0
- package/docs/server.audioeventtype.md +173 -0
- package/docs/server.audiomanager.getallaudios.md +19 -0
- package/docs/server.audiomanager.getallentityattachedaudios.md +55 -0
- package/docs/server.audiomanager.getallloopedaudios.md +19 -0
- package/docs/server.audiomanager.getalloneshotaudios.md +19 -0
- package/docs/server.audiomanager.md +150 -0
- package/docs/server.audiomanager.world.md +13 -0
- package/docs/server.audiooptions.attachedtoentity.md +13 -0
- package/docs/server.audiooptions.detune.md +13 -0
- package/docs/server.audiooptions.distortion.md +13 -0
- package/docs/server.audiooptions.duration.md +13 -0
- package/docs/server.audiooptions.loop.md +13 -0
- package/docs/server.audiooptions.md +247 -0
- package/docs/server.audiooptions.offset.md +13 -0
- package/docs/server.audiooptions.playbackrate.md +13 -0
- package/docs/server.audiooptions.position.md +13 -0
- package/docs/server.audiooptions.referencedistance.md +13 -0
- package/docs/server.audiooptions.uri.md +13 -0
- package/docs/server.audiooptions.volume.md +13 -0
- package/docs/server.basecharactercontroller._constructor_.md +65 -0
- package/docs/server.basecharactercontroller.createsensorcolliders.md +19 -0
- package/docs/server.basecharactercontroller.entity.md +13 -0
- package/docs/server.basecharactercontroller.md +197 -0
- package/docs/server.basecharactercontroller.ontickpathfindingmovement.md +13 -0
- package/docs/server.basecharactercontroller.ontickplayermovement.md +13 -0
- package/docs/server.basecharactercontroller.tickpathfindingmovement.md +69 -0
- package/docs/server.basecharactercontroller.tickplayermovement.md +85 -0
- package/docs/server.block.blocktype.md +13 -0
- package/docs/server.block.globalcoordinate.md +13 -0
- package/docs/server.block.md +86 -0
- package/docs/server.blocktype._constructor_.md +49 -0
- package/docs/server.blocktype.collideroptions.md +13 -0
- package/docs/server.blocktype.id.md +13 -0
- package/docs/server.blocktype.ismeshable.md +13 -0
- package/docs/server.blocktype.md +235 -0
- package/docs/server.blocktype.name.md +13 -0
- package/docs/server.blocktype.onentitycollision.md +13 -0
- package/docs/server.blocktype.onentitycontactforce.md +13 -0
- package/docs/server.blocktype.textureuri.md +13 -0
- package/docs/server.blocktypeoptions.customcollideroptions.md +11 -0
- package/docs/server.blocktypeoptions.id.md +11 -0
- package/docs/server.blocktypeoptions.md +108 -0
- package/docs/server.blocktypeoptions.name.md +11 -0
- package/docs/server.blocktypeoptions.textureuri.md +11 -0
- package/docs/server.blocktyperegistry.getallblocktypes.md +19 -0
- package/docs/server.blocktyperegistry.getblocktype.md +55 -0
- package/docs/server.blocktyperegistry.md +153 -0
- package/docs/server.blocktyperegistry.registerblocktype.md +69 -0
- package/docs/server.blocktyperegistry.registergenericblocktype.md +55 -0
- package/docs/server.blocktyperegistry.world.md +13 -0
- package/docs/server.blocktyperegistryeventpayload.md +37 -0
- package/docs/server.blocktyperegistryeventpayload.registerblocktype.blocktype.md +11 -0
- package/docs/server.blocktyperegistryeventpayload.registerblocktype.blocktyperegistry.md +11 -0
- package/docs/server.blocktyperegistryeventpayload.registerblocktype.id.md +11 -0
- package/docs/server.blocktyperegistryeventpayload.registerblocktype.md +87 -0
- package/docs/server.blocktyperegistryeventtype.md +47 -0
- package/docs/server.chateventpayload.md +46 -0
- package/docs/server.chateventpayload.sendbroadcastmessage.color.md +11 -0
- package/docs/server.chateventpayload.sendbroadcastmessage.md +72 -0
- package/docs/server.chateventpayload.sendbroadcastmessage.message.md +11 -0
- package/docs/server.chateventpayload.sendplayermessage.color.md +11 -0
- package/docs/server.chateventpayload.sendplayermessage.md +89 -0
- package/docs/server.chateventpayload.sendplayermessage.message.md +11 -0
- package/docs/server.chateventpayload.sendplayermessage.player.md +11 -0
- package/docs/server.chateventtype.md +61 -0
- package/docs/server.chatmanager.md +112 -0
- package/docs/server.chatmanager.registercommand.md +69 -0
- package/docs/server.chatmanager.sendbroadcastmessage.md +76 -0
- package/docs/server.chatmanager.sendplayermessage.md +92 -0
- package/docs/server.chatmanager.unregistercommand.md +53 -0
- package/docs/server.chunk._constructor_.md +13 -0
- package/docs/server.chunk.blockindextolocalcoordinate.md +55 -0
- package/docs/server.chunk.blocks.md +13 -0
- package/docs/server.chunk.despawn.md +17 -0
- package/docs/server.chunk.globalcoordinatetolocalcoordinate.md +55 -0
- package/docs/server.chunk.globalcoordinatetoorigincoordinate.md +55 -0
- package/docs/server.chunk.issimulated.md +13 -0
- package/docs/server.chunk.isspawned.md +13 -0
- package/docs/server.chunk.isvalidorigincoordinate.md +55 -0
- package/docs/server.chunk.md +324 -0
- package/docs/server.chunk.origincoordinate.md +13 -0
- package/docs/server.chunk.setblock.md +69 -0
- package/docs/server.chunk.spawn.md +69 -0
- package/docs/server.chunk.world.md +13 -0
- package/docs/server.chunkeventpayload.despawn.chunk.md +11 -0
- package/docs/server.chunkeventpayload.despawn.md +53 -0
- package/docs/server.chunkeventpayload.md +55 -0
- package/docs/server.chunkeventpayload.setblock.blocktypeid.md +11 -0
- package/docs/server.chunkeventpayload.setblock.chunk.md +11 -0
- package/docs/server.chunkeventpayload.setblock.globalcoordinate.md +11 -0
- package/docs/server.chunkeventpayload.setblock.localcoordinate.md +11 -0
- package/docs/server.chunkeventpayload.setblock.md +104 -0
- package/docs/server.chunkeventpayload.spawn.chunk.md +11 -0
- package/docs/server.chunkeventpayload.spawn.md +53 -0
- package/docs/server.chunkeventtype.md +75 -0
- package/docs/server.chunklattice._constructor_.md +49 -0
- package/docs/server.chunklattice.getallchunks.md +19 -0
- package/docs/server.chunklattice.getchunk.md +55 -0
- package/docs/server.chunklattice.haschunk.md +55 -0
- package/docs/server.chunklattice.md +127 -0
- package/docs/server.chunklattice.setblock.md +69 -0
- package/docs/server.collider._constructor_.md +49 -0
- package/docs/server.collider.addtosimulation.md +69 -0
- package/docs/server.collider.enablecollisionevents.md +53 -0
- package/docs/server.collider.enablecontactforceevents.md +53 -0
- package/docs/server.collider.getbounciness.md +19 -0
- package/docs/server.collider.getcollisiongroups.md +19 -0
- package/docs/server.collider.getfriction.md +19 -0
- package/docs/server.collider.getrelativerotation.md +19 -0
- package/docs/server.collider.getrelativetranslation.md +19 -0
- package/docs/server.collider.isenabled.md +13 -0
- package/docs/server.collider.isremoved.md +13 -0
- package/docs/server.collider.issensor.md +13 -0
- package/docs/server.collider.issimulated.md +13 -0
- package/docs/server.collider.md +509 -0
- package/docs/server.collider.parentrigidbody.md +13 -0
- package/docs/server.collider.rawcollider.md +13 -0
- package/docs/server.collider.removefromsimulation.md +17 -0
- package/docs/server.collider.setbounciness.md +53 -0
- package/docs/server.collider.setcollisiongroups.md +53 -0
- package/docs/server.collider.setenabled.md +53 -0
- package/docs/server.collider.setfriction.md +53 -0
- package/docs/server.collider.setmass.md +53 -0
- package/docs/server.collider.setoncollision.md +53 -0
- package/docs/server.collider.setrelativerotation.md +53 -0
- package/docs/server.collider.setrelativetranslation.md +53 -0
- package/docs/server.collider.setsensor.md +53 -0
- package/docs/server.collider.settag.md +53 -0
- package/docs/server.collider.tag.md +13 -0
- package/docs/server.collideroptions.borderradius.md +13 -0
- package/docs/server.collideroptions.bounciness.md +13 -0
- package/docs/server.collideroptions.collisiongroups.md +13 -0
- package/docs/server.collideroptions.enabled.md +13 -0
- package/docs/server.collideroptions.friction.md +13 -0
- package/docs/server.collideroptions.halfextents.md +13 -0
- package/docs/server.collideroptions.halfheight.md +13 -0
- package/docs/server.collideroptions.issensor.md +13 -0
- package/docs/server.collideroptions.mass.md +13 -0
- package/docs/server.collideroptions.md +361 -0
- package/docs/server.collideroptions.oncollision.md +13 -0
- package/docs/server.collideroptions.parentrigidbody.md +13 -0
- package/docs/server.collideroptions.radius.md +13 -0
- package/docs/server.collideroptions.relativerotation.md +13 -0
- package/docs/server.collideroptions.relativetranslation.md +13 -0
- package/docs/server.collideroptions.shape.md +13 -0
- package/docs/server.collideroptions.simulation.md +13 -0
- package/docs/server.collideroptions.tag.md +13 -0
- package/docs/server.collidershape.md +117 -0
- package/docs/server.collisioncallback.md +15 -0
- package/docs/server.collisiongroup.md +116 -0
- package/docs/server.collisiongroups.md +18 -0
- package/docs/server.collisiongroupsbuilder.buildrawcollisiongroups.md +55 -0
- package/docs/server.collisiongroupsbuilder.decodecollisiongroups.md +55 -0
- package/docs/server.collisiongroupsbuilder.decoderawcollisiongroups.md +55 -0
- package/docs/server.collisiongroupsbuilder.isdefaultcollisiongroups.md +55 -0
- package/docs/server.collisiongroupsbuilder.md +101 -0
- package/docs/server.commandcallback.md +15 -0
- package/docs/server.decodedcollisiongroups.md +16 -0
- package/docs/server.default_entity_rigid_body_options.md +13 -0
- package/docs/server.defaultcharactercontroller._constructor_.md +65 -0
- package/docs/server.defaultcharactercontroller.canjump.md +13 -0
- package/docs/server.defaultcharactercontroller.canrun.md +13 -0
- package/docs/server.defaultcharactercontroller.canwalk.md +13 -0
- package/docs/server.defaultcharactercontroller.createsensorcolliders.md +19 -0
- package/docs/server.defaultcharactercontroller.isgrounded.md +13 -0
- package/docs/server.defaultcharactercontroller.isonplatform.md +13 -0
- package/docs/server.defaultcharactercontroller.jumpvelocity.md +13 -0
- package/docs/server.defaultcharactercontroller.md +333 -0
- package/docs/server.defaultcharactercontroller.platform.md +13 -0
- package/docs/server.defaultcharactercontroller.runvelocity.md +13 -0
- package/docs/server.defaultcharactercontroller.tickpathfindingmovement.md +69 -0
- package/docs/server.defaultcharactercontroller.tickplayermovement.md +85 -0
- package/docs/server.defaultcharactercontroller.walkvelocity.md +13 -0
- package/docs/server.defaultcharactercontrolleroptions.canjump.md +13 -0
- package/docs/server.defaultcharactercontrolleroptions.canrun.md +13 -0
- package/docs/server.defaultcharactercontrolleroptions.canwalk.md +13 -0
- package/docs/server.defaultcharactercontrolleroptions.jumpvelocity.md +13 -0
- package/docs/server.defaultcharactercontrolleroptions.md +152 -0
- package/docs/server.defaultcharactercontrolleroptions.runvelocity.md +13 -0
- package/docs/server.defaultcharactercontrolleroptions.walkvelocity.md +13 -0
- package/docs/server.entity._constructor_.md +49 -0
- package/docs/server.entity.charactercontroller.md +13 -0
- package/docs/server.entity.createcustomcharactercontroller.md +13 -0
- package/docs/server.entity.despawn.md +17 -0
- package/docs/server.entity.id.md +13 -0
- package/docs/server.entity.isspawned.md +13 -0
- package/docs/server.entity.md +529 -0
- package/docs/server.entity.modelloopedanimations.md +13 -0
- package/docs/server.entity.modelscale.md +13 -0
- package/docs/server.entity.modeluri.md +13 -0
- package/docs/server.entity.name.md +13 -0
- package/docs/server.entity.onblockcollision.md +13 -0
- package/docs/server.entity.onblockcontactforce.md +13 -0
- package/docs/server.entity.ondespawn.md +13 -0
- package/docs/server.entity.onentitycollision.md +13 -0
- package/docs/server.entity.onentitycontactforce.md +13 -0
- package/docs/server.entity.onspawn.md +13 -0
- package/docs/server.entity.ontick.md +13 -0
- package/docs/server.entity.setcharactercontroller.md +53 -0
- package/docs/server.entity.spawn.md +69 -0
- package/docs/server.entity.startmodelloopedanimations.md +53 -0
- package/docs/server.entity.startmodeloneshotanimations.md +53 -0
- package/docs/server.entity.stopmodelanimations.md +53 -0
- package/docs/server.entity.world.md +13 -0
- package/docs/server.entityeventpayload.despawn.entity.md +11 -0
- package/docs/server.entityeventpayload.despawn.md +53 -0
- package/docs/server.entityeventpayload.md +91 -0
- package/docs/server.entityeventpayload.spawn.entity.md +11 -0
- package/docs/server.entityeventpayload.spawn.md +53 -0
- package/docs/server.entityeventpayload.startmodelloopedanimations.animations.md +11 -0
- package/docs/server.entityeventpayload.startmodelloopedanimations.entity.md +11 -0
- package/docs/server.entityeventpayload.startmodelloopedanimations.md +70 -0
- package/docs/server.entityeventpayload.startmodeloneshotanimations.animations.md +11 -0
- package/docs/server.entityeventpayload.startmodeloneshotanimations.entity.md +11 -0
- package/docs/server.entityeventpayload.startmodeloneshotanimations.md +70 -0
- package/docs/server.entityeventpayload.stopmodelanimations.animations.md +11 -0
- package/docs/server.entityeventpayload.stopmodelanimations.entity.md +11 -0
- package/docs/server.entityeventpayload.stopmodelanimations.md +70 -0
- package/docs/server.entityeventpayload.updaterotation.entity.md +11 -0
- package/docs/server.entityeventpayload.updaterotation.md +70 -0
- package/docs/server.entityeventpayload.updaterotation.rotation.md +11 -0
- package/docs/server.entityeventpayload.updatetranslation.entity.md +11 -0
- package/docs/server.entityeventpayload.updatetranslation.md +70 -0
- package/docs/server.entityeventpayload.updatetranslation.translation.md +11 -0
- package/docs/server.entityeventtype.md +131 -0
- package/docs/server.entitymanager.getallentities.md +19 -0
- package/docs/server.entitymanager.getallplayerentities.md +55 -0
- package/docs/server.entitymanager.getentity.md +55 -0
- package/docs/server.entitymanager.md +136 -0
- package/docs/server.entitymanager.world.md +13 -0
- package/docs/server.entityoptions.md +133 -0
- package/docs/server.entityoptions.modelloopedanimations.md +13 -0
- package/docs/server.entityoptions.modelscale.md +13 -0
- package/docs/server.entityoptions.modeluri.md +13 -0
- package/docs/server.entityoptions.name.md +13 -0
- package/docs/server.entityoptions.rigidbodyoptions.md +13 -0
- package/docs/server.event_2.md +76 -0
- package/docs/server.event_2.payload.md +13 -0
- package/docs/server.event_2.type.md +13 -0
- package/docs/server.eventrouter._constructor_.md +49 -0
- package/docs/server.eventrouter.emit.md +55 -0
- package/docs/server.eventrouter.logallevents.md +13 -0
- package/docs/server.eventrouter.logeventspayloads.md +13 -0
- package/docs/server.eventrouter.logignoreeventprefixes.md +13 -0
- package/docs/server.eventrouter.logignoreevents.md +13 -0
- package/docs/server.eventrouter.logunlistenedevents.md +13 -0
- package/docs/server.eventrouter.md +270 -0
- package/docs/server.eventrouter.off.md +69 -0
- package/docs/server.eventrouter.offall.md +53 -0
- package/docs/server.eventrouter.on.md +73 -0
- package/docs/server.eventrouter.serverinstance.md +13 -0
- package/docs/server.gameserver.instance.md +13 -0
- package/docs/server.gameserver.md +109 -0
- package/docs/server.gameserver.playermanager.md +13 -0
- package/docs/server.gameserver.worlds.md +15 -0
- package/docs/server.gameservereventpayload.md +46 -0
- package/docs/server.gameservereventpayload.start.md +53 -0
- package/docs/server.gameservereventpayload.start.startedatms.md +11 -0
- package/docs/server.gameservereventpayload.stop.md +53 -0
- package/docs/server.gameservereventpayload.stop.stoppedatms.md +11 -0
- package/docs/server.gameservereventtype.md +61 -0
- package/docs/server.hytopia.audio._constructor_.md +47 -0
- package/docs/server.hytopia.audio.attachedtoentity.md +13 -0
- package/docs/server.hytopia.audio.detune.md +13 -0
- package/docs/server.hytopia.audio.distortion.md +13 -0
- package/docs/server.hytopia.audio.duration.md +13 -0
- package/docs/server.hytopia.audio.id.md +13 -0
- package/docs/server.hytopia.audio.isloaded.md +13 -0
- package/docs/server.hytopia.audio.isplaying.md +13 -0
- package/docs/server.hytopia.audio.ispositional.md +13 -0
- package/docs/server.hytopia.audio.loop.md +13 -0
- package/docs/server.hytopia.audio.md +591 -0
- package/docs/server.hytopia.audio.offset.md +13 -0
- package/docs/server.hytopia.audio.pause.md +17 -0
- package/docs/server.hytopia.audio.play.md +69 -0
- package/docs/server.hytopia.audio.playbackrate.md +13 -0
- package/docs/server.hytopia.audio.position.md +13 -0
- package/docs/server.hytopia.audio.referencedistance.md +13 -0
- package/docs/server.hytopia.audio.setattachedtoentity.md +53 -0
- package/docs/server.hytopia.audio.setdetune.md +53 -0
- package/docs/server.hytopia.audio.setdistortion.md +53 -0
- package/docs/server.hytopia.audio.setplaybackrate.md +53 -0
- package/docs/server.hytopia.audio.setposition.md +53 -0
- package/docs/server.hytopia.audio.setreferencedistance.md +53 -0
- package/docs/server.hytopia.audio.setvolume.md +53 -0
- package/docs/server.hytopia.audio.starttick.md +13 -0
- package/docs/server.hytopia.audio.uri.md +13 -0
- package/docs/server.hytopia.audio.volume.md +13 -0
- package/docs/server.hytopia.audio.world.md +13 -0
- package/docs/server.hytopia.audioeventpayload.md +118 -0
- package/docs/server.hytopia.audioeventpayload.pause.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.pause.md +53 -0
- package/docs/server.hytopia.audioeventpayload.play.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.play.md +53 -0
- package/docs/server.hytopia.audioeventpayload.playrestart.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.playrestart.md +53 -0
- package/docs/server.hytopia.audioeventpayload.setattachedtoentity.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setattachedtoentity.entity.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setattachedtoentity.md +70 -0
- package/docs/server.hytopia.audioeventpayload.setdetune.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setdetune.detune.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setdetune.md +70 -0
- package/docs/server.hytopia.audioeventpayload.setdistortion.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setdistortion.distortion.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setdistortion.md +70 -0
- package/docs/server.hytopia.audioeventpayload.setplaybackrate.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setplaybackrate.md +70 -0
- package/docs/server.hytopia.audioeventpayload.setplaybackrate.playbackrate.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setposition.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setposition.md +70 -0
- package/docs/server.hytopia.audioeventpayload.setposition.position.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setreferencedistance.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setreferencedistance.md +70 -0
- package/docs/server.hytopia.audioeventpayload.setreferencedistance.referencedistance.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setvolume.audio.md +11 -0
- package/docs/server.hytopia.audioeventpayload.setvolume.md +70 -0
- package/docs/server.hytopia.audioeventpayload.setvolume.volume.md +11 -0
- package/docs/server.hytopia.audioeventtype.md +173 -0
- package/docs/server.hytopia.audiomanager.getallaudios.md +19 -0
- package/docs/server.hytopia.audiomanager.getallentityattachedaudios.md +55 -0
- package/docs/server.hytopia.audiomanager.getallloopedaudios.md +19 -0
- package/docs/server.hytopia.audiomanager.getalloneshotaudios.md +19 -0
- package/docs/server.hytopia.audiomanager.md +150 -0
- package/docs/server.hytopia.audiomanager.world.md +13 -0
- package/docs/server.hytopia.audiooptions.attachedtoentity.md +13 -0
- package/docs/server.hytopia.audiooptions.detune.md +13 -0
- package/docs/server.hytopia.audiooptions.distortion.md +13 -0
- package/docs/server.hytopia.audiooptions.duration.md +13 -0
- package/docs/server.hytopia.audiooptions.loop.md +13 -0
- package/docs/server.hytopia.audiooptions.md +247 -0
- package/docs/server.hytopia.audiooptions.offset.md +13 -0
- package/docs/server.hytopia.audiooptions.playbackrate.md +13 -0
- package/docs/server.hytopia.audiooptions.position.md +13 -0
- package/docs/server.hytopia.audiooptions.referencedistance.md +13 -0
- package/docs/server.hytopia.audiooptions.uri.md +13 -0
- package/docs/server.hytopia.audiooptions.volume.md +13 -0
- package/docs/server.hytopia.basecharactercontroller._constructor_.md +65 -0
- package/docs/server.hytopia.basecharactercontroller.createsensorcolliders.md +19 -0
- package/docs/server.hytopia.basecharactercontroller.entity.md +13 -0
- package/docs/server.hytopia.basecharactercontroller.md +197 -0
- package/docs/server.hytopia.basecharactercontroller.ontickpathfindingmovement.md +13 -0
- package/docs/server.hytopia.basecharactercontroller.ontickplayermovement.md +13 -0
- package/docs/server.hytopia.basecharactercontroller.tickpathfindingmovement.md +69 -0
- package/docs/server.hytopia.basecharactercontroller.tickplayermovement.md +85 -0
- package/docs/server.hytopia.block.blocktype.md +13 -0
- package/docs/server.hytopia.block.globalcoordinate.md +13 -0
- package/docs/server.hytopia.block.md +86 -0
- package/docs/server.hytopia.blocktype._constructor_.md +49 -0
- package/docs/server.hytopia.blocktype.collideroptions.md +13 -0
- package/docs/server.hytopia.blocktype.id.md +13 -0
- package/docs/server.hytopia.blocktype.ismeshable.md +13 -0
- package/docs/server.hytopia.blocktype.md +235 -0
- package/docs/server.hytopia.blocktype.name.md +13 -0
- package/docs/server.hytopia.blocktype.onentitycollision.md +13 -0
- package/docs/server.hytopia.blocktype.onentitycontactforce.md +13 -0
- package/docs/server.hytopia.blocktype.textureuri.md +13 -0
- package/docs/server.hytopia.blocktypeoptions.customcollideroptions.md +11 -0
- package/docs/server.hytopia.blocktypeoptions.id.md +11 -0
- package/docs/server.hytopia.blocktypeoptions.md +108 -0
- package/docs/server.hytopia.blocktypeoptions.name.md +11 -0
- package/docs/server.hytopia.blocktypeoptions.textureuri.md +11 -0
- package/docs/server.hytopia.blocktyperegistry.getallblocktypes.md +19 -0
- package/docs/server.hytopia.blocktyperegistry.getblocktype.md +55 -0
- package/docs/server.hytopia.blocktyperegistry.md +153 -0
- package/docs/server.hytopia.blocktyperegistry.registerblocktype.md +69 -0
- package/docs/server.hytopia.blocktyperegistry.registergenericblocktype.md +55 -0
- package/docs/server.hytopia.blocktyperegistry.world.md +13 -0
- package/docs/server.hytopia.blocktyperegistryeventpayload.md +37 -0
- package/docs/server.hytopia.blocktyperegistryeventpayload.registerblocktype.blocktype.md +11 -0
- package/docs/server.hytopia.blocktyperegistryeventpayload.registerblocktype.blocktyperegistry.md +11 -0
- package/docs/server.hytopia.blocktyperegistryeventpayload.registerblocktype.id.md +11 -0
- package/docs/server.hytopia.blocktyperegistryeventpayload.registerblocktype.md +87 -0
- package/docs/server.hytopia.blocktyperegistryeventtype.md +47 -0
- package/docs/server.hytopia.chateventpayload.md +46 -0
- package/docs/server.hytopia.chateventpayload.sendbroadcastmessage.color.md +11 -0
- package/docs/server.hytopia.chateventpayload.sendbroadcastmessage.md +72 -0
- package/docs/server.hytopia.chateventpayload.sendbroadcastmessage.message.md +11 -0
- package/docs/server.hytopia.chateventpayload.sendplayermessage.color.md +11 -0
- package/docs/server.hytopia.chateventpayload.sendplayermessage.md +89 -0
- package/docs/server.hytopia.chateventpayload.sendplayermessage.message.md +11 -0
- package/docs/server.hytopia.chateventpayload.sendplayermessage.player.md +11 -0
- package/docs/server.hytopia.chateventtype.md +61 -0
- package/docs/server.hytopia.chatmanager.md +112 -0
- package/docs/server.hytopia.chatmanager.registercommand.md +69 -0
- package/docs/server.hytopia.chatmanager.sendbroadcastmessage.md +76 -0
- package/docs/server.hytopia.chatmanager.sendplayermessage.md +92 -0
- package/docs/server.hytopia.chatmanager.unregistercommand.md +53 -0
- package/docs/server.hytopia.chunk._constructor_.md +13 -0
- package/docs/server.hytopia.chunk.blockindextolocalcoordinate.md +55 -0
- package/docs/server.hytopia.chunk.blocks.md +13 -0
- package/docs/server.hytopia.chunk.despawn.md +17 -0
- package/docs/server.hytopia.chunk.globalcoordinatetolocalcoordinate.md +55 -0
- package/docs/server.hytopia.chunk.globalcoordinatetoorigincoordinate.md +55 -0
- package/docs/server.hytopia.chunk.issimulated.md +13 -0
- package/docs/server.hytopia.chunk.isspawned.md +13 -0
- package/docs/server.hytopia.chunk.isvalidorigincoordinate.md +55 -0
- package/docs/server.hytopia.chunk.md +324 -0
- package/docs/server.hytopia.chunk.origincoordinate.md +13 -0
- package/docs/server.hytopia.chunk.setblock.md +69 -0
- package/docs/server.hytopia.chunk.spawn.md +69 -0
- package/docs/server.hytopia.chunk.world.md +13 -0
- package/docs/server.hytopia.chunkeventpayload.despawn.chunk.md +11 -0
- package/docs/server.hytopia.chunkeventpayload.despawn.md +53 -0
- package/docs/server.hytopia.chunkeventpayload.md +55 -0
- package/docs/server.hytopia.chunkeventpayload.setblock.blocktypeid.md +11 -0
- package/docs/server.hytopia.chunkeventpayload.setblock.chunk.md +11 -0
- package/docs/server.hytopia.chunkeventpayload.setblock.globalcoordinate.md +11 -0
- package/docs/server.hytopia.chunkeventpayload.setblock.localcoordinate.md +11 -0
- package/docs/server.hytopia.chunkeventpayload.setblock.md +104 -0
- package/docs/server.hytopia.chunkeventpayload.spawn.chunk.md +11 -0
- package/docs/server.hytopia.chunkeventpayload.spawn.md +53 -0
- package/docs/server.hytopia.chunkeventtype.md +75 -0
- package/docs/server.hytopia.chunklattice._constructor_.md +49 -0
- package/docs/server.hytopia.chunklattice.getallchunks.md +19 -0
- package/docs/server.hytopia.chunklattice.getchunk.md +55 -0
- package/docs/server.hytopia.chunklattice.haschunk.md +55 -0
- package/docs/server.hytopia.chunklattice.md +127 -0
- package/docs/server.hytopia.chunklattice.setblock.md +69 -0
- package/docs/server.hytopia.collider._constructor_.md +49 -0
- package/docs/server.hytopia.collider.addtosimulation.md +69 -0
- package/docs/server.hytopia.collider.enablecollisionevents.md +53 -0
- package/docs/server.hytopia.collider.enablecontactforceevents.md +53 -0
- package/docs/server.hytopia.collider.getbounciness.md +19 -0
- package/docs/server.hytopia.collider.getcollisiongroups.md +19 -0
- package/docs/server.hytopia.collider.getfriction.md +19 -0
- package/docs/server.hytopia.collider.getrelativerotation.md +19 -0
- package/docs/server.hytopia.collider.getrelativetranslation.md +19 -0
- package/docs/server.hytopia.collider.isenabled.md +13 -0
- package/docs/server.hytopia.collider.isremoved.md +13 -0
- package/docs/server.hytopia.collider.issensor.md +13 -0
- package/docs/server.hytopia.collider.issimulated.md +13 -0
- package/docs/server.hytopia.collider.md +509 -0
- package/docs/server.hytopia.collider.parentrigidbody.md +13 -0
- package/docs/server.hytopia.collider.rawcollider.md +13 -0
- package/docs/server.hytopia.collider.removefromsimulation.md +17 -0
- package/docs/server.hytopia.collider.setbounciness.md +53 -0
- package/docs/server.hytopia.collider.setcollisiongroups.md +53 -0
- package/docs/server.hytopia.collider.setenabled.md +53 -0
- package/docs/server.hytopia.collider.setfriction.md +53 -0
- package/docs/server.hytopia.collider.setmass.md +53 -0
- package/docs/server.hytopia.collider.setoncollision.md +53 -0
- package/docs/server.hytopia.collider.setrelativerotation.md +53 -0
- package/docs/server.hytopia.collider.setrelativetranslation.md +53 -0
- package/docs/server.hytopia.collider.setsensor.md +53 -0
- package/docs/server.hytopia.collider.settag.md +53 -0
- package/docs/server.hytopia.collider.tag.md +13 -0
- package/docs/server.hytopia.collideroptions.borderradius.md +13 -0
- package/docs/server.hytopia.collideroptions.bounciness.md +13 -0
- package/docs/server.hytopia.collideroptions.collisiongroups.md +13 -0
- package/docs/server.hytopia.collideroptions.enabled.md +13 -0
- package/docs/server.hytopia.collideroptions.friction.md +13 -0
- package/docs/server.hytopia.collideroptions.halfextents.md +13 -0
- package/docs/server.hytopia.collideroptions.halfheight.md +13 -0
- package/docs/server.hytopia.collideroptions.issensor.md +13 -0
- package/docs/server.hytopia.collideroptions.mass.md +13 -0
- package/docs/server.hytopia.collideroptions.md +361 -0
- package/docs/server.hytopia.collideroptions.oncollision.md +13 -0
- package/docs/server.hytopia.collideroptions.parentrigidbody.md +13 -0
- package/docs/server.hytopia.collideroptions.radius.md +13 -0
- package/docs/server.hytopia.collideroptions.relativerotation.md +13 -0
- package/docs/server.hytopia.collideroptions.relativetranslation.md +13 -0
- package/docs/server.hytopia.collideroptions.shape.md +13 -0
- package/docs/server.hytopia.collideroptions.simulation.md +13 -0
- package/docs/server.hytopia.collideroptions.tag.md +13 -0
- package/docs/server.hytopia.collidershape.md +117 -0
- package/docs/server.hytopia.collisioncallback.md +15 -0
- package/docs/server.hytopia.collisiongroup.md +116 -0
- package/docs/server.hytopia.collisiongroups.md +18 -0
- package/docs/server.hytopia.collisiongroupsbuilder.buildrawcollisiongroups.md +55 -0
- package/docs/server.hytopia.collisiongroupsbuilder.decodecollisiongroups.md +55 -0
- package/docs/server.hytopia.collisiongroupsbuilder.decoderawcollisiongroups.md +55 -0
- package/docs/server.hytopia.collisiongroupsbuilder.isdefaultcollisiongroups.md +55 -0
- package/docs/server.hytopia.collisiongroupsbuilder.md +101 -0
- package/docs/server.hytopia.commandcallback.md +15 -0
- package/docs/server.hytopia.decodedcollisiongroups.md +16 -0
- package/docs/server.hytopia.default_entity_rigid_body_options.md +13 -0
- package/docs/server.hytopia.defaultcharactercontroller._constructor_.md +65 -0
- package/docs/server.hytopia.defaultcharactercontroller.canjump.md +13 -0
- package/docs/server.hytopia.defaultcharactercontroller.canrun.md +13 -0
- package/docs/server.hytopia.defaultcharactercontroller.canwalk.md +13 -0
- package/docs/server.hytopia.defaultcharactercontroller.createsensorcolliders.md +19 -0
- package/docs/server.hytopia.defaultcharactercontroller.isgrounded.md +13 -0
- package/docs/server.hytopia.defaultcharactercontroller.isonplatform.md +13 -0
- package/docs/server.hytopia.defaultcharactercontroller.jumpvelocity.md +13 -0
- package/docs/server.hytopia.defaultcharactercontroller.md +333 -0
- package/docs/server.hytopia.defaultcharactercontroller.platform.md +13 -0
- package/docs/server.hytopia.defaultcharactercontroller.runvelocity.md +13 -0
- package/docs/server.hytopia.defaultcharactercontroller.tickpathfindingmovement.md +69 -0
- package/docs/server.hytopia.defaultcharactercontroller.tickplayermovement.md +85 -0
- package/docs/server.hytopia.defaultcharactercontroller.walkvelocity.md +13 -0
- package/docs/server.hytopia.defaultcharactercontrolleroptions.canjump.md +13 -0
- package/docs/server.hytopia.defaultcharactercontrolleroptions.canrun.md +13 -0
- package/docs/server.hytopia.defaultcharactercontrolleroptions.canwalk.md +13 -0
- package/docs/server.hytopia.defaultcharactercontrolleroptions.jumpvelocity.md +13 -0
- package/docs/server.hytopia.defaultcharactercontrolleroptions.md +152 -0
- package/docs/server.hytopia.defaultcharactercontrolleroptions.runvelocity.md +13 -0
- package/docs/server.hytopia.defaultcharactercontrolleroptions.walkvelocity.md +13 -0
- package/docs/server.hytopia.entity._constructor_.md +49 -0
- package/docs/server.hytopia.entity.charactercontroller.md +13 -0
- package/docs/server.hytopia.entity.createcustomcharactercontroller.md +13 -0
- package/docs/server.hytopia.entity.despawn.md +17 -0
- package/docs/server.hytopia.entity.id.md +13 -0
- package/docs/server.hytopia.entity.isspawned.md +13 -0
- package/docs/server.hytopia.entity.md +529 -0
- package/docs/server.hytopia.entity.modelloopedanimations.md +13 -0
- package/docs/server.hytopia.entity.modelscale.md +13 -0
- package/docs/server.hytopia.entity.modeluri.md +13 -0
- package/docs/server.hytopia.entity.name.md +13 -0
- package/docs/server.hytopia.entity.onblockcollision.md +13 -0
- package/docs/server.hytopia.entity.onblockcontactforce.md +13 -0
- package/docs/server.hytopia.entity.ondespawn.md +13 -0
- package/docs/server.hytopia.entity.onentitycollision.md +13 -0
- package/docs/server.hytopia.entity.onentitycontactforce.md +13 -0
- package/docs/server.hytopia.entity.onspawn.md +13 -0
- package/docs/server.hytopia.entity.ontick.md +13 -0
- package/docs/server.hytopia.entity.setcharactercontroller.md +53 -0
- package/docs/server.hytopia.entity.spawn.md +69 -0
- package/docs/server.hytopia.entity.startmodelloopedanimations.md +53 -0
- package/docs/server.hytopia.entity.startmodeloneshotanimations.md +53 -0
- package/docs/server.hytopia.entity.stopmodelanimations.md +53 -0
- package/docs/server.hytopia.entity.world.md +13 -0
- package/docs/server.hytopia.entityeventpayload.despawn.entity.md +11 -0
- package/docs/server.hytopia.entityeventpayload.despawn.md +53 -0
- package/docs/server.hytopia.entityeventpayload.md +91 -0
- package/docs/server.hytopia.entityeventpayload.spawn.entity.md +11 -0
- package/docs/server.hytopia.entityeventpayload.spawn.md +53 -0
- package/docs/server.hytopia.entityeventpayload.startmodelloopedanimations.animations.md +11 -0
- package/docs/server.hytopia.entityeventpayload.startmodelloopedanimations.entity.md +11 -0
- package/docs/server.hytopia.entityeventpayload.startmodelloopedanimations.md +70 -0
- package/docs/server.hytopia.entityeventpayload.startmodeloneshotanimations.animations.md +11 -0
- package/docs/server.hytopia.entityeventpayload.startmodeloneshotanimations.entity.md +11 -0
- package/docs/server.hytopia.entityeventpayload.startmodeloneshotanimations.md +70 -0
- package/docs/server.hytopia.entityeventpayload.stopmodelanimations.animations.md +11 -0
- package/docs/server.hytopia.entityeventpayload.stopmodelanimations.entity.md +11 -0
- package/docs/server.hytopia.entityeventpayload.stopmodelanimations.md +70 -0
- package/docs/server.hytopia.entityeventpayload.updaterotation.entity.md +11 -0
- package/docs/server.hytopia.entityeventpayload.updaterotation.md +70 -0
- package/docs/server.hytopia.entityeventpayload.updaterotation.rotation.md +11 -0
- package/docs/server.hytopia.entityeventpayload.updatetranslation.entity.md +11 -0
- package/docs/server.hytopia.entityeventpayload.updatetranslation.md +70 -0
- package/docs/server.hytopia.entityeventpayload.updatetranslation.translation.md +11 -0
- package/docs/server.hytopia.entityeventtype.md +131 -0
- package/docs/server.hytopia.entitymanager.getallentities.md +19 -0
- package/docs/server.hytopia.entitymanager.getallplayerentities.md +55 -0
- package/docs/server.hytopia.entitymanager.getentity.md +55 -0
- package/docs/server.hytopia.entitymanager.md +136 -0
- package/docs/server.hytopia.entitymanager.world.md +13 -0
- package/docs/server.hytopia.entityoptions.md +133 -0
- package/docs/server.hytopia.entityoptions.modelloopedanimations.md +13 -0
- package/docs/server.hytopia.entityoptions.modelscale.md +13 -0
- package/docs/server.hytopia.entityoptions.modeluri.md +13 -0
- package/docs/server.hytopia.entityoptions.name.md +13 -0
- package/docs/server.hytopia.entityoptions.rigidbodyoptions.md +13 -0
- package/docs/server.hytopia.event.md +76 -0
- package/docs/server.hytopia.event.payload.md +13 -0
- package/docs/server.hytopia.event.type.md +13 -0
- package/docs/server.hytopia.eventrouter._constructor_.md +49 -0
- package/docs/server.hytopia.eventrouter.emit.md +55 -0
- package/docs/server.hytopia.eventrouter.logallevents.md +13 -0
- package/docs/server.hytopia.eventrouter.logeventspayloads.md +13 -0
- package/docs/server.hytopia.eventrouter.logignoreeventprefixes.md +13 -0
- package/docs/server.hytopia.eventrouter.logignoreevents.md +13 -0
- package/docs/server.hytopia.eventrouter.logunlistenedevents.md +13 -0
- package/docs/server.hytopia.eventrouter.md +270 -0
- package/docs/server.hytopia.eventrouter.off.md +69 -0
- package/docs/server.hytopia.eventrouter.offall.md +53 -0
- package/docs/server.hytopia.eventrouter.on.md +73 -0
- package/docs/server.hytopia.eventrouter.serverinstance.md +13 -0
- package/docs/server.hytopia.gameserver.instance.md +13 -0
- package/docs/server.hytopia.gameserver.md +109 -0
- package/docs/server.hytopia.gameserver.playermanager.md +13 -0
- package/docs/server.hytopia.gameserver.worlds.md +15 -0
- package/docs/server.hytopia.gameservereventpayload.md +46 -0
- package/docs/server.hytopia.gameservereventpayload.start.md +53 -0
- package/docs/server.hytopia.gameservereventpayload.start.startedatms.md +11 -0
- package/docs/server.hytopia.gameservereventpayload.stop.md +53 -0
- package/docs/server.hytopia.gameservereventpayload.stop.stoppedatms.md +11 -0
- package/docs/server.hytopia.gameservereventtype.md +61 -0
- package/docs/server.hytopia.md +840 -0
- package/docs/server.hytopia.player.disconnect.md +17 -0
- package/docs/server.hytopia.player.id.md +13 -0
- package/docs/server.hytopia.player.inputstate.md +13 -0
- package/docs/server.hytopia.player.joinworld.md +57 -0
- package/docs/server.hytopia.player.leaveworld.md +17 -0
- package/docs/server.hytopia.player.md +211 -0
- package/docs/server.hytopia.player.orientationstate.md +13 -0
- package/docs/server.hytopia.player.username.md +13 -0
- package/docs/server.hytopia.player.world.md +13 -0
- package/docs/server.hytopia.playerentity._constructor_.md +49 -0
- package/docs/server.hytopia.playerentity.md +115 -0
- package/docs/server.hytopia.playerentity.player.md +13 -0
- package/docs/server.hytopia.playerentityoptions.md +58 -0
- package/docs/server.hytopia.playerentityoptions.player.md +13 -0
- package/docs/server.hytopia.playereventpayload.chatmessagesend.md +70 -0
- package/docs/server.hytopia.playereventpayload.chatmessagesend.message.md +11 -0
- package/docs/server.hytopia.playereventpayload.chatmessagesend.player.md +11 -0
- package/docs/server.hytopia.playereventpayload.joinedworld.md +70 -0
- package/docs/server.hytopia.playereventpayload.joinedworld.player.md +11 -0
- package/docs/server.hytopia.playereventpayload.joinedworld.world.md +11 -0
- package/docs/server.hytopia.playereventpayload.leftworld.md +70 -0
- package/docs/server.hytopia.playereventpayload.leftworld.player.md +11 -0
- package/docs/server.hytopia.playereventpayload.leftworld.world.md +11 -0
- package/docs/server.hytopia.playereventpayload.md +64 -0
- package/docs/server.hytopia.playereventpayload.requestsync.md +87 -0
- package/docs/server.hytopia.playereventpayload.requestsync.player.md +11 -0
- package/docs/server.hytopia.playereventpayload.requestsync.receivedat.md +11 -0
- package/docs/server.hytopia.playereventpayload.requestsync.receivedatms.md +11 -0
- package/docs/server.hytopia.playereventtype.md +89 -0
- package/docs/server.hytopia.playerinputstate.md +13 -0
- package/docs/server.hytopia.playermanager.getconnectedplayerbyusername.md +55 -0
- package/docs/server.hytopia.playermanager.getconnectedplayers.md +19 -0
- package/docs/server.hytopia.playermanager.instance.md +13 -0
- package/docs/server.hytopia.playermanager.md +125 -0
- package/docs/server.hytopia.playerorientationstate.md +16 -0
- package/docs/server.hytopia.rawcollisiongroups.md +13 -0
- package/docs/server.hytopia.rigidbody._constructor_.md +49 -0
- package/docs/server.hytopia.rigidbody.addchildcollidertosimulation.md +53 -0
- package/docs/server.hytopia.rigidbody.addforce.md +53 -0
- package/docs/server.hytopia.rigidbody.addtorque.md +53 -0
- package/docs/server.hytopia.rigidbody.addtosimulation.md +53 -0
- package/docs/server.hytopia.rigidbody.applyimpulse.md +53 -0
- package/docs/server.hytopia.rigidbody.applyimpulseatpoint.md +69 -0
- package/docs/server.hytopia.rigidbody.applytorqueimpulse.md +53 -0
- package/docs/server.hytopia.rigidbody.colliders.md +13 -0
- package/docs/server.hytopia.rigidbody.createandaddchildcolliderstosimulation.md +55 -0
- package/docs/server.hytopia.rigidbody.createandaddchildcollidertosimulation.md +55 -0
- package/docs/server.hytopia.rigidbody.getadditionalmass.md +19 -0
- package/docs/server.hytopia.rigidbody.getadditionalsolveriterations.md +19 -0
- package/docs/server.hytopia.rigidbody.getangulardamping.md +19 -0
- package/docs/server.hytopia.rigidbody.getangularvelocity.md +19 -0
- package/docs/server.hytopia.rigidbody.getcollidersbytag.md +55 -0
- package/docs/server.hytopia.rigidbody.getdirectionfromrotation.md +19 -0
- package/docs/server.hytopia.rigidbody.getdominancegroup.md +19 -0
- package/docs/server.hytopia.rigidbody.geteffectiveangularinertia.md +19 -0
- package/docs/server.hytopia.rigidbody.geteffectiveinversemass.md +19 -0
- package/docs/server.hytopia.rigidbody.geteffectiveworldinverseprincipalangularinertiasqrt.md +19 -0
- package/docs/server.hytopia.rigidbody.getenabledrotations.md +19 -0
- package/docs/server.hytopia.rigidbody.getenabledtranslations.md +19 -0
- package/docs/server.hytopia.rigidbody.getgravityscale.md +19 -0
- package/docs/server.hytopia.rigidbody.getinversemass.md +19 -0
- package/docs/server.hytopia.rigidbody.getinverseprincipalangularinertiasqrt.md +19 -0
- package/docs/server.hytopia.rigidbody.getlineardamping.md +19 -0
- package/docs/server.hytopia.rigidbody.getlinearvelocity.md +19 -0
- package/docs/server.hytopia.rigidbody.getlocalcenterofmass.md +19 -0
- package/docs/server.hytopia.rigidbody.getmass.md +19 -0
- package/docs/server.hytopia.rigidbody.getnextkinematicrotation.md +19 -0
- package/docs/server.hytopia.rigidbody.getnextkinematictranslation.md +19 -0
- package/docs/server.hytopia.rigidbody.getprincipalangularinertia.md +19 -0
- package/docs/server.hytopia.rigidbody.getprincipalangularinertialocalframe.md +19 -0
- package/docs/server.hytopia.rigidbody.getrotation.md +19 -0
- package/docs/server.hytopia.rigidbody.getsoftccdprediction.md +19 -0
- package/docs/server.hytopia.rigidbody.gettranslation.md +19 -0
- package/docs/server.hytopia.rigidbody.gettype.md +19 -0
- package/docs/server.hytopia.rigidbody.getworldcenterofmass.md +19 -0
- package/docs/server.hytopia.rigidbody.isccdenabled.md +13 -0
- package/docs/server.hytopia.rigidbody.isdynamic.md +13 -0
- package/docs/server.hytopia.rigidbody.isenabled.md +13 -0
- package/docs/server.hytopia.rigidbody.isfixed.md +13 -0
- package/docs/server.hytopia.rigidbody.iskinematic.md +13 -0
- package/docs/server.hytopia.rigidbody.iskinematicpositionbased.md +13 -0
- package/docs/server.hytopia.rigidbody.iskinematicvelocitybased.md +13 -0
- package/docs/server.hytopia.rigidbody.ismoving.md +13 -0
- package/docs/server.hytopia.rigidbody.isremoved.md +13 -0
- package/docs/server.hytopia.rigidbody.issimulated.md +13 -0
- package/docs/server.hytopia.rigidbody.issleeping.md +13 -0
- package/docs/server.hytopia.rigidbody.lockallrotations.md +17 -0
- package/docs/server.hytopia.rigidbody.lockalltranslations.md +17 -0
- package/docs/server.hytopia.rigidbody.md +1307 -0
- package/docs/server.hytopia.rigidbody.numcolliders.md +13 -0
- package/docs/server.hytopia.rigidbody.rawrigidbody.md +13 -0
- package/docs/server.hytopia.rigidbody.removefromsimulation.md +17 -0
- package/docs/server.hytopia.rigidbody.setadditionalmass.md +53 -0
- package/docs/server.hytopia.rigidbody.setadditionalmassproperties.md +53 -0
- package/docs/server.hytopia.rigidbody.setadditionalsolveriterations.md +53 -0
- package/docs/server.hytopia.rigidbody.setangulardamping.md +53 -0
- package/docs/server.hytopia.rigidbody.setangularvelocity.md +53 -0
- package/docs/server.hytopia.rigidbody.setccdenabled.md +53 -0
- package/docs/server.hytopia.rigidbody.setcollisiongroupsforsolidcolliders.md +53 -0
- package/docs/server.hytopia.rigidbody.setdominancegroup.md +53 -0
- package/docs/server.hytopia.rigidbody.setenabled.md +53 -0
- package/docs/server.hytopia.rigidbody.setenabledrotations.md +53 -0
- package/docs/server.hytopia.rigidbody.setenabledtranslations.md +53 -0
- package/docs/server.hytopia.rigidbody.setgravityscale.md +53 -0
- package/docs/server.hytopia.rigidbody.setlineardamping.md +53 -0
- package/docs/server.hytopia.rigidbody.setlinearvelocity.md +53 -0
- package/docs/server.hytopia.rigidbody.setnextkinematicrotation.md +53 -0
- package/docs/server.hytopia.rigidbody.setnextkinematictranslation.md +53 -0
- package/docs/server.hytopia.rigidbody.setrotation.md +53 -0
- package/docs/server.hytopia.rigidbody.setsleeping.md +53 -0
- package/docs/server.hytopia.rigidbody.setsoftccdprediction.md +53 -0
- package/docs/server.hytopia.rigidbody.settag.md +53 -0
- package/docs/server.hytopia.rigidbody.settranslation.md +53 -0
- package/docs/server.hytopia.rigidbody.settype.md +53 -0
- package/docs/server.hytopia.rigidbody.sleep.md +17 -0
- package/docs/server.hytopia.rigidbody.tag.md +13 -0
- package/docs/server.hytopia.rigidbody.wakeup.md +17 -0
- package/docs/server.hytopia.rigidbodyadditionalmassproperties.md +20 -0
- package/docs/server.hytopia.rigidbodyoptions.additionalmass.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.additionalmassproperties.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.additionalsolveriterations.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.angulardamping.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.angularvelocity.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.ccdenabled.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.colliders.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.dominancegroup.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.enabled.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.enabledrotations.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.enabledtranslations.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.gravityscale.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.lineardamping.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.linearvelocity.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.md +437 -0
- package/docs/server.hytopia.rigidbodyoptions.rotation.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.simulation.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.sleeping.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.softccdprediction.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.tag.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.translation.md +13 -0
- package/docs/server.hytopia.rigidbodyoptions.type.md +13 -0
- package/docs/server.hytopia.rigidbodytype.md +89 -0
- package/docs/server.hytopia.rotation.md +106 -0
- package/docs/server.hytopia.rotation.w.md +11 -0
- package/docs/server.hytopia.rotation.x.md +11 -0
- package/docs/server.hytopia.rotation.y.md +11 -0
- package/docs/server.hytopia.rotation.z.md +11 -0
- package/docs/server.hytopia.simulation.castray.md +103 -0
- package/docs/server.hytopia.simulation.gravity.md +13 -0
- package/docs/server.hytopia.simulation.md +141 -0
- package/docs/server.hytopia.simulation.timesteps.md +13 -0
- package/docs/server.hytopia.simulation.world.md +13 -0
- package/docs/server.hytopia.spdmatrix3.md +15 -0
- package/docs/server.hytopia.startserver.md +57 -0
- package/docs/server.hytopia.supported_input_keys.md +13 -0
- package/docs/server.hytopia.vector3.md +89 -0
- package/docs/server.hytopia.vector3.x.md +11 -0
- package/docs/server.hytopia.vector3.y.md +11 -0
- package/docs/server.hytopia.vector3.z.md +11 -0
- package/docs/server.hytopia.vector3boolean.md +89 -0
- package/docs/server.hytopia.vector3boolean.x.md +11 -0
- package/docs/server.hytopia.vector3boolean.y.md +11 -0
- package/docs/server.hytopia.vector3boolean.z.md +11 -0
- package/docs/server.hytopia.world._constructor_.md +49 -0
- package/docs/server.hytopia.world.audiomanager.md +13 -0
- package/docs/server.hytopia.world.blocktyperegistry.md +13 -0
- package/docs/server.hytopia.world.chatmanager.md +13 -0
- package/docs/server.hytopia.world.chunklattice.md +13 -0
- package/docs/server.hytopia.world.entitymanager.md +13 -0
- package/docs/server.hytopia.world.eventrouter.md +13 -0
- package/docs/server.hytopia.world.id.md +13 -0
- package/docs/server.hytopia.world.loadmap.md +53 -0
- package/docs/server.hytopia.world.loop.md +13 -0
- package/docs/server.hytopia.world.md +419 -0
- package/docs/server.hytopia.world.name.md +13 -0
- package/docs/server.hytopia.world.onplayerjoin.md +13 -0
- package/docs/server.hytopia.world.onplayerleave.md +13 -0
- package/docs/server.hytopia.world.simulation.md +13 -0
- package/docs/server.hytopia.world.skyboxuri.md +13 -0
- package/docs/server.hytopia.world.start.md +17 -0
- package/docs/server.hytopia.world.stop.md +17 -0
- package/docs/server.hytopia.worldloop.currenttick.md +13 -0
- package/docs/server.hytopia.worldloop.md +140 -0
- package/docs/server.hytopia.worldloop.nexttickms.md +13 -0
- package/docs/server.hytopia.worldloop.timesteps.md +13 -0
- package/docs/server.hytopia.worldloop.world.md +13 -0
- package/docs/server.hytopia.worldmap.blocks.md +15 -0
- package/docs/server.hytopia.worldmap.blocktypes.md +17 -0
- package/docs/server.hytopia.worldmap.md +76 -0
- package/docs/server.hytopia.worldoptions.gravity.md +13 -0
- package/docs/server.hytopia.worldoptions.id.md +13 -0
- package/docs/server.hytopia.worldoptions.md +133 -0
- package/docs/server.hytopia.worldoptions.name.md +13 -0
- package/docs/server.hytopia.worldoptions.skyboxuri.md +13 -0
- package/docs/server.hytopia.worldoptions.tickrate.md +13 -0
- package/docs/server.md +849 -0
- package/docs/server.player.disconnect.md +17 -0
- package/docs/server.player.id.md +13 -0
- package/docs/server.player.inputstate.md +13 -0
- package/docs/server.player.joinworld.md +57 -0
- package/docs/server.player.leaveworld.md +17 -0
- package/docs/server.player.md +211 -0
- package/docs/server.player.orientationstate.md +13 -0
- package/docs/server.player.username.md +13 -0
- package/docs/server.player.world.md +13 -0
- package/docs/server.playerentity._constructor_.md +49 -0
- package/docs/server.playerentity.md +115 -0
- package/docs/server.playerentity.player.md +13 -0
- package/docs/server.playerentityoptions.md +58 -0
- package/docs/server.playerentityoptions.player.md +13 -0
- package/docs/server.playereventpayload.chatmessagesend.md +70 -0
- package/docs/server.playereventpayload.chatmessagesend.message.md +11 -0
- package/docs/server.playereventpayload.chatmessagesend.player.md +11 -0
- package/docs/server.playereventpayload.joinedworld.md +70 -0
- package/docs/server.playereventpayload.joinedworld.player.md +11 -0
- package/docs/server.playereventpayload.joinedworld.world.md +11 -0
- package/docs/server.playereventpayload.leftworld.md +70 -0
- package/docs/server.playereventpayload.leftworld.player.md +11 -0
- package/docs/server.playereventpayload.leftworld.world.md +11 -0
- package/docs/server.playereventpayload.md +64 -0
- package/docs/server.playereventpayload.requestsync.md +87 -0
- package/docs/server.playereventpayload.requestsync.player.md +11 -0
- package/docs/server.playereventpayload.requestsync.receivedat.md +11 -0
- package/docs/server.playereventpayload.requestsync.receivedatms.md +11 -0
- package/docs/server.playereventtype.md +89 -0
- package/docs/server.playerinputstate.md +13 -0
- package/docs/server.playermanager.getconnectedplayerbyusername.md +55 -0
- package/docs/server.playermanager.getconnectedplayers.md +19 -0
- package/docs/server.playermanager.instance.md +13 -0
- package/docs/server.playermanager.md +125 -0
- package/docs/server.playerorientationstate.md +16 -0
- package/docs/server.rawcollisiongroups.md +13 -0
- package/docs/server.rigidbody._constructor_.md +49 -0
- package/docs/server.rigidbody.addchildcollidertosimulation.md +53 -0
- package/docs/server.rigidbody.addforce.md +53 -0
- package/docs/server.rigidbody.addtorque.md +53 -0
- package/docs/server.rigidbody.addtosimulation.md +53 -0
- package/docs/server.rigidbody.applyimpulse.md +53 -0
- package/docs/server.rigidbody.applyimpulseatpoint.md +69 -0
- package/docs/server.rigidbody.applytorqueimpulse.md +53 -0
- package/docs/server.rigidbody.colliders.md +13 -0
- package/docs/server.rigidbody.createandaddchildcolliderstosimulation.md +55 -0
- package/docs/server.rigidbody.createandaddchildcollidertosimulation.md +55 -0
- package/docs/server.rigidbody.getadditionalmass.md +19 -0
- package/docs/server.rigidbody.getadditionalsolveriterations.md +19 -0
- package/docs/server.rigidbody.getangulardamping.md +19 -0
- package/docs/server.rigidbody.getangularvelocity.md +19 -0
- package/docs/server.rigidbody.getcollidersbytag.md +55 -0
- package/docs/server.rigidbody.getdirectionfromrotation.md +19 -0
- package/docs/server.rigidbody.getdominancegroup.md +19 -0
- package/docs/server.rigidbody.geteffectiveangularinertia.md +19 -0
- package/docs/server.rigidbody.geteffectiveinversemass.md +19 -0
- package/docs/server.rigidbody.geteffectiveworldinverseprincipalangularinertiasqrt.md +19 -0
- package/docs/server.rigidbody.getenabledrotations.md +19 -0
- package/docs/server.rigidbody.getenabledtranslations.md +19 -0
- package/docs/server.rigidbody.getgravityscale.md +19 -0
- package/docs/server.rigidbody.getinversemass.md +19 -0
- package/docs/server.rigidbody.getinverseprincipalangularinertiasqrt.md +19 -0
- package/docs/server.rigidbody.getlineardamping.md +19 -0
- package/docs/server.rigidbody.getlinearvelocity.md +19 -0
- package/docs/server.rigidbody.getlocalcenterofmass.md +19 -0
- package/docs/server.rigidbody.getmass.md +19 -0
- package/docs/server.rigidbody.getnextkinematicrotation.md +19 -0
- package/docs/server.rigidbody.getnextkinematictranslation.md +19 -0
- package/docs/server.rigidbody.getprincipalangularinertia.md +19 -0
- package/docs/server.rigidbody.getprincipalangularinertialocalframe.md +19 -0
- package/docs/server.rigidbody.getrotation.md +19 -0
- package/docs/server.rigidbody.getsoftccdprediction.md +19 -0
- package/docs/server.rigidbody.gettranslation.md +19 -0
- package/docs/server.rigidbody.gettype.md +19 -0
- package/docs/server.rigidbody.getworldcenterofmass.md +19 -0
- package/docs/server.rigidbody.isccdenabled.md +13 -0
- package/docs/server.rigidbody.isdynamic.md +13 -0
- package/docs/server.rigidbody.isenabled.md +13 -0
- package/docs/server.rigidbody.isfixed.md +13 -0
- package/docs/server.rigidbody.iskinematic.md +13 -0
- package/docs/server.rigidbody.iskinematicpositionbased.md +13 -0
- package/docs/server.rigidbody.iskinematicvelocitybased.md +13 -0
- package/docs/server.rigidbody.ismoving.md +13 -0
- package/docs/server.rigidbody.isremoved.md +13 -0
- package/docs/server.rigidbody.issimulated.md +13 -0
- package/docs/server.rigidbody.issleeping.md +13 -0
- package/docs/server.rigidbody.lockallrotations.md +17 -0
- package/docs/server.rigidbody.lockalltranslations.md +17 -0
- package/docs/server.rigidbody.md +1307 -0
- package/docs/server.rigidbody.numcolliders.md +13 -0
- package/docs/server.rigidbody.rawrigidbody.md +13 -0
- package/docs/server.rigidbody.removefromsimulation.md +17 -0
- package/docs/server.rigidbody.setadditionalmass.md +53 -0
- package/docs/server.rigidbody.setadditionalmassproperties.md +53 -0
- package/docs/server.rigidbody.setadditionalsolveriterations.md +53 -0
- package/docs/server.rigidbody.setangulardamping.md +53 -0
- package/docs/server.rigidbody.setangularvelocity.md +53 -0
- package/docs/server.rigidbody.setccdenabled.md +53 -0
- package/docs/server.rigidbody.setcollisiongroupsforsolidcolliders.md +53 -0
- package/docs/server.rigidbody.setdominancegroup.md +53 -0
- package/docs/server.rigidbody.setenabled.md +53 -0
- package/docs/server.rigidbody.setenabledrotations.md +53 -0
- package/docs/server.rigidbody.setenabledtranslations.md +53 -0
- package/docs/server.rigidbody.setgravityscale.md +53 -0
- package/docs/server.rigidbody.setlineardamping.md +53 -0
- package/docs/server.rigidbody.setlinearvelocity.md +53 -0
- package/docs/server.rigidbody.setnextkinematicrotation.md +53 -0
- package/docs/server.rigidbody.setnextkinematictranslation.md +53 -0
- package/docs/server.rigidbody.setrotation.md +53 -0
- package/docs/server.rigidbody.setsleeping.md +53 -0
- package/docs/server.rigidbody.setsoftccdprediction.md +53 -0
- package/docs/server.rigidbody.settag.md +53 -0
- package/docs/server.rigidbody.settranslation.md +53 -0
- package/docs/server.rigidbody.settype.md +53 -0
- package/docs/server.rigidbody.sleep.md +17 -0
- package/docs/server.rigidbody.tag.md +13 -0
- package/docs/server.rigidbody.wakeup.md +17 -0
- package/docs/server.rigidbodyadditionalmassproperties.md +20 -0
- package/docs/server.rigidbodyoptions.additionalmass.md +13 -0
- package/docs/server.rigidbodyoptions.additionalmassproperties.md +13 -0
- package/docs/server.rigidbodyoptions.additionalsolveriterations.md +13 -0
- package/docs/server.rigidbodyoptions.angulardamping.md +13 -0
- package/docs/server.rigidbodyoptions.angularvelocity.md +13 -0
- package/docs/server.rigidbodyoptions.ccdenabled.md +13 -0
- package/docs/server.rigidbodyoptions.colliders.md +13 -0
- package/docs/server.rigidbodyoptions.dominancegroup.md +13 -0
- package/docs/server.rigidbodyoptions.enabled.md +13 -0
- package/docs/server.rigidbodyoptions.enabledrotations.md +13 -0
- package/docs/server.rigidbodyoptions.enabledtranslations.md +13 -0
- package/docs/server.rigidbodyoptions.gravityscale.md +13 -0
- package/docs/server.rigidbodyoptions.lineardamping.md +13 -0
- package/docs/server.rigidbodyoptions.linearvelocity.md +13 -0
- package/docs/server.rigidbodyoptions.md +437 -0
- package/docs/server.rigidbodyoptions.rotation.md +13 -0
- package/docs/server.rigidbodyoptions.simulation.md +13 -0
- package/docs/server.rigidbodyoptions.sleeping.md +13 -0
- package/docs/server.rigidbodyoptions.softccdprediction.md +13 -0
- package/docs/server.rigidbodyoptions.tag.md +13 -0
- package/docs/server.rigidbodyoptions.translation.md +13 -0
- package/docs/server.rigidbodyoptions.type.md +13 -0
- package/docs/server.rigidbodytype.md +89 -0
- package/docs/server.rotation.md +106 -0
- package/docs/server.rotation.w.md +11 -0
- package/docs/server.rotation.x.md +11 -0
- package/docs/server.rotation.y.md +11 -0
- package/docs/server.rotation.z.md +11 -0
- package/docs/server.simulation.castray.md +103 -0
- package/docs/server.simulation.gravity.md +13 -0
- package/docs/server.simulation.md +141 -0
- package/docs/server.simulation.timesteps.md +13 -0
- package/docs/server.simulation.world.md +13 -0
- package/docs/server.spdmatrix3.md +15 -0
- package/docs/server.startserver.md +57 -0
- package/docs/server.supported_input_keys.md +13 -0
- package/docs/server.vector3.md +89 -0
- package/docs/server.vector3.x.md +11 -0
- package/docs/server.vector3.y.md +11 -0
- package/docs/server.vector3.z.md +11 -0
- package/docs/server.vector3boolean.md +89 -0
- package/docs/server.vector3boolean.x.md +11 -0
- package/docs/server.vector3boolean.y.md +11 -0
- package/docs/server.vector3boolean.z.md +11 -0
- package/docs/server.world._constructor_.md +49 -0
- package/docs/server.world.audiomanager.md +13 -0
- package/docs/server.world.blocktyperegistry.md +13 -0
- package/docs/server.world.chatmanager.md +13 -0
- package/docs/server.world.chunklattice.md +13 -0
- package/docs/server.world.entitymanager.md +13 -0
- package/docs/server.world.eventrouter.md +13 -0
- package/docs/server.world.id.md +13 -0
- package/docs/server.world.loadmap.md +53 -0
- package/docs/server.world.loop.md +13 -0
- package/docs/server.world.md +419 -0
- package/docs/server.world.name.md +13 -0
- package/docs/server.world.onplayerjoin.md +13 -0
- package/docs/server.world.onplayerleave.md +13 -0
- package/docs/server.world.simulation.md +13 -0
- package/docs/server.world.skyboxuri.md +13 -0
- package/docs/server.world.start.md +17 -0
- package/docs/server.world.stop.md +17 -0
- package/docs/server.worldloop.currenttick.md +13 -0
- package/docs/server.worldloop.md +140 -0
- package/docs/server.worldloop.nexttickms.md +13 -0
- package/docs/server.worldloop.timesteps.md +13 -0
- package/docs/server.worldloop.world.md +13 -0
- package/docs/server.worldmap.blocks.md +15 -0
- package/docs/server.worldmap.blocktypes.md +17 -0
- package/docs/server.worldmap.md +76 -0
- package/docs/server.worldoptions.gravity.md +13 -0
- package/docs/server.worldoptions.id.md +13 -0
- package/docs/server.worldoptions.md +133 -0
- package/docs/server.worldoptions.name.md +13 -0
- package/docs/server.worldoptions.skyboxuri.md +13 -0
- package/docs/server.worldoptions.tickrate.md +13 -0
- package/examples/payload-game/assets/audio/music/game.mp3 +0 -0
- package/examples/payload-game/assets/audio/sfx/damage.wav +0 -0
- package/examples/payload-game/assets/audio/sfx/payload-idle.mp3 +0 -0
- package/examples/payload-game/assets/audio/sfx/shoot.mp3 +0 -0
- package/examples/payload-game/assets/cubemaps/skybox/+x.png +0 -0
- package/examples/payload-game/assets/cubemaps/skybox/+y.png +0 -0
- package/examples/payload-game/assets/cubemaps/skybox/+z.png +0 -0
- package/examples/payload-game/assets/cubemaps/skybox/-x.png +0 -0
- package/examples/payload-game/assets/cubemaps/skybox/-y.png +0 -0
- package/examples/payload-game/assets/cubemaps/skybox/-z.png +0 -0
- package/examples/{payload/assets/world.json → payload-game/assets/map.json} +1 -1
- package/examples/payload-game/assets/models/bullet.gltf +1 -0
- package/examples/payload-game/assets/models/payload.gltf +1 -0
- package/examples/payload-game/assets/models/player-with-gun.gltf +1 -0
- package/examples/payload-game/assets/models/spider.gltf +1 -0
- package/examples/payload-game/assets/textures/dragons_stone.png +0 -0
- package/examples/payload-game/assets/textures/infected_shadowrock.png +0 -0
- package/examples/payload-game/assets/textures/shadowrock.png +0 -0
- package/examples/payload-game/assets/textures/stone.png +0 -0
- package/examples/payload-game/assets/textures/stone_bricks.png +0 -0
- package/examples/payload-game/assets/textures/void_sand.png +0 -0
- package/examples/payload-game/index.ts +579 -0
- package/package.json +1 -1
- package/server.api.json +36139 -0
- package/server.d.ts +1765 -360
- package/server.js +60 -60
- package/tsconfig.json +21 -0
- package/docs/assets/banner.png +0 -0
- package/examples/payload/index.ts +0 -0
- package/examples/zombies/index.ts +0 -0
- /package/{assets → boilerplate/assets}/audio/music/cave.mp3 +0 -0
- /package/{assets → boilerplate/assets}/audio/music/desert.mp3 +0 -0
- /package/{assets → boilerplate/assets}/audio/music/end.mp3 +0 -0
- /package/{assets → boilerplate/assets}/audio/music/jungle.mp3 +0 -0
- /package/{assets → boilerplate/assets}/audio/music/nether.mp3 +0 -0
- /package/{assets → boilerplate/assets}/audio/music/night.mp3 +0 -0
- /package/{assets → boilerplate/assets}/audio/music/night2.mp3 +0 -0
- /package/{assets → boilerplate/assets}/audio/music/overworld.mp3 +0 -0
- /package/{assets → boilerplate/assets}/audio/music/snow.mp3 +0 -0
- /package/{assets → boilerplate/assets}/audio/sfx/damage.wav +0 -0
- /package/{assets → boilerplate/assets}/cubemaps/skybox/+x.png +0 -0
- /package/{assets → boilerplate/assets}/cubemaps/skybox/+y.png +0 -0
- /package/{assets → boilerplate/assets}/cubemaps/skybox/+z.png +0 -0
- /package/{assets → boilerplate/assets}/cubemaps/skybox/-x.png +0 -0
- /package/{assets → boilerplate/assets}/cubemaps/skybox/-y.png +0 -0
- /package/{assets → boilerplate/assets}/cubemaps/skybox/-z.png +0 -0
- /package/{assets → boilerplate/assets}/models/player.gltf +0 -0
- /package/{assets → boilerplate/assets}/models/spider.gltf +0 -0
- /package/{assets → boilerplate/assets}/models/zombie.gltf +0 -0
- /package/{assets → boilerplate/assets}/textures/bricks.png +0 -0
- /package/{assets → boilerplate/assets}/textures/clay.png +0 -0
- /package/{assets → boilerplate/assets}/textures/diamond_ore.png +0 -0
- /package/{assets → boilerplate/assets}/textures/dirt.png +0 -0
- /package/{assets → boilerplate/assets}/textures/dragons_stone.png +0 -0
- /package/{assets → boilerplate/assets}/textures/glass.png +0 -0
- /package/{assets → boilerplate/assets}/textures/grass/+x.png +0 -0
- /package/{assets → boilerplate/assets}/textures/grass/+y.png +0 -0
- /package/{assets → boilerplate/assets}/textures/grass/+z.png +0 -0
- /package/{assets → boilerplate/assets}/textures/grass/-x.png +0 -0
- /package/{assets → boilerplate/assets}/textures/grass/-y.png +0 -0
- /package/{assets → boilerplate/assets}/textures/grass/-z.png +0 -0
- /package/{assets → boilerplate/assets}/textures/grass.png +0 -0
- /package/{assets → boilerplate/assets}/textures/gravel.png +0 -0
- /package/{assets → boilerplate/assets}/textures/ice.png +0 -0
- /package/{assets → boilerplate/assets}/textures/infected_shadowrock.png +0 -0
- /package/{assets → boilerplate/assets}/textures/log_side.png +0 -0
- /package/{assets → boilerplate/assets}/textures/log_top.png +0 -0
- /package/{assets → boilerplate/assets}/textures/mossy_coblestone.png +0 -0
- /package/{assets → boilerplate/assets}/textures/nuit.png +0 -0
- /package/{assets → boilerplate/assets}/textures/oak_leaves.png +0 -0
- /package/{assets → boilerplate/assets}/textures/oak_planks.png +0 -0
- /package/{assets → boilerplate/assets}/textures/sand.png +0 -0
- /package/{assets → boilerplate/assets}/textures/shadowrock.png +0 -0
- /package/{assets → boilerplate/assets}/textures/stone.png +0 -0
- /package/{assets → boilerplate/assets}/textures/stone_bricks.png +0 -0
- /package/{assets → boilerplate/assets}/textures/void_sand.png +0 -0
- /package/{assets → boilerplate/assets}/textures/water_still.png +0 -0
@@ -0,0 +1,579 @@
|
|
1
|
+
import {
|
2
|
+
Audio,
|
3
|
+
BlockType,
|
4
|
+
ColliderShape,
|
5
|
+
CollisionGroup,
|
6
|
+
DefaultCharacterController,
|
7
|
+
Entity,
|
8
|
+
EventRouter,
|
9
|
+
PlayerEntity,
|
10
|
+
PlayerInputState,
|
11
|
+
PlayerOrientationState,
|
12
|
+
RigidBodyType,
|
13
|
+
Rotation,
|
14
|
+
Vector3,
|
15
|
+
World,
|
16
|
+
startServer,
|
17
|
+
} from 'hytopia';
|
18
|
+
|
19
|
+
import worldJson from './assets/map.json';
|
20
|
+
|
21
|
+
// Constants
|
22
|
+
const BULLET_SPEED = 50;
|
23
|
+
|
24
|
+
const PATHFIND_ACCUMULATOR_THRESHOLD = 60;
|
25
|
+
const PAYLOAD_SPAWN_COORDINATE = { x: 1.5, y: 2.6, z: 69.5 };
|
26
|
+
const PAYLOAD_PER_PLAYER_SPEED = 1;
|
27
|
+
const PAYLOAD_MAX_SPEED = 5;
|
28
|
+
const PAYLOAD_WAYPOINT_COORDINATES = [
|
29
|
+
{ x: 1.5, z: 1.5 },
|
30
|
+
{ x: 60.5, z: 1.5 },
|
31
|
+
{ x: 60.5, z: -62.5 },
|
32
|
+
];
|
33
|
+
const PLAYER_SPAWN_COORDINATES = [
|
34
|
+
{ x: 4, y: 3, z: 71 },
|
35
|
+
{ x: -2, y: 3, z: 68 },
|
36
|
+
{ x: 0, y: 3, z: 66 },
|
37
|
+
{ x: 3, y: 3, z: 66 },
|
38
|
+
{ x: 5, y: 3, z: 68 },
|
39
|
+
];
|
40
|
+
const PAYLOAD_WAYPOINT_ENEMY_SPAWNS = [
|
41
|
+
[
|
42
|
+
{ x: -16, y: 2, z: 1 },
|
43
|
+
{ x: 9, y: 2, z: -18 },
|
44
|
+
],
|
45
|
+
[
|
46
|
+
{ x: 61, y: 2, z: 19 },
|
47
|
+
{ x: 75, y: 2, z: -7 },
|
48
|
+
],
|
49
|
+
[
|
50
|
+
{ x: 44, y: 2, z: -62 },
|
51
|
+
{ x: 60, y: 2, z: -76 },
|
52
|
+
{ x: 76, y: 2, z: -76 },
|
53
|
+
],
|
54
|
+
];
|
55
|
+
|
56
|
+
// Globals, yuck
|
57
|
+
const enemyHealth: Record<number, number> = {};
|
58
|
+
const enemyPathfindAccumulators: Record<number, number> = {};
|
59
|
+
const enemyPathfindingTargets: Record<number, Vector3> = {};
|
60
|
+
const playerEntityHealth: Record<number, number> = {};
|
61
|
+
let started = false;
|
62
|
+
let payloadEntity: Entity | null = null;
|
63
|
+
let payloadPlayerEntityCount = 0;
|
64
|
+
let playerCount = 0;
|
65
|
+
let targetWaypointCoordinateIndex = 0;
|
66
|
+
|
67
|
+
// Configure Global Event Router
|
68
|
+
EventRouter.serverInstance.logIgnoreEvents = [ 'CONNECTION.PACKET_SENT' ];
|
69
|
+
EventRouter.serverInstance.logIgnoreEventPrefixes = [ 'CONNECTION.PACKET_SENT:' ];
|
70
|
+
EventRouter.serverInstance.logAllEvents = false;
|
71
|
+
|
72
|
+
// Run
|
73
|
+
void startServer(world => {
|
74
|
+
const chatManager = world.chatManager;
|
75
|
+
|
76
|
+
// Load Map
|
77
|
+
world.loadMap(worldJson);
|
78
|
+
|
79
|
+
// Setup Player Join & Spawn Controlled Entity
|
80
|
+
world.onPlayerJoin = player => {
|
81
|
+
const playerEntity = new PlayerEntity({
|
82
|
+
player,
|
83
|
+
name: 'Player',
|
84
|
+
modelUri: 'models/player-with-gun.gltf',
|
85
|
+
modelLoopedAnimations: [ 'idle' ],
|
86
|
+
modelScale: 0.5,
|
87
|
+
});
|
88
|
+
|
89
|
+
const randomSpawnCoordinate = PLAYER_SPAWN_COORDINATES[Math.floor(Math.random() * PLAYER_SPAWN_COORDINATES.length)];
|
90
|
+
playerEntity.spawn(world, randomSpawnCoordinate);
|
91
|
+
|
92
|
+
playerEntity.characterController!.onTickPlayerMovement = onTickPlayerMovement;
|
93
|
+
|
94
|
+
playerEntity.setCollisionGroupsForSolidColliders({
|
95
|
+
belongsTo: [ CollisionGroup.ENTITY, CollisionGroup.PLAYER ],
|
96
|
+
collidesWith: [ CollisionGroup.ALL ],
|
97
|
+
});
|
98
|
+
|
99
|
+
playerEntityHealth[playerEntity.id!] = 20;
|
100
|
+
playerCount++;
|
101
|
+
|
102
|
+
chatManager.sendBroadcastMessage(`Player ${player.username} has joined the game!`, 'FFFFFF');
|
103
|
+
|
104
|
+
if (!started) {
|
105
|
+
chatManager.sendBroadcastMessage('Enter command /start to start the game!', 'FFFFFF');
|
106
|
+
}
|
107
|
+
};
|
108
|
+
|
109
|
+
// Setup Player Leave & Despawn Controlled Entity
|
110
|
+
world.onPlayerLeave = player => {
|
111
|
+
world.entityManager.getAllPlayerEntities(player).forEach(entity => {
|
112
|
+
entity.setTranslation({ x: 0, y: 100, z: 0 });
|
113
|
+
setTimeout(() => entity.despawn(), 50);
|
114
|
+
});
|
115
|
+
|
116
|
+
playerCount--;
|
117
|
+
|
118
|
+
chatManager.sendBroadcastMessage(`Player ${player.username} has left the game!`, 'FFFFFF');
|
119
|
+
};
|
120
|
+
|
121
|
+
// Spawn Payload
|
122
|
+
spawnPayloadEntity(world);
|
123
|
+
|
124
|
+
|
125
|
+
// Start spawning enemies
|
126
|
+
startEnemySpawnLoop(world);
|
127
|
+
|
128
|
+
// Game Commands
|
129
|
+
chatManager.registerCommand('/start', () => {
|
130
|
+
chatManager.sendBroadcastMessage('Game started!');
|
131
|
+
started = true;
|
132
|
+
});
|
133
|
+
|
134
|
+
chatManager.registerCommand('/stop', () => {
|
135
|
+
chatManager.sendBroadcastMessage('Game stopped!');
|
136
|
+
started = false;
|
137
|
+
});
|
138
|
+
|
139
|
+
// Start Ambient Music
|
140
|
+
(new Audio({
|
141
|
+
uri: 'audio/music/game.mp3',
|
142
|
+
loop: true,
|
143
|
+
volume: 0.2,
|
144
|
+
})).play(world);
|
145
|
+
});
|
146
|
+
|
147
|
+
// Helper Functions
|
148
|
+
function startEnemySpawnLoop(world: World) {
|
149
|
+
let spawnInterval;
|
150
|
+
|
151
|
+
const spawn = () => {
|
152
|
+
const possibleSpawnCoordinate = PAYLOAD_WAYPOINT_ENEMY_SPAWNS[targetWaypointCoordinateIndex];
|
153
|
+
|
154
|
+
if (!possibleSpawnCoordinate) {
|
155
|
+
return console.warn('No possible spawn coordinate found!');
|
156
|
+
}
|
157
|
+
|
158
|
+
if (started) {
|
159
|
+
for (let i = 0; i < playerCount; i++) {
|
160
|
+
spawnSpider(world, possibleSpawnCoordinate[Math.floor(Math.random() * possibleSpawnCoordinate.length)]);
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
spawnInterval = 3500 - targetWaypointCoordinateIndex * 1000;
|
165
|
+
|
166
|
+
setTimeout(spawn, spawnInterval);
|
167
|
+
};
|
168
|
+
|
169
|
+
spawn();
|
170
|
+
}
|
171
|
+
|
172
|
+
function spawnBullet(world: World, coordinate: Vector3, direction: Vector3) {
|
173
|
+
const bullet = new Entity({
|
174
|
+
name: 'Bullet',
|
175
|
+
modelUri: 'models/bullet.gltf',
|
176
|
+
modelScale: 0.3,
|
177
|
+
rigidBodyOptions: {
|
178
|
+
type: RigidBodyType.KINEMATIC_VELOCITY,
|
179
|
+
linearVelocity: {
|
180
|
+
x: direction.x * BULLET_SPEED,
|
181
|
+
y: direction.y * BULLET_SPEED,
|
182
|
+
z: direction.z * BULLET_SPEED,
|
183
|
+
},
|
184
|
+
rotation: getRotationFromDirection(direction),
|
185
|
+
colliders: [
|
186
|
+
{
|
187
|
+
shape: ColliderShape.BALL,
|
188
|
+
radius: 0.1,
|
189
|
+
isSensor: true,
|
190
|
+
collisionGroups: {
|
191
|
+
belongsTo: [ CollisionGroup.ENTITY_SENSOR ],
|
192
|
+
collidesWith: [ CollisionGroup.ENTITY, CollisionGroup.BLOCK ],
|
193
|
+
},
|
194
|
+
},
|
195
|
+
],
|
196
|
+
},
|
197
|
+
});
|
198
|
+
|
199
|
+
bullet.onBlockCollision = (block: BlockType, started: boolean) => {
|
200
|
+
if (started) {
|
201
|
+
bullet.despawn();
|
202
|
+
}
|
203
|
+
};
|
204
|
+
|
205
|
+
bullet.onEntityCollision = (entity: Entity, started: boolean) => {
|
206
|
+
if (!started || ![ 'Spider', 'Zombie' ].includes(entity.name)) {
|
207
|
+
return;
|
208
|
+
}
|
209
|
+
|
210
|
+
enemyHealth[entity.id!]--;
|
211
|
+
|
212
|
+
const bulletDirection = bullet.getDirectionFromRotation();
|
213
|
+
const mass = entity.getMass();
|
214
|
+
const knockback = 14 * mass;
|
215
|
+
|
216
|
+
entity.applyImpulse({
|
217
|
+
x: -bulletDirection.x * knockback,
|
218
|
+
y: 0,
|
219
|
+
z: -bulletDirection.z * knockback,
|
220
|
+
});
|
221
|
+
|
222
|
+
if (enemyHealth[entity.id!] <= 0) {
|
223
|
+
// have to YEET the spider to register it leaving the sensor
|
224
|
+
entity.setTranslation({ x: 0, y: 100, z: 0 });
|
225
|
+
setTimeout(() => { entity.despawn(); }, 50);
|
226
|
+
}
|
227
|
+
|
228
|
+
bullet.despawn();
|
229
|
+
};
|
230
|
+
|
231
|
+
bullet.spawn(world, coordinate);
|
232
|
+
|
233
|
+
(new Audio({
|
234
|
+
uri: 'audio/sfx/shoot.mp3',
|
235
|
+
playbackRate: 2,
|
236
|
+
volume: 1,
|
237
|
+
attachedToEntity: bullet,
|
238
|
+
referenceDistance: 20,
|
239
|
+
})).play(world);
|
240
|
+
|
241
|
+
return bullet;
|
242
|
+
}
|
243
|
+
|
244
|
+
function spawnPayloadEntity(world: World) {
|
245
|
+
if (payloadEntity) {
|
246
|
+
return console.warn('Payload entity already exists!');
|
247
|
+
}
|
248
|
+
|
249
|
+
payloadEntity = new Entity({
|
250
|
+
name: 'Payload',
|
251
|
+
modelUri: 'models/payload.gltf',
|
252
|
+
modelScale: 0.7,
|
253
|
+
modelLoopedAnimations: [ 'idle' ],
|
254
|
+
rigidBodyOptions: {
|
255
|
+
type: RigidBodyType.KINEMATIC_VELOCITY,
|
256
|
+
colliders: [
|
257
|
+
{
|
258
|
+
shape: ColliderShape.BLOCK,
|
259
|
+
halfExtents: { x: 0.9, y: 1.6, z: 2.5 },
|
260
|
+
collisionGroups: {
|
261
|
+
belongsTo: [ CollisionGroup.ALL ],
|
262
|
+
collidesWith: [ CollisionGroup.ENTITY, CollisionGroup.ENTITY_SENSOR, CollisionGroup.PLAYER ],
|
263
|
+
},
|
264
|
+
},
|
265
|
+
{
|
266
|
+
shape: ColliderShape.BLOCK,
|
267
|
+
halfExtents: { x: 3.75, y: 2, z: 6 },
|
268
|
+
isSensor: true,
|
269
|
+
collisionGroups: {
|
270
|
+
belongsTo: [ CollisionGroup.ENTITY_SENSOR ],
|
271
|
+
collidesWith: [ CollisionGroup.PLAYER, CollisionGroup.ENTITY ],
|
272
|
+
},
|
273
|
+
onCollision: (other: BlockType | Entity, started: boolean) => {
|
274
|
+
if (other instanceof PlayerEntity) {
|
275
|
+
started ? payloadPlayerEntityCount++ : payloadPlayerEntityCount--;
|
276
|
+
} else if (other instanceof Entity) {
|
277
|
+
started ? payloadPlayerEntityCount-- : payloadPlayerEntityCount++;
|
278
|
+
}
|
279
|
+
},
|
280
|
+
},
|
281
|
+
],
|
282
|
+
},
|
283
|
+
});
|
284
|
+
|
285
|
+
payloadEntity.onTick = onTickPathfindPayload;
|
286
|
+
payloadEntity.spawn(world, PAYLOAD_SPAWN_COORDINATE);
|
287
|
+
|
288
|
+
(new Audio({
|
289
|
+
uri: 'audio/sfx/payload-idle.mp3',
|
290
|
+
loop: true,
|
291
|
+
attachedToEntity: payloadEntity,
|
292
|
+
volume: 0.25,
|
293
|
+
referenceDistance: 5,
|
294
|
+
})).play(world);
|
295
|
+
}
|
296
|
+
|
297
|
+
function spawnSpider(world: World, coordinate: Vector3) {
|
298
|
+
const baseScale = 0.5;
|
299
|
+
const baseSpeed = 3;
|
300
|
+
const randomScaleMultiplier = Math.random() * 2 + 1; // Random value between 1 and 3
|
301
|
+
|
302
|
+
const spider = new Entity({
|
303
|
+
name: 'Spider',
|
304
|
+
modelUri: 'models/spider.gltf',
|
305
|
+
modelLoopedAnimations: [ 'walk' ],
|
306
|
+
modelScale: baseScale * randomScaleMultiplier,
|
307
|
+
rigidBodyOptions: {
|
308
|
+
type: RigidBodyType.DYNAMIC,
|
309
|
+
enabledRotations: { x: false, y: true, z: false },
|
310
|
+
colliders: [
|
311
|
+
{
|
312
|
+
shape: ColliderShape.ROUND_CYLINDER,
|
313
|
+
borderRadius: 0.1 * randomScaleMultiplier,
|
314
|
+
halfHeight: 0.225 * randomScaleMultiplier,
|
315
|
+
radius: 0.5 * randomScaleMultiplier,
|
316
|
+
tag: 'body',
|
317
|
+
collisionGroups: {
|
318
|
+
belongsTo: [ CollisionGroup.ENTITY ],
|
319
|
+
collidesWith: [ CollisionGroup.BLOCK, CollisionGroup.ENTITY_SENSOR, CollisionGroup.PLAYER ],
|
320
|
+
},
|
321
|
+
},
|
322
|
+
{
|
323
|
+
shape: ColliderShape.CYLINDER,
|
324
|
+
radius: 20,
|
325
|
+
halfHeight: 1,
|
326
|
+
isSensor: true,
|
327
|
+
tag: 'aggro-sensor', // unecessary but for clarity
|
328
|
+
collisionGroups: {
|
329
|
+
belongsTo: [ CollisionGroup.ENTITY_SENSOR ],
|
330
|
+
collidesWith: [ CollisionGroup.PLAYER ],
|
331
|
+
},
|
332
|
+
onCollision: (other: BlockType | Entity, started: boolean) => {
|
333
|
+
if (other instanceof PlayerEntity) {
|
334
|
+
started ? targetPlayers.add(other) : targetPlayers.delete(other);
|
335
|
+
}
|
336
|
+
},
|
337
|
+
},
|
338
|
+
],
|
339
|
+
},
|
340
|
+
});
|
341
|
+
|
342
|
+
const targetPlayers = new Set<PlayerEntity>();
|
343
|
+
|
344
|
+
spider.onTick = (tickDeltaMs: number) => onTickPathfindEnemy(
|
345
|
+
spider,
|
346
|
+
targetPlayers,
|
347
|
+
baseSpeed * randomScaleMultiplier,
|
348
|
+
tickDeltaMs,
|
349
|
+
);
|
350
|
+
|
351
|
+
spider.onEntityCollision = (entity: Entity, started: boolean) => {
|
352
|
+
if (started && entity instanceof PlayerEntity && entity.isSpawned) {
|
353
|
+
const spiderDirection = spider.getDirectionFromRotation();
|
354
|
+
const knockback = 4 * randomScaleMultiplier;
|
355
|
+
|
356
|
+
entity.applyImpulse({
|
357
|
+
x: -spiderDirection.x * knockback,
|
358
|
+
y: 4,
|
359
|
+
z: -spiderDirection.z * knockback,
|
360
|
+
});
|
361
|
+
|
362
|
+
(new Audio({
|
363
|
+
uri: 'audio/sfx/damage.wav',
|
364
|
+
volume: 0.2,
|
365
|
+
attachedToEntity: spider,
|
366
|
+
referenceDistance: 8,
|
367
|
+
})).play(world);
|
368
|
+
|
369
|
+
damagePlayer(entity);
|
370
|
+
}
|
371
|
+
};
|
372
|
+
|
373
|
+
spider.spawn(world, coordinate);
|
374
|
+
|
375
|
+
enemyHealth[spider.id!] = 2 * Math.round(randomScaleMultiplier);
|
376
|
+
}
|
377
|
+
|
378
|
+
function onTickPathfindPayload(this: Entity, tickDeltaMs: number) {
|
379
|
+
const speed = started
|
380
|
+
? Math.max(Math.min(PAYLOAD_PER_PLAYER_SPEED * payloadPlayerEntityCount, PAYLOAD_MAX_SPEED), 0)
|
381
|
+
: 0;
|
382
|
+
|
383
|
+
if (!speed) {
|
384
|
+
this.stopModelAnimations(Array.from(this.modelLoopedAnimations).filter(v => v !== 'idle'));
|
385
|
+
this.startModelLoopedAnimations([ 'idle' ]);
|
386
|
+
} else {
|
387
|
+
this.stopModelAnimations(Array.from(this.modelLoopedAnimations).filter(v => v !== 'walk'));
|
388
|
+
this.startModelLoopedAnimations([ 'walk' ]);
|
389
|
+
}
|
390
|
+
|
391
|
+
// Calculate direction to target
|
392
|
+
const targetWaypointCoordinate = PAYLOAD_WAYPOINT_COORDINATES[targetWaypointCoordinateIndex];
|
393
|
+
const currentPosition = this.getTranslation();
|
394
|
+
const deltaX = targetWaypointCoordinate.x - currentPosition.x;
|
395
|
+
const deltaZ = targetWaypointCoordinate.z - currentPosition.z;
|
396
|
+
|
397
|
+
const direction = {
|
398
|
+
x: Math.abs(deltaX) > 0.1 ? Math.sign(deltaX) : 0,
|
399
|
+
z: Math.abs(deltaZ) > 0.1 ? Math.sign(deltaZ) : 0,
|
400
|
+
};
|
401
|
+
|
402
|
+
// Apply rotation to face direction if necessary
|
403
|
+
const rotation = this.getRotation();
|
404
|
+
const currentAngle = 2 * Math.atan2(rotation.y, rotation.w);
|
405
|
+
const targetAngle = Math.atan2(direction.x, direction.z) + Math.PI; // Add PI to face forward
|
406
|
+
|
407
|
+
let angleDiff = targetAngle - currentAngle;
|
408
|
+
while (angleDiff > Math.PI) angleDiff -= 2 * Math.PI;
|
409
|
+
while (angleDiff < -Math.PI) angleDiff += 2 * Math.PI;
|
410
|
+
|
411
|
+
if (Math.abs(angleDiff) > 0.01) {
|
412
|
+
const rotationStep = (Math.PI / 2) * (tickDeltaMs / 1000) * Math.sign(angleDiff);
|
413
|
+
const actualRotation = Math.abs(rotationStep) > Math.abs(angleDiff) ? angleDiff : rotationStep;
|
414
|
+
const newAngle = currentAngle + actualRotation;
|
415
|
+
|
416
|
+
this.setRotation({
|
417
|
+
x: 0,
|
418
|
+
y: Math.sin(newAngle / 2),
|
419
|
+
z: 0,
|
420
|
+
w: Math.cos(newAngle / 2),
|
421
|
+
});
|
422
|
+
}
|
423
|
+
|
424
|
+
// Apply velocity to move towards target
|
425
|
+
this.setLinearVelocity({
|
426
|
+
x: direction.x * speed,
|
427
|
+
y: 0,
|
428
|
+
z: direction.z * speed,
|
429
|
+
});
|
430
|
+
|
431
|
+
// Check if we're within 3 blocks of the target waypoint, if so move to next waypoint
|
432
|
+
const distanceX = Math.abs(currentPosition.x - targetWaypointCoordinate.x);
|
433
|
+
const distanceZ = Math.abs(currentPosition.z - targetWaypointCoordinate.z);
|
434
|
+
|
435
|
+
if (distanceX <= 2 && distanceZ <= 2) {
|
436
|
+
if (targetWaypointCoordinateIndex + 1 < PAYLOAD_WAYPOINT_COORDINATES.length) {
|
437
|
+
targetWaypointCoordinateIndex++;
|
438
|
+
} else {
|
439
|
+
console.log('GAME WON!');
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
|
444
|
+
function onTickPathfindEnemy(entity: Entity, targetPlayers: Set<PlayerEntity>, speed: number, _tickDeltaMs: number) {
|
445
|
+
if (!entity.isSpawned || !payloadEntity) return;
|
446
|
+
|
447
|
+
const entityId = entity.id!;
|
448
|
+
enemyPathfindAccumulators[entityId] ??= 0;
|
449
|
+
|
450
|
+
// Handle pathfinding
|
451
|
+
if (!enemyPathfindingTargets[entityId] || enemyPathfindAccumulators[entityId] >= PATHFIND_ACCUMULATOR_THRESHOLD) {
|
452
|
+
const targetPlayer = targetPlayers.values().next().value as PlayerEntity | undefined;
|
453
|
+
|
454
|
+
enemyPathfindingTargets[entityId] = targetPlayer?.isSpawned
|
455
|
+
? targetPlayer.getTranslation()
|
456
|
+
: payloadEntity.getTranslation();
|
457
|
+
|
458
|
+
enemyPathfindAccumulators[entityId] -= PATHFIND_ACCUMULATOR_THRESHOLD;
|
459
|
+
|
460
|
+
const currentPosition = entity.getTranslation();
|
461
|
+
const dx = enemyPathfindingTargets[entityId].x - currentPosition.x;
|
462
|
+
const dz = enemyPathfindingTargets[entityId].z - currentPosition.z;
|
463
|
+
const distance = Math.sqrt(dx * dx + dz * dz);
|
464
|
+
|
465
|
+
if (distance < 10) {
|
466
|
+
const mass = entity.getMass();
|
467
|
+
entity.applyImpulse({ x: 0, y: (10 * Math.random() + 5) * mass, z: 0 });
|
468
|
+
}
|
469
|
+
}
|
470
|
+
|
471
|
+
enemyPathfindAccumulators[entityId]++;
|
472
|
+
|
473
|
+
// Handle movement to target
|
474
|
+
const currentPosition = entity.getTranslation();
|
475
|
+
const targetPosition = enemyPathfindingTargets[entityId];
|
476
|
+
const direction = {
|
477
|
+
x: targetPosition.x - currentPosition.x,
|
478
|
+
y: 0, // We only want rotation around Y axis, so ignore vertical difference
|
479
|
+
z: targetPosition.z - currentPosition.z,
|
480
|
+
};
|
481
|
+
|
482
|
+
// Normalize the direction vector
|
483
|
+
const length = Math.sqrt(direction.x * direction.x + direction.z * direction.z);
|
484
|
+
if (length > 0) {
|
485
|
+
direction.x /= length;
|
486
|
+
direction.z /= length;
|
487
|
+
}
|
488
|
+
|
489
|
+
// Calculate facing rotation
|
490
|
+
const angle = Math.atan2(direction.x, direction.z);
|
491
|
+
const adjustedAngle = angle + Math.PI;
|
492
|
+
const sinHalfAngle = Math.sin(adjustedAngle * 0.5);
|
493
|
+
const cosHalfAngle = Math.cos(adjustedAngle * 0.5);
|
494
|
+
|
495
|
+
entity.setRotation({ x: 0, y: sinHalfAngle, z: 0, w: cosHalfAngle });
|
496
|
+
|
497
|
+
// Calculate movement
|
498
|
+
const currentVelocity = entity.getLinearVelocity();
|
499
|
+
|
500
|
+
if (Math.abs(currentVelocity.x) < speed && Math.abs(currentVelocity.z) < speed) {
|
501
|
+
const movement = {
|
502
|
+
x: direction.x * speed,
|
503
|
+
y: currentVelocity.y,
|
504
|
+
z: direction.z * speed,
|
505
|
+
};
|
506
|
+
|
507
|
+
entity.setLinearVelocity(movement);
|
508
|
+
}
|
509
|
+
}
|
510
|
+
|
511
|
+
function onTickPlayerMovement(this: DefaultCharacterController, inputState: PlayerInputState, orientationState: PlayerOrientationState, _deltaTimeMs: number) {
|
512
|
+
if (!this.entity.world) return;
|
513
|
+
|
514
|
+
if (inputState.ml) {
|
515
|
+
const world = this.entity.world;
|
516
|
+
const entity = this.entity;
|
517
|
+
const direction = getDirectionFromOrientation(orientationState);
|
518
|
+
|
519
|
+
const bullet = spawnBullet(world, entity.getTranslation(), direction);
|
520
|
+
setTimeout(() => bullet.isSpawned && bullet.despawn(), 2000);
|
521
|
+
}
|
522
|
+
}
|
523
|
+
|
524
|
+
function damagePlayer(playerEntity: PlayerEntity) {
|
525
|
+
const chatManager = playerEntity.world!.chatManager;
|
526
|
+
|
527
|
+
playerEntityHealth[playerEntity.id!]--;
|
528
|
+
|
529
|
+
chatManager.sendPlayerMessage(
|
530
|
+
playerEntity.player,
|
531
|
+
`You have been hit! You have ${playerEntityHealth[playerEntity.id!]} health remaining.`,
|
532
|
+
'FF0000',
|
533
|
+
);
|
534
|
+
|
535
|
+
if (playerEntityHealth[playerEntity.id!] <= 0) {
|
536
|
+
chatManager.sendPlayerMessage(
|
537
|
+
playerEntity.player,
|
538
|
+
'You have died!',
|
539
|
+
'FF0000',
|
540
|
+
);
|
541
|
+
|
542
|
+
playerEntity.despawn();
|
543
|
+
}
|
544
|
+
}
|
545
|
+
|
546
|
+
function getDirectionFromOrientation(orientationState: PlayerOrientationState): Vector3 {
|
547
|
+
const { yaw, pitch } = orientationState;
|
548
|
+
const cosPitch = Math.cos(pitch);
|
549
|
+
|
550
|
+
return {
|
551
|
+
x: -Math.sin(yaw) * cosPitch,
|
552
|
+
y: Math.sin(pitch),
|
553
|
+
z: -Math.cos(yaw) * cosPitch,
|
554
|
+
};
|
555
|
+
}
|
556
|
+
|
557
|
+
function getRotationFromDirection(direction: Vector3): Rotation {
|
558
|
+
// Calculate yaw (rotation around Y-axis)
|
559
|
+
const yaw = Math.atan2(-direction.x, -direction.z);
|
560
|
+
|
561
|
+
// Calculate pitch (rotation around X-axis)
|
562
|
+
const pitch = Math.asin(direction.y);
|
563
|
+
|
564
|
+
// Pre-calculate common terms
|
565
|
+
const halfYaw = yaw * 0.5;
|
566
|
+
const halfPitch = pitch * 0.5;
|
567
|
+
const cosHalfYaw = Math.cos(halfYaw);
|
568
|
+
const sinHalfYaw = Math.sin(halfYaw);
|
569
|
+
const cosHalfPitch = Math.cos(halfPitch);
|
570
|
+
const sinHalfPitch = Math.sin(halfPitch);
|
571
|
+
|
572
|
+
// Convert to quaternion
|
573
|
+
return {
|
574
|
+
x: sinHalfPitch * cosHalfYaw,
|
575
|
+
y: sinHalfYaw * cosHalfPitch,
|
576
|
+
z: sinHalfYaw * sinHalfPitch,
|
577
|
+
w: cosHalfPitch * cosHalfYaw,
|
578
|
+
};
|
579
|
+
}
|
package/package.json
CHANGED