# Class: VoxelCoordMap<T>

# Type parameters

Name
T

# Constructors

# constructor

new VoxelCoordMap<T>(props?)

# Type parameters

Name
T

# Parameters

Name Type
props? Object
props.defaultValue? T

# Defined in

packages/utils/src/VoxelCoordMap.ts:18

# Properties

# defaultValue

Optional defaultValue: T

# Defined in

packages/utils/src/VoxelCoordMap.ts:16


# map

map: Map<string, T>

# Defined in

packages/utils/src/VoxelCoordMap.ts:15

# Accessors

# size

get size(): number

# Returns

number

# Defined in

packages/utils/src/VoxelCoordMap.ts:73

# Methods

# clear

clear(): void

# Returns

void

# Defined in

packages/utils/src/VoxelCoordMap.ts:67


# coords

coords(): IterableIterator<VoxelCoord>

# Returns

IterableIterator<VoxelCoord>

# Defined in

packages/utils/src/VoxelCoordMap.ts:42


# delete

delete(coord): boolean

# Parameters

Name Type
coord VoxelCoord

# Returns

boolean

# Defined in

packages/utils/src/VoxelCoordMap.ts:59


# entries

entries(): IterableIterator<[string, T]>

# Returns

IterableIterator<[string, T]>

# Defined in

packages/utils/src/VoxelCoordMap.ts:46


# get

get(coord): undefined | T

# Parameters

Name Type
coord VoxelCoord

# Returns

undefined | T

# Defined in

packages/utils/src/VoxelCoordMap.ts:34


# has

has(coord): boolean

# Parameters

Name Type
coord VoxelCoord

# Returns

boolean

# Defined in

packages/utils/src/VoxelCoordMap.ts:63


# keys

keys(): IterableIterator<string>

# Returns

IterableIterator<string>

# Defined in

packages/utils/src/VoxelCoordMap.ts:38


# set

set(coord, value): Map<string, T>

# Parameters

Name Type
coord VoxelCoord
value T

# Returns

Map<string, T>

# Defined in

packages/utils/src/VoxelCoordMap.ts:30


# toArray

toArray(): [VoxelCoord, T][]

# Returns

[VoxelCoord, T][]

# Defined in

packages/utils/src/VoxelCoordMap.ts:50


# values

values(): IterableIterator<T>

# Returns

IterableIterator<T>

# Defined in

packages/utils/src/VoxelCoordMap.ts:55


# from

Static from<T>(coordMapLike): VoxelCoordMap<T>

# Type parameters

Name
T

# Parameters

Name Type
coordMapLike Object
coordMapLike.defaultValue? T
coordMapLike.map Map<string, T>

# Returns

VoxelCoordMap<T>

# Defined in

packages/utils/src/VoxelCoordMap.ts:23