Skip to content

FoliagePool beta ​

Class of @v12-engine/client

ts
export declare class FoliagePool

The typed arrays a layer's chunks write their copies into, given back as a chunk is laid again or let go of and taken by the next: a whole map laid again makes no garbage. By the number of floats, in the sizes of pooledCount

Members ​

clear ​

ts
clear(): void;

Everything it holds let go of

give ​

ts
give(array: Float32Array | undefined): void;

An array taken from it, given back: none for nothing

held ​

ts
get held(): number;

Floats it holds, unused

take ​

ts
take(count: number, stride: number): Float32Array;

An array of room for count copies of stride floats each, at least: its own length, the pool's size