Capítulo 592 de 859
This class can be used to optimized scenes by converting individual meshes into BatchedMesh. This component is an experimental attempt to implement auto-batching in three.js.
import { SceneOptimizer } from 'three/addons/utils/SceneOptimizer.js';
Constructor
| Signature |
|---|
new SceneOptimizer( scene : Scene, options : SceneOptimizer~Options ) |
Methods
| Method | Description |
|---|---|
.disposeMeshes( meshesToRemove : Set.<Mesh> ) | Removes the given array of meshes from the scene. |
.removeEmptyNodes( object : Object3D ) | Removes empty nodes from all descendants of the given 3D object. |
.toBatchedMesh() : Scene | Performs the auto-baching by identifying groups of meshes in the scene that can be represented as a single BatchedMesh. The method modifies the scene by adding instances of `Batch… |
.toInstancingMesh() : Scene (abstract) | Performs the auto-instancing by identifying groups of meshes in the scene that can be represented as a single InstancedMesh. The method modifies the scene by adding instances of… |