export default InstancingManager; /** * An InstancingManager handles aggregating all Instanceable3DFacade descendants into * instancing batches. For each batch it creates a clone of the instancedThreeObject, * populates a pooled InstancedBufferGeometry with buffer attributes holding the world * matrices of all the batch's instances, and temporarily inserts that into the * scene to be rendered. * * As an additional "turbo" optimization, the instancing batch objects/geometries will be * reused untouched between rendering frames if none of the managed Instanceable3DFacade * objects have changed in a way that would affect the batches or world matrix attributes. * * There is a global InstancingManager automatically added to the main scene, and it does * nothing if there are no Instanceable3DFacades in the scene, so in most cases you should * not need to touch this yourself. But it is also possible to insert additional * InstancingManager facades further down in the scene if you wish to control the scope * of instancing, e.g. to increase the likelihood of the aforementioned "turbo" optimization * kicking in. * * Also see InstancingShaderUpgrades, which modifies material shaders so they accept the matrix * and custom uniform values coming in as attributes. This allows built-in materials as well * as custom shaders to work with instancing without manual modification. */ declare class InstancingManager extends Group3DFacade { constructor(parent: any); _instanceables: any; _batchGeometryPool: BatchGeometryPool; _needsRebatch: boolean; onNotifyWorld(source: any, message: any, data: any): void; _setupBatchObjects(renderer: any, scene: any, camera: any): void; _batchObjectsByKey: any; _onInstanceAdded(facade: any): void; _onInstanceRemoved(facade: any): void; _onInstanceChanged(facade: any): void; _onInstanceMatrixChanged(facade: any): void; _onInstanceUniformChanged(facade: any, uniformName: any): void; _getBatchKey(object: any): any; _batchKeysCache: any; _getInstanceUniformNames(object: any): any; _uniformNamesCache: Map; _getInstanceUniformSizes(material: any, uniformNames: any): any; _uniformSizesCache: Map; _getBatchObject(instancedObject: any): any; _teardownBatchObjects(renderer: any, scene: any, camera: any): void; } import Group3DFacade from '../Group3DFacade.js'; /** * Pool for the instancing batch geometries */ declare class BatchGeometryPool { _poolsByKey: any; borrow(key: any, baseGeometry: any, instanceUniformSizes: any): any; releaseAll(): void; disposeUnused(): void; }