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
| Parameter | Type |
|---|---|
resources | ResourceManager |
key | string |
createTemplate | () => BufferGeometry |
Returns
object
| Name | Type |
|---|---|
geometry | InstancedBufferGeometry |
release() | () => void |