getSquareTextureSize
getSquareTextureSize(
capacity
,pixelsPerInstance
):number
Defined in: core/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
Section titled “Parameters”capacity
Section titled “capacity”number
The maximum number of instances allowed in the texture.
pixelsPerInstance
Section titled “pixelsPerInstance”number
The number of pixels required for each instance.
Returns
Section titled “Returns”number
The size of the square texture needed to store all the instances.