Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

useSkinnedBatch

useSkinnedBatch<Uniforms>(source, useSkinnedBatchOptions?): SkinnedBatch<Uniforms>

The scene’s batch of copies of source, a loaded model’s scene: add each copy with addCopy and take it out with the copy’s remove, and every copy of one mesh draws in one draw. The batch stays in the scene while a view holds it or it draws a copy. Under a WebGPURenderer the batch has no part: each copy draws its own meshes, and the console says the batch is off.

Type Parameter Default type
Uniforms extends SkinnedBatchUniforms SkinnedBatchUniforms
Parameter Type
source Object3D
useSkinnedBatchOptions UseSkinnedBatchOptions<Uniforms>

SkinnedBatch<Uniforms>