Capítulo 213 de 859
A loader for the VTK format.
This loader only supports the POLYDATA dataset format so far. Other formats (structured points, structured grid, rectilinear grid, unstructured grid, appended) are not supported.
const loader = new VTKLoader();
const geometry = await loader.loadAsync( 'models/vtk/liver.vtk' );
geometry.computeVertexNormals();
const mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial() );
scene.add( mesh );
Constructor
| Signature |
|---|
new VTKLoader( manager : LoadingManager ) |
Methods
| Method | Description |
|---|---|
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) | Starts loading from the given URL and passes the loaded VTK asset to the onLoad() callback. |
.parse( data : ArrayBuffer ) : BufferGeometry | Parses the given VTK data and returns the resulting geometry. |