Skip to content

spatial-monorepo


spatial-monorepo / core/src / DirtyTrackingPositionMap

Class: DirtyTrackingPositionMap

Defined in: packages/core/src/layers/RTLSLayer.ts:37

Drop-in replacement for new Map<string, PositionUpdate>() that tracks a version counter so rAF loops can detect "nothing changed since last frame" and skip redundant rendering work. Used by <RTLSLayer>/<BlueDot> wherever they own the PositionMap ref that adapter events write into.

Extends

Implements

Constructors

Constructor

new DirtyTrackingPositionMap(entries?): DirtyTrackingPositionMap

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:51

Parameters

entries?

readonly readonly [string, PositionUpdate][] | null

Returns

DirtyTrackingPositionMap

Inherited from

Map<string, PositionUpdate>.constructor

Constructor

new DirtyTrackingPositionMap(iterable?): DirtyTrackingPositionMap

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:50

Parameters

iterable?

Iterable`<readonly [string, PositionUpdate], any, any>\|null`

Returns

DirtyTrackingPositionMap

Inherited from

Map<string, PositionUpdate>.constructor

Properties

[toStringTag]

readonly [toStringTag]: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:135

Implementation of

VersionedPositionMap.[toStringTag]

Inherited from

Map.[toStringTag]


size

readonly size: number

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:46

Returns

the number of elements in the Map.

Implementation of

VersionedPositionMap.size

Inherited from

Map.size


[species]

readonly static [species]: MapConstructor

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:317

Inherited from

Map.[species]

Accessors

version

Get Signature

get version(): number

Defined in: packages/core/src/layers/RTLSLayer.ts:40

Returns

number

Implementation of

VersionedPositionMap.version

Methods

[iterator]()

[iterator](): MapIterator`<[string, PositionUpdate]>`

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts:141

Returns an iterable of entries in the map.

Returns

MapIterator`<[string, PositionUpdate]>`

Implementation of

VersionedPositionMap.[iterator]

Inherited from

Map.[iterator]


clear()

clear(): void

Defined in: packages/core/src/layers/RTLSLayer.ts:56

Removes all elements from the Map.

Returns

void

Implementation of

VersionedPositionMap.clear

Overrides

Map.clear


delete()

delete(key): boolean

Defined in: packages/core/src/layers/RTLSLayer.ts:50

Parameters

key

string

Returns

boolean

true if an element in the Map existed and has been removed, or false if the element does not exist.

Implementation of

VersionedPositionMap.delete

Overrides

Map.delete


entries()

entries(): MapIterator`<[string, PositionUpdate]>`

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts:146

Returns an iterable of key, value pairs for every entry in the map.

Returns

MapIterator`<[string, PositionUpdate]>`

Implementation of

VersionedPositionMap.entries

Inherited from

Map.entries


forEach()

forEach(callbackfn, thisArg?): void

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:29

Executes a provided function once per each key/value pair in the Map, in insertion order.

Parameters

callbackfn

(value, key, map) => void

thisArg?

any

Returns

void

Implementation of

VersionedPositionMap.forEach

Inherited from

Map.forEach


get()

get(key): PositionUpdate | undefined

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:34

Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

Parameters

key

string

Returns

PositionUpdate | undefined

Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

Implementation of

VersionedPositionMap.get

Inherited from

Map.get


has()

has(key): boolean

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:38

Parameters

key

string

Returns

boolean

boolean indicating whether an element with the specified key exists or not.

Implementation of

VersionedPositionMap.has

Inherited from

Map.has


keys()

keys(): MapIterator`<string>`

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts:151

Returns an iterable of keys in the map

Returns

MapIterator`<string>`

Implementation of

VersionedPositionMap.keys

Inherited from

Map.keys


set()

set(key, value): this

Defined in: packages/core/src/layers/RTLSLayer.ts:44

Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

Parameters

key

string

value

PositionUpdate

Returns

this

Implementation of

VersionedPositionMap.set

Overrides

Map.set


values()

values(): MapIterator`<PositionUpdate>`

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts:156

Returns an iterable of values in the map

Returns

MapIterator`<PositionUpdate>`

Implementation of

VersionedPositionMap.values

Inherited from

Map.values

Released under commercial licensing.