Skip to content

Function: acquireInstancedGeometry() ​

ts
function acquireInstancedGeometry(resources, key, createTemplate): object;

Experimental

Per-primitive instanced geometry that shares its per-vertex template (e.g. a unit quad) through the ResourceManager.

Why the dance in release: three.js deletes the GPU buffers of every attribute of a geometry when that geometry is disposed. Shared template attributes are therefore detached before disposing the per-primitive geometry — except when this is the template's last user, in which case they are left attached so their GPU buffers are freed too.

Parameters ​

ParameterType
resourcesResourceManager
keystring
createTemplate() => BufferGeometry

Returns ​

object

NameType
geometryInstancedBufferGeometry
release()() => void

Released under the MIT License.