Skip to content

Latest commit

 

History

History
1771 lines (807 loc) · 24.1 KB

File metadata and controls

1771 lines (807 loc) · 24.1 KB

Home > server

server package

Classes

Class

Description

Audio

Represents a audio playback in a world.

AudioManager

Manages audio instances in a world.

Block

Represents a block in a world.

BlockType

Represents a block type.

BlockTypeRegistry

Manages known block types in a world.

ChatManager

Manages chat and commands in a world.

Chunk

A 16^3 chunk of blocks. Used to represent a world's terrain.

ChunkLattice

A lattice of chunks that represent a world's terrain.

Collider

Represents a collider in a world's physics simulation.

CollisionGroupsBuilder

A helper class for building and decoding collision groups.

DefaultPlayerEntity

Represents the default player model entity.

DefaultPlayerEntityController

The player entity controller implementation.

Entity

Represents an entity in a world.

EntityManager

Manages entities in a world.

ErrorHandler

Manages error and warning logging.

EventRouter

Manages event emission and assigned listener callbacks.

GameServer

Manages the game and associated worlds and systems.

Light

Represents a light in a world. Lights can be point lights or spotlights.

LightManager

Manages Light instances in a world.

Matrix2

Represents a 2x2 matrix.

Matrix3

Represents a 3x3 matrix.

Matrix4

Represents a 4x4 matrix.

ModelRegistry

Manages model data for all known models of the game.

PathfindingEntityController

A pathfinding entity controller built on top of SimpleEntityController.

PersistenceManager

Manages persistence of player and global data.

Player

A player in the game.

PlayerCamera

The camera for a Player.

PlayerEntity

Represents an entity controlled by a player in a world.

PlayerManager

Manages all connected players in a game server.

PlayerUI

The UI for a player.

Quaternion

Represents a quaternion.

RigidBody

Represents a rigid body in a world's physics simulation.

SceneUI

UI rendered within the 3D space of a world's game scene.

SceneUIManager

Manages SceneUI instances in a world.

SimpleEntityController

A simple entity controller with basic movement functions.

Simulation

Represents the physics simulation for a world.

Vector2

Represents a 2D vector.

Vector3

Represents a 3-dimensional vector.

World

Represents a world in the game server.

WorldLoop

Manages the tick loop for a world.

WorldManager

Manages all worlds in a game server.

Abstract Classes

Abstract Class

Description

BaseEntityController

A base class for entity controller implementations.

Enumerations

Enumeration

Description

AudioEvent

Event types an Audio instance can emit. See AudioEventPayloads for the payloads.

BaseEntityControllerEvent

Event types a BaseEntityController instance can emit. See BaseEntityControllerEventPayloads for the payloads.

BlockTypeEvent

Event types a BlockType instance can emit. See BlockTypeEventPayloads for the payloads.

BlockTypeRegistryEvent

Event types a BlockTypeRegistry instance can emit. See BlockTypeRegistryEventPayloads for the payloads.

ChatEvent

Event types a ChatManager instance can emit. See ChatEventPayloads for the payloads.

ChunkEvent

Event types a Chunk instance can emit. See ChunkEventPayloads for the payloads.

CoefficientCombineRule

The coefficient for friction or bounciness combine rule.

ColliderShape

The shapes a collider can be.

CollisionGroup

The default collision groups.

EntityEvent

Event types an Entity instance can emit. See EntityEventPayloads for the payloads.

GameServerEvent

Event types a GameServer instance can emit to the global event router. See GameServerEventPayloads for the payloads.

LightEvent

Event types a Light instance can emit. See LightEventPayloads for the payloads.

LightType

The types a Light can be.

PlayerCameraEvent

Event types a PlayerCamera can emit. See PlayerCameraEventPayloads for the payloads.

PlayerCameraMode

The mode of the camera.

PlayerEvent

Event types a Player can emit. See PlayerEventPayloads for the payloads.

PlayerManagerEvent

Event types a PlayerManager can emit. See PlayerManagerEventPayloads for the payloads.

PlayerUIEvent

Event types a PlayerUI can emit. See PlayerUIEventPayloads for the payloads.

RigidBodyType

The types a RigidBody can be.

SceneUIEvent

Event types a SceneUI instance can emit. See SceneUIEventPayloads for the payloads.

SimulationEvent

Event types a Simulation instance can emit. See SimulationEventPayloads for the payloads.

WorldEvent

Event types a World instance can emit. See WorldEventPayloads for the payloads.

WorldLoopEvent

Event types a WorldLoop instance can emit. See WorldLoopEventPayloads for the payloads.

WorldManagerEvent

Event types a WorldManager instance can emit to the global event router. See WorldManagerEventPayloads for the payloads.

Functions

Function

Description

startServer(init)

The entry point for running game setup and starting the game server.

Interfaces

Interface

Description

AudioEventPayloads

Event payloads for Audio emitted events.

AudioOptions

Options for creating an Audio instance.

BallColliderOptions

The options for a ball collider.

BaseColliderOptions

The base options for a collider.

BaseEntityControllerEventPayloads

Event payloads for BaseEntityController emitted events.

BaseEntityOptions

The base options for an entity.

BaseRigidBodyOptions

The base options for a rigid body.

BlockColliderOptions

The options for a block collider.

BlockEntityOptions

The options for creating a block entity.

BlockTypeEventPayloads

Event payloads for BlockType emitted events.

BlockTypeOptions

