Capítulo 156 de 859
Class for loading geometries. The files are internally loaded via FileLoader.
const loader = new THREE.BufferGeometryLoader();
const geometry = await loader.loadAsync( 'models/json/pressure.json' );
const material = new THREE.MeshBasicMaterial( { color: 0xF5F5F5 } );
const object = new THREE.Mesh( geometry, material );
scene.add( object );
Constructor
| Signature |
|---|
new BufferGeometryLoader( manager : LoadingManager ) |
Methods
| Method | Description |
|---|---|
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) | Starts loading from the given URL and pass the loaded geometry to the onLoad() callback. |
.parse( json : Object ) : BufferGeometry | Parses the given JSON object and returns a geometry. |