@voxelize/protocol
Namespaces
Classes
Type Aliases
ChatProtocol
Ƭ ChatProtocol: Object
Type declaration
Name | Type |
---|---|
body | string |
sender? | string |
type | string |
ChunkProtocol
Ƭ ChunkProtocol: Object
Type declaration
Name | Type |
---|---|
id | string |
lights | Uint32Array |
meshes | MeshProtocol [] |
voxels | Uint32Array |
x | number |
z | number |
EntityOperation
Ƭ EntityOperation: "CREATE"
| "UPDATE"
| "DELETE"
EntityProtocol
Ƭ EntityProtocol<T
>: Object
Type parameters
Name |
---|
T |
Type declaration
Name | Type |
---|---|
id | string |
metadata | T |
operation | EntityOperation |
type | string |
EventProtocol
Ƭ EventProtocol<T
>: Object
Type parameters
Name |
---|
T |
Type declaration
Name | Type |
---|---|
name | string |
payload | T |
GeometryProtocol
Ƭ GeometryProtocol: Object
Type declaration
Name | Type |
---|---|
at? | [number , number , number ] |
faceName? | string |
indices | Uint32Array |
lights | Uint32Array |
positions | Float32Array |
uvs | Float32Array |
voxel | number |
MeshProtocol
Ƭ MeshProtocol: Object
Type declaration
Name | Type |
---|---|
geometries | GeometryProtocol [] |
level | number |
MessageProtocol
Ƭ MessageProtocol<T
, Peer
, Entity
, Event
, Method
>: Object
Type parameters
Name | Type |
---|---|
T | any |
Peer | any |
Entity | any |
Event | any |
Method | any |
Type declaration
Name | Type |
---|---|
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
Name | Type |
---|---|
name | string |
payload | T |
PeerProtocol
Ƭ PeerProtocol<T
>: Object
Type parameters
Name |
---|
T |
Type declaration
Name | Type |
---|---|
id | string |
metadata | T |
username | string |
UpdateProtocol
Ƭ UpdateProtocol: Object
Type declaration
Name | Type |
---|---|
light? | number |
voxel? | number |
vx | number |
vy | number |
vz | number |
Functions
decodeStructToObject
▸ decodeStructToObject(struct
): any
Parameters
Name | Type |
---|---|
struct | any |
Returns
any
encodeObjectToStruct
▸ encodeObjectToStruct(obj
, seenObjects?
): any
Parameters
Name | Type |
---|---|
obj | any |
seenObjects | Set <any > |
Returns
any