Options for creating a block type instance.

BlockTypeRegistryEventPayloads

Event payloads for BlockTypeRegistry emitted events.

CapsuleColliderOptions

The options for a capsule collider.

ChatEventPayloads

Event payloads for ChatManager emitted events.

ChunkEventPayloads

Event payloads for Chunk emitted events.

ConeColliderOptions

The options for a cone collider.

CylinderColliderOptions

The options for a cylinder collider.

DefaultPlayerEntityControllerOptions

Options for creating a DefaultPlayerEntityController instance.

DynamicRigidBodyOptions

The options for a dynamic rigid body, also the default type.

EntityEventPayloads

Event payloads for Entity emitted events.

EventPayloads

The payloads for all events in the game server.

FixedRigidBodyOptions

The options for a fixed rigid body.

GameServerEventPayloads

Event payloads for GameServer emitted events.

KinematicPositionRigidBodyOptions

The options for a kinematic position rigid body.

KinematicVelocityRigidBodyOptions

The options for a kinematic velocity rigid body.

LightEventPayloads

Event payloads for Light emitted events.

LightOptions

Options for creating a Light instance.

ModelEntityOptions

The options for creating a model entity.

NoneColliderOptions

The options for an error type "none" collider.

PlayerCameraEventPayloads

Event payloads for PlayerCamera emitted events.

PlayerEventPayloads

Event payloads for Player emitted events.

PlayerManagerEventPayloads

Event payloads for PlayerManager emitted events.

PlayerUIEventPayloads

Event payloads for PlayerUI emitted events.

QuaternionLike

A quaternion.

RgbColor

A RGB color.

RoundCylinderColliderOptions

The options for a round cylinder collider.

SceneUIEventPayloads

Event payloads for SceneUI emitted events.

SceneUIOptions

Options for creating a SceneUI instance.

SimulationEventPayloads

Event payloads for Simulation emitted events.

SpdMatrix3

A 3x3 symmetric positive-definite matrix for spatial dynamics.

TrimeshColliderOptions

The options for a trimesh collider.

Vector2Boolean

A 2-dimensional vector of boolean values.

Vector2Like

A 2-dimensional vector.

Vector3Boolean

A 3-dimensional vector of boolean values.

Vector3Like

A 3-dimensional vector.

WedgeColliderOptions

The options for a wedge collider.

WorldEventPayloads

Event payloads for World emitted events.

WorldLoopEventPayloads

Event payloads for WorldLoop emitted events.

WorldManagerEventPayloads

Event payloads for WorldManager emitted events.

WorldMap

A map representation for a world.

WorldOptions

Options for creating a World instance.

Variables

Variable

Description

DEFAULT_ENTITY_RIGID_BODY_OPTIONS

The default rigid body options for a model entity when EntityOptions.rigidBodyOptions is not provided.

PORT

The port the server will run on. You can override this in your .env by setting PORT. When deployed in production to HYTOPIA servers, any .env value will be ignored and 8080 will be used.

SUPPORTED_INPUT_KEYS

The input keys that are included in the PlayerInput.

Type Aliases

Type Alias

Description

ColliderOptions

The options for a collider.

CollisionCallback

A callback function that is called when a collision occurs.

CollisionGroups

A set of collision groups.

CommandCallback

A callback function for a chat command.

ContactForceData

Data for contact forces.

ContactManifold

A contact manifold.

DecodedCollisionGroups

A decoded set of collision groups represented as their string equivalents.

DefaultPlayerEntityOptions

Options for creating a DefaultPlayerEntity instance.

EntityOptions

The options for creating an Entity instance.

FaceCallback

A callback function called when the entity associated with the SimpleEntityController updates its rotation as it is attempting to face a target coordinate.

FaceCompleteCallback

A callback function called when the entity associated with the SimpleEntityController finishes rotating and is now facing a target coordinate.

FaceOptions

Options for the SimpleEntityController.face() method.

ModelBoundingBox

A bounding box for a model.

ModelTrimesh

A trimesh for a model.

MoveCallback

A callback function called when the entity associated with the SimpleEntityController updates its position as it is attempting to move to a target coordinate.

MoveCompleteCallback

A callback function called when the entity associated with the SimpleEntityController reaches the target coordinate. An entity must reach the x,y,z coordinate for the callback to be called.

MoveOptions

Options for the SimpleEntityController.move() method.

PathfindAbortCallback

A callback function called when the pathfinding algorithm aborts.

PathfindCompleteCallback

A callback function called when the entity associated with the PathfindingEntityController finishes pathfinding and is now at the target coordinate.

PathfindingOptions

Options for the PathfindingEntityController.pathfind() method.

PlayerCameraOrientation

The camera orientation state of a Player.

PlayerEntityOptions

Options for creating a PlayerEntity instance.

PlayerInput

The input state of a Player; keys from SUPPORTED_INPUT_KEYS.

RawCollisionGroups

A raw set of collision groups represented as a 32-bit number.

RaycastHit

A hit result from a raycast.

RaycastOptions

Options for raycasting.

RigidBodyAdditionalMassProperties

Additional mass properties for a RigidBody.

RigidBodyOptions

The options for a rigid body.

WaypointMoveCompleteCallback

A callback function called when the entity associated with the PathfindingEntityController finishes moving to a calculate waypoint of its current path.

WaypointMoveSkippedCallback

A callback function called when the entity associated with the PathfindingEntityController skips a waypoint because it took too long to reach.