Skip to main content

Class: Registry

Properties​

blocksById​

• blocksById: Map<number, Block>


blocksByName​

• blocksByName: Map<string, Block>


idMap​

• idMap: Map<number, string>


nameMap​

• nameMap: Map<string, number>

Methods​

deserialize​

▸ deserialize(data): Registry

Parameters​

NameType
dataSerializedRegistry

Returns​

Registry


parseSerialized​

▸ parseSerialized(data): ParsedRegistry

Decodes what Registry.serialize produced into plain block entries, keyed both ways with shared block objects. Workers that keep their own block tables (the wasm mesher) read this directly; Registry.deserialize wraps it into a Registry.

Parameters​

NameType
dataSerializedRegistry

Returns​

ParsedRegistry


serialize​

▸ serialize(): string

Returns​

string