Skip to content

getSquareTextureSize

getSquareTextureSize(capacity, pixelsPerInstance): number

Defined in: core/utils/SquareDataTexture.ts:47

Calculates the square texture size based on the capacity and pixels per instance. This ensures the texture is large enough to store all instances in a square layout.

Parameters

capacity

number

The maximum number of instances allowed in the texture.

pixelsPerInstance

number

The number of pixels required for each instance.

Returns

number

The size of the square texture needed to store all the instances.