Skip to content

Commit 56be253

Browse files
authored
VTKLoader: Deprecated loader. (#33363)
1 parent 6105683 commit 56be253

12 files changed

Lines changed: 5 additions & 81852 deletions

File tree

editor/js/Loader.js

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -800,32 +800,6 @@ function Loader( editor ) {
800800

801801
}
802802

803-
case 'vtk':
804-
case 'vtp':
805-
806-
{
807-
808-
reader.addEventListener( 'load', async function ( event ) {
809-
810-
const contents = event.target.result;
811-
812-
const { VTKLoader } = await import( 'three/addons/loaders/VTKLoader.js' );
813-
814-
const geometry = new VTKLoader().parse( contents );
815-
const material = new THREE.MeshStandardMaterial();
816-
817-
const mesh = new THREE.Mesh( geometry, material );
818-
mesh.name = filename;
819-
820-
editor.execute( new AddObjectCommand( editor, mesh ) );
821-
822-
}, false );
823-
reader.readAsArrayBuffer( file );
824-
825-
break;
826-
827-
}
828-
829803
case 'wrl':
830804

831805
{

examples/files.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
"webgl_loader_usdz",
123123
"webgl_loader_vox",
124124
"webgl_loader_vrml",
125-
"webgl_loader_vtk",
126125
"webgl_loader_xyz",
127126
"webgl_lod",
128127
"webgl_marchingcubes",

examples/jsm/loaders/VTKLoader.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,26 @@ import { unzlibSync } from '../libs/fflate.module.js';
2727
*
2828
* @augments Loader
2929
* @three_import import { VTKLoader } from 'three/addons/loaders/VTKLoader.js';
30+
* @deprecated since r184.
3031
*/
3132
class VTKLoader extends Loader {
3233

3334
/**
3435
* Constructs a new VTK loader.
3536
*
3637
* @param {LoadingManager} [manager] - The loading manager.
38+
* @deprecated since r184.
3739
*/
3840
constructor( manager ) {
3941

4042
super( manager );
4143

44+
console.warn( 'THREE.VTKLoader: The loader has been deprecated and will be removed with r194. Export your VTK files to glTF before using them on the web.' ); // @deprecated, r184
45+
4246
}
4347

4448
/**
45-
* Starts loading from the given URL and passes the loaded VRML asset
49+
* Starts loading from the given URL and passes the loaded VTK asset
4650
* to the `onLoad()` callback.
4751
*
4852
* @param {string} url - The path/URL of the file to be loaded. This can also be a data URI.

examples/models/vtk/bunny.vtk

Lines changed: 0 additions & 81443 deletions
This file was deleted.

examples/models/vtk/cube_ascii.vtp

Lines changed: 0 additions & 80 deletions
This file was deleted.

examples/models/vtk/cube_binary.vtp

Lines changed: 0 additions & 54 deletions
This file was deleted.

examples/models/vtk/cube_no_compression.vtp

Lines changed: 0 additions & 54 deletions
This file was deleted.

examples/models/vtk/liver.vtk

-1.18 MB
Binary file not shown.
-19.8 KB
Loading
-8 KB
Binary file not shown.

0 commit comments

Comments
 (0)