Ir al contenido

PartPool

Defined in: spatial/PartPool.ts:11

A pool of reusable parts for off-screen rendering virtualization. When a part scrolls out of view, it’s returned to the pool so the object can be reused instead of allocating new instances.

new PartPool(maxPoolSize?): PartPool

Defined in: spatial/PartPool.ts:20

number = 1000

PartPool

get activeCount(): number

Defined in: spatial/PartPool.ts:141

Get the total number of active parts.

number


get activeGroupCount(): number

Defined in: spatial/PartPool.ts:50

Get the number of active (checked out) groups.

number


get activeLinkCount(): number

Defined in: spatial/PartPool.ts:45

Get the number of active (checked out) links.

number


get activeNodeCount(): number

Defined in: spatial/PartPool.ts:40

Get the number of active (checked out) nodes.

number


get availableGroupCount(): number

Defined in: spatial/PartPool.ts:35

Get the number of available (pooled) groups.

number


get availableLinkCount(): number

Defined in: spatial/PartPool.ts:30

Get the number of available (pooled) links.

number


get availableNodeCount(): number

Defined in: spatial/PartPool.ts:25

Get the number of available (pooled) nodes.

number


get pooledCount(): number

Defined in: spatial/PartPool.ts:136

Get the total number of pooled parts.

number

acquireGroup(key, bounds): Group

Defined in: spatial/PartPool.ts:84

Acquire a group. Returns a pooled group if available, otherwise a new one.

string | number

Rect

Group


acquireLink(key): Link

Defined in: spatial/PartPool.ts:71

Acquire a link. Returns a pooled link if available, otherwise a new one.

string | number

Link


acquireNode(key, bounds): Node

Defined in: spatial/PartPool.ts:57

Acquire a node. Returns a pooled node if available, otherwise a new one.

string | number

Rect

Node


clear(): void

Defined in: spatial/PartPool.ts:126

Clear all pooled parts.

void


releaseGroup(group): void

Defined in: spatial/PartPool.ts:116

Release a group back to the pool.

Group

void


releaseLink(link): void

Defined in: spatial/PartPool.ts:106

Release a link back to the pool.

Link

void


releaseNode(node): void

Defined in: spatial/PartPool.ts:96

Release a node back to the pool.

Node

void