Skip to main content

@voxelize/protocol

Namespaces

References

default

Renames and re-exports protocol

Type Aliases

ChatProtocol

Ƭ ChatProtocol: Object

Type declaration

NameType
bodystring
sender?string
typestring

ChunkProtocol

Ƭ ChunkProtocol: Object

Type declaration

NameType
idstring
lightsUint32Array
meshesMeshProtocol[]
voxelsUint32Array
xnumber
znumber

EntityOperation

Ƭ EntityOperation: "CREATE" | "UPDATE" | "DELETE"


EntityProtocol

Ƭ EntityProtocol<T>: Object

Type parameters

Name
T

Type declaration

NameType
idstring
metadataT
operationEntityOperation
typestring

EventProtocol

Ƭ EventProtocol<T>: Object

Type parameters

Name
T

Type declaration

NameType
namestring
payloadT

GeometryProtocol

Ƭ GeometryProtocol: Object

Type declaration

NameType
at?[number, number, number]
faceName?string
indicesUint32Array
lightsUint32Array
positionsFloat32Array
uvsFloat32Array
voxelnumber

MeshProtocol

Ƭ MeshProtocol: Object

Type declaration

NameType
geometriesGeometryProtocol[]
levelnumber

MessageProtocol

Ƭ MessageProtocol<T, Peer, Entity, Event, Method>: Object

Type parameters

NameType
Tany
Peerany
Entityany
Eventany
Methodany

Type declaration

NameType
chat?ChatProtocol
chunks?ChunkProtocol[]
entities?EntityProtocol<Entity>[]
events?EventProtocol<Event>[]
json?T
method?MethodProtocol<Method>
peers?PeerProtocol<Peer>[]
text?string
type"INIT" | "JOIN" | "LEAVE" | "ERROR" | "PEER" | "ENTITY" | "LOAD" | "UNLOAD" | "UPDATE" | "METHOD" | "CHAT" | "TRANSPORT" | "EVENT" | "ACTION" | "STATS"
updates?UpdateProtocol[]

MethodProtocol

Ƭ MethodProtocol<T>: Object

Type parameters

Name
T

Type declaration

NameType
namestring
payloadT

PeerProtocol

Ƭ PeerProtocol<T>: Object

Type parameters

Name
T

Type declaration

NameType
idstring
metadataT
usernamestring

UpdateProtocol

Ƭ UpdateProtocol: Object

Type declaration

NameType
light?number
voxel?number
vxnumber
vynumber
vznumber