Skip to content

Interface: ResourceManager ​

Experimental

Reference-counted registry for GPU resources shared across primitives and charts (unit quads, colorscale LUT textures, glyph atlases, material variants).

Methods ​

acquire() ​

ts
acquire<T>(key, create): T;

Experimental

Get the resource for key, creating it with create on first use. Increments the refcount.

Type Parameters ​

Type Parameter
T extends | Texture<unknown, TextureEventMap> | BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap> | Material<MaterialEventMap>

Parameters ​

ParameterType
keystring
create() => T

Returns ​

T


disposeAll() ​

ts
disposeAll(): void;

Experimental

Dispose everything regardless of refcount (used on chart destroy / context loss).

Returns ​

void


release() ​

ts
release(key): void;

Experimental

Decrement the refcount for key; the resource is disposed when it reaches zero.

Parameters ​

ParameterType
keystring

Returns ​

void


stats() ​

ts
stats(): ResourceStat[];

Experimental

Live resources, for debug panels and leak tests.

Returns ​

ResourceStat[]

Released under the MIT License.