@kitware/vtk.js 22.6.1 → 23.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Common/Core/CellArray.d.ts +2 -2
- package/Common/Core/DataArray.d.ts +2 -2
- package/Common/Core/Endian.d.ts +3 -1
- package/Common/Core/ImageHelper.d.ts +1 -1
- package/Common/Core/LookupTable.d.ts +2 -2
- package/Common/Core/Math.d.ts +1 -1
- package/Common/Core/MatrixBuilder.d.ts +1 -1
- package/Common/Core/Points.d.ts +2 -2
- package/Common/Core/PriorityQueue.d.ts +1 -1
- package/Common/Core/ProgressHandler.d.ts +1 -1
- package/Common/Core/ScalarsToColors.d.ts +3 -3
- package/Common/Core/StringArray.d.ts +1 -1
- package/Common/Core/VariantArray.d.ts +1 -1
- package/Common/DataModel/Box.d.ts +2 -2
- package/Common/DataModel/CardinalSpline1D.d.ts +2 -2
- package/Common/DataModel/Cell.d.ts +3 -3
- package/Common/DataModel/Cone.d.ts +2 -2
- package/Common/DataModel/Cylinder.d.ts +2 -2
- package/Common/DataModel/DataSet.d.ts +2 -2
- package/Common/DataModel/DataSetAttributes/FieldData.d.ts +1 -1
- package/Common/DataModel/DataSetAttributes.d.ts +3 -3
- package/Common/DataModel/ITKHelper.js +16 -20
- package/Common/DataModel/ImageData.d.ts +36 -36
- package/Common/DataModel/KochanekSpline1D.d.ts +1 -1
- package/Common/DataModel/Line.d.ts +2 -2
- package/Common/DataModel/PiecewiseFunction.d.ts +2 -2
- package/Common/DataModel/Plane.d.ts +2 -2
- package/Common/DataModel/PointSet.d.ts +3 -3
- package/Common/DataModel/PolyData.d.ts +3 -3
- package/Common/DataModel/Polygon.d.ts +2 -2
- package/Common/DataModel/SelectionNode.d.ts +2 -2
- package/Common/DataModel/Sphere.d.ts +2 -2
- package/Common/DataModel/Spline1D.d.ts +1 -1
- package/Common/DataModel/Spline3D.d.ts +1 -1
- package/Common/DataModel/Triangle.d.ts +2 -2
- package/Common/Transform/LandmarkTransform.d.ts +2 -2
- package/Filters/General/AppendPolyData.d.ts +1 -1
- package/Filters/General/ImageCropFilter.d.ts +1 -1
- package/Filters/General/ImageOutlineFilter.d.ts +1 -1
- package/Filters/General/ImageSliceFilter.d.ts +2 -2
- package/Filters/General/ImageStreamline.d.ts +135 -0
- package/Filters/General/LineFilter.d.ts +1 -1
- package/Filters/General/OutlineFilter.d.ts +1 -1
- package/Filters/General/TriangleFilter.d.ts +1 -1
- package/Filters/General/TubeFilter.d.ts +2 -2
- package/Filters/Sources/Arrow2DSource.d.ts +2 -2
- package/Filters/Sources/ArrowSource.d.ts +2 -2
- package/Filters/Sources/CircleSource.d.ts +2 -2
- package/Filters/Sources/ConeSource.d.ts +2 -2
- package/Filters/Sources/CubeSource.d.ts +2 -2
- package/Filters/Sources/Cursor3D.d.ts +3 -3
- package/Filters/Sources/CylinderSource.d.ts +2 -2
- package/Filters/Sources/LineSource.d.ts +2 -2
- package/Filters/Sources/PlaneSource.d.ts +2 -2
- package/Filters/Sources/PointSource.d.ts +2 -2
- package/Filters/Sources/SphereSource.d.ts +2 -2
- package/Filters/Texture/TextureMapToPlane.d.ts +1 -1
- package/Filters/Texture/TextureMapToSphere.d.ts +1 -1
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.d.ts +9 -0
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.d.ts +9 -0
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.d.ts +13 -0
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.d.ts +9 -0
- package/IO/Core/DataAccessHelper.d.ts +32 -0
- package/IO/Core/HttpDataSetReader.d.ts +226 -0
- package/IO/Core/HttpSceneLoader.d.ts +5 -5
- package/IO/Core/ImageStream/DefaultProtocol.d.ts +1 -1
- package/IO/Core/ImageStream/ViewStream.d.ts +4 -4
- package/IO/Core/ImageStream.d.ts +3 -3
- package/IO/Core/WSLinkClient.d.ts +1 -1
- package/IO/Geometry/DracoReader.d.ts +13 -9
- package/IO/Geometry/PLYReader.d.ts +13 -9
- package/IO/Geometry/PLYWriter.d.ts +2 -2
- package/IO/Geometry/STLReader.d.ts +14 -9
- package/IO/Geometry/STLWriter.d.ts +2 -2
- package/IO/Misc/ElevationReader.d.ts +11 -6
- package/IO/Misc/ITKImageReader.d.ts +1 -1
- package/IO/Misc/ITKPolyDataReader.d.ts +1 -1
- package/IO/Misc/JSONNucleoReader.d.ts +13 -9
- package/IO/Misc/JSONReader.d.ts +4 -4
- package/IO/Misc/MTLReader.d.ts +11 -7
- package/IO/Misc/OBJReader.d.ts +10 -6
- package/IO/Misc/PDBReader.d.ts +10 -6
- package/IO/XML/XMLImageDataReader.d.ts +1 -1
- package/IO/XML/XMLPolyDataReader.d.ts +1 -1
- package/IO/XML/XMLReader.d.ts +20 -16
- package/Interaction/Manipulators/MouseRangeManipulator.js +55 -1
- package/Interaction/Widgets/OrientationMarkerWidget.d.ts +22 -8
- package/Interaction/Widgets/OrientationMarkerWidget.js +62 -37
- package/Rendering/Core/AbstractMapper.d.ts +2 -2
- package/Rendering/Core/AbstractMapper3D.d.ts +2 -2
- package/Rendering/Core/AbstractPicker.d.ts +4 -4
- package/Rendering/Core/Actor.d.ts +21 -18
- package/Rendering/Core/Actor2D.d.ts +5 -5
- package/Rendering/Core/AnnotatedCubeActor.d.ts +1 -1
- package/Rendering/Core/AxesActor.d.ts +1 -1
- package/Rendering/Core/Camera.d.ts +2 -2
- package/Rendering/Core/CellPicker.d.ts +5 -5
- package/Rendering/Core/ColorTransferFunction.d.ts +1 -1
- package/Rendering/Core/Coordinate.d.ts +2 -2
- package/Rendering/Core/Follower.d.ts +2 -2
- package/Rendering/Core/Glyph3DMapper.d.ts +2 -2
- package/Rendering/Core/ImageMapper.d.ts +3 -3
- package/Rendering/Core/ImageProperty.d.ts +11 -2
- package/Rendering/Core/ImageProperty.js +3 -2
- package/Rendering/Core/ImageSlice.d.ts +4 -4
- package/Rendering/Core/Light.d.ts +2 -2
- package/Rendering/Core/Mapper.d.ts +5 -5
- package/Rendering/Core/Mapper2D.d.ts +4 -3
- package/Rendering/Core/Picker.d.ts +5 -5
- package/Rendering/Core/PixelSpaceCallbackMapper.d.ts +2 -2
- package/Rendering/Core/PointPicker.d.ts +3 -3
- package/Rendering/Core/Prop.d.ts +5 -5
- package/Rendering/Core/Prop3D.d.ts +2 -2
- package/Rendering/Core/Property.d.ts +2 -2
- package/Rendering/Core/Property2D.d.ts +2 -2
- package/Rendering/Core/RenderWindow.d.ts +4 -4
- package/Rendering/Core/RenderWindowInteractor.d.ts +2 -2
- package/Rendering/Core/Renderer.d.ts +17 -16
- package/Rendering/Core/ScalarBarActor.d.ts +3 -3
- package/Rendering/Core/Skybox.d.ts +1 -1
- package/Rendering/Core/SphereMapper.d.ts +1 -1
- package/Rendering/Core/StickMapper.d.ts +1 -1
- package/Rendering/Core/Texture.d.ts +1 -1
- package/Rendering/Core/Viewport.d.ts +4 -4
- package/Rendering/Core/Volume.d.ts +4 -4
- package/Rendering/Core/VolumeMapper.d.ts +2 -2
- package/Rendering/Core/VolumeProperty.d.ts +1 -1
- package/Rendering/Misc/CanvasView.d.ts +2 -2
- package/Rendering/Misc/FullScreenRenderWindow.d.ts +8 -8
- package/Rendering/Misc/GenericRenderWindow.d.ts +6 -6
- package/Rendering/Misc/RemoteView.d.ts +3 -3
- package/Rendering/Misc/RenderWindowWithControlBar.d.ts +2 -2
- package/Rendering/Misc/SynchronizableRenderWindow.d.ts +4 -3
- package/Rendering/Misc/TextureLODsDownloader.d.ts +4 -4
- package/Rendering/OpenGL/ImageMapper.js +1 -1
- package/Rendering/OpenGL/RenderWindow.d.ts +18 -18
- package/Rendering/OpenGL/VolumeMapper.js +16 -1
- package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
- package/Rendering/SceneGraph/RenderPass.d.ts +2 -2
- package/Rendering/SceneGraph/ViewNode.d.ts +2 -2
- package/Rendering/SceneGraph/ViewNodeFactory.d.ts +1 -1
- package/Rendering/WebGPU/HardwareSelectionPass.js +0 -1
- package/Rendering/WebGPU/ImageMapper.js +1 -1
- package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -3
- package/Rendering/WebGPU/RenderEncoder.js +1 -4
- package/Widgets/Core/AbstractWidgetFactory.js +5 -3
- package/Widgets/Manipulators/LineManipulator.d.ts +1 -1
- package/Widgets/Manipulators/PlaneManipulator.d.ts +1 -1
- package/Widgets/Manipulators/TrackballManipulator.d.ts +1 -1
- package/Widgets/Representations/ResliceCursorContextRepresentation.d.ts +1 -1
- package/Widgets/Representations/WidgetRepresentation.d.ts +1 -1
- package/index.d.ts +7 -0
- package/interfaces.d.ts +4 -4
- package/macros.d.ts +1 -1
- package/package.json +1 -1
- package/types.d.ts +22 -1
- package/vtk.d.ts +7 -2
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
2
|
+
import HtmlDataAccessHelper from '../Core/DataAccessHelper/HtmlDataAccessHelper';
|
|
3
|
+
import HttpDataAccessHelper from '../Core/DataAccessHelper/HttpDataAccessHelper';
|
|
4
|
+
import JSZipDataAccessHelper from '../Core/DataAccessHelper/JSZipDataAccessHelper';
|
|
5
|
+
import LiteHttpDataAccessHelper from '../Core/DataAccessHelper/LiteHttpDataAccessHelper';
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
interface IDracoReaderOptions {
|
|
@@ -30,7 +34,7 @@ export interface vtkDracoReader extends vtkDracoReaderBase {
|
|
|
30
34
|
/**
|
|
31
35
|
*
|
|
32
36
|
*/
|
|
33
|
-
getDataAccessHelper():
|
|
37
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
34
38
|
|
|
35
39
|
/**
|
|
36
40
|
* Get the url of the object to load.
|
|
@@ -68,17 +72,17 @@ export interface vtkDracoReader extends vtkDracoReaderBase {
|
|
|
68
72
|
requestData(inData: any, outData: any): void;
|
|
69
73
|
|
|
70
74
|
/**
|
|
71
|
-
*
|
|
72
|
-
* @param
|
|
73
|
-
* @param {IDracoReaderOptions} [option] The Draco reader options.
|
|
75
|
+
*
|
|
76
|
+
* @param dataAccessHelper
|
|
74
77
|
*/
|
|
75
|
-
|
|
78
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
76
79
|
|
|
77
80
|
/**
|
|
78
|
-
*
|
|
79
|
-
* @param
|
|
81
|
+
* Set the url of the object to load.
|
|
82
|
+
* @param {String} url the url of the object to load.
|
|
83
|
+
* @param {IDracoReaderOptions} [option] The Draco reader options.
|
|
80
84
|
*/
|
|
81
|
-
|
|
85
|
+
setUrl(url: string, option?: IDracoReaderOptions): Promise<string | any>;
|
|
82
86
|
}
|
|
83
87
|
|
|
84
88
|
/**
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
2
|
+
import HtmlDataAccessHelper from '../Core/DataAccessHelper/HtmlDataAccessHelper';
|
|
3
|
+
import HttpDataAccessHelper from '../Core/DataAccessHelper/HttpDataAccessHelper';
|
|
4
|
+
import JSZipDataAccessHelper from '../Core/DataAccessHelper/JSZipDataAccessHelper';
|
|
5
|
+
import LiteHttpDataAccessHelper from '../Core/DataAccessHelper/LiteHttpDataAccessHelper';
|
|
2
6
|
|
|
3
7
|
interface IPLYReaderOptions {
|
|
4
8
|
binary?: boolean;
|
|
@@ -29,7 +33,7 @@ export interface vtkPLYReader extends vtkPLYReaderBase {
|
|
|
29
33
|
/**
|
|
30
34
|
*
|
|
31
35
|
*/
|
|
32
|
-
getDataAccessHelper():
|
|
36
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
33
37
|
|
|
34
38
|
/**
|
|
35
39
|
* Get the url of the object to load.
|
|
@@ -67,17 +71,17 @@ export interface vtkPLYReader extends vtkPLYReaderBase {
|
|
|
67
71
|
requestData(inData: any, outData: any): void;
|
|
68
72
|
|
|
69
73
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @param
|
|
72
|
-
* @param {IPLYReaderOptions} [option] The PLY reader options.
|
|
74
|
+
*
|
|
75
|
+
* @param dataAccessHelper
|
|
73
76
|
*/
|
|
74
|
-
|
|
77
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
75
78
|
|
|
76
79
|
/**
|
|
77
|
-
*
|
|
78
|
-
* @param
|
|
80
|
+
* Set the url of the object to load.
|
|
81
|
+
* @param {String} url the url of the object to load.
|
|
82
|
+
* @param {IPLYReaderOptions} [option] The PLY reader options.
|
|
79
83
|
*/
|
|
80
|
-
|
|
84
|
+
setUrl(url: string, option?: IPLYReaderOptions): Promise<string | any>;
|
|
81
85
|
}
|
|
82
86
|
|
|
83
87
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mat4 } from "gl-matrix";
|
|
2
|
-
import vtkPolyData from '
|
|
3
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
2
|
+
import vtkPolyData from '../../Common/DataModel/PolyData';
|
|
3
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
4
4
|
|
|
5
5
|
export enum FormatTypes {
|
|
6
6
|
ASCII,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
2
|
+
import HtmlDataAccessHelper from '../Core/DataAccessHelper/HtmlDataAccessHelper';
|
|
3
|
+
import HttpDataAccessHelper from '../Core/DataAccessHelper/HttpDataAccessHelper';
|
|
4
|
+
import JSZipDataAccessHelper from '../Core/DataAccessHelper/JSZipDataAccessHelper';
|
|
5
|
+
import LiteHttpDataAccessHelper from '../Core/DataAccessHelper/LiteHttpDataAccessHelper';
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
interface ISTLReaderOptions {
|
|
@@ -30,7 +34,7 @@ export interface vtkSTLReader extends vtkSTLReaderBase {
|
|
|
30
34
|
/**
|
|
31
35
|
*
|
|
32
36
|
*/
|
|
33
|
-
getDataAccessHelper():
|
|
37
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
34
38
|
|
|
35
39
|
/**
|
|
36
40
|
* Get the url of the object to load.
|
|
@@ -68,17 +72,18 @@ export interface vtkSTLReader extends vtkSTLReaderBase {
|
|
|
68
72
|
requestData(inData: any, outData: any): void;
|
|
69
73
|
|
|
70
74
|
/**
|
|
71
|
-
*
|
|
72
|
-
* @param
|
|
73
|
-
* @param {ISTLReaderOptions} [option] The STL reader options.
|
|
75
|
+
*
|
|
76
|
+
* @param dataAccessHelper
|
|
74
77
|
*/
|
|
75
|
-
|
|
78
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
79
|
+
|
|
76
80
|
|
|
77
81
|
/**
|
|
78
|
-
*
|
|
79
|
-
* @param
|
|
82
|
+
* Set the url of the object to load.
|
|
83
|
+
* @param {String} url the url of the object to load.
|
|
84
|
+
* @param {ISTLReaderOptions} [option] The STL reader options.
|
|
80
85
|
*/
|
|
81
|
-
|
|
86
|
+
setUrl(url: string, option?: ISTLReaderOptions): Promise<string | any>;
|
|
82
87
|
}
|
|
83
88
|
|
|
84
89
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mat4 } from "gl-matrix";
|
|
2
|
-
import vtkPolyData from '
|
|
3
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
2
|
+
import vtkPolyData from '../../Common/DataModel/PolyData';
|
|
3
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
4
4
|
|
|
5
5
|
export enum FormatTypes {
|
|
6
6
|
ASCII,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject, vtkSubscription } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject, vtkSubscription } from '../../interfaces';
|
|
2
|
+
import HtmlDataAccessHelper from '../Core/DataAccessHelper/HtmlDataAccessHelper';
|
|
3
|
+
import HttpDataAccessHelper from '../Core/DataAccessHelper/HttpDataAccessHelper';
|
|
4
|
+
import JSZipDataAccessHelper from '../Core/DataAccessHelper/JSZipDataAccessHelper';
|
|
5
|
+
import LiteHttpDataAccessHelper from '../Core/DataAccessHelper/LiteHttpDataAccessHelper';
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
interface IElevationReaderOptions {
|
|
@@ -33,7 +37,7 @@ export interface vtkElevationReader extends vtkElevationReaderBase {
|
|
|
33
37
|
/**
|
|
34
38
|
*
|
|
35
39
|
*/
|
|
36
|
-
getDataAccessHelper():
|
|
40
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
37
41
|
|
|
38
42
|
/**
|
|
39
43
|
* Get the url of the object to load.
|
|
@@ -84,15 +88,16 @@ export interface vtkElevationReader extends vtkElevationReaderBase {
|
|
|
84
88
|
|
|
85
89
|
/**
|
|
86
90
|
*
|
|
87
|
-
* @param
|
|
91
|
+
* @param callback
|
|
88
92
|
*/
|
|
89
|
-
onBusy(busy: boolean): vtkSubscription;
|
|
93
|
+
onBusy(callback: (busy: boolean) => any): vtkSubscription;
|
|
90
94
|
|
|
91
95
|
/**
|
|
92
96
|
* Parse data as text.
|
|
93
97
|
* @param {String} content The content to parse.
|
|
94
98
|
*/
|
|
95
99
|
parseAsText(content: string): void;
|
|
100
|
+
|
|
96
101
|
/**
|
|
97
102
|
*
|
|
98
103
|
* @param inData
|
|
@@ -104,14 +109,14 @@ export interface vtkElevationReader extends vtkElevationReaderBase {
|
|
|
104
109
|
*
|
|
105
110
|
* @param dataAccessHelper
|
|
106
111
|
*/
|
|
107
|
-
setDataAccessHelper(dataAccessHelper:
|
|
112
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
108
113
|
|
|
109
114
|
/**
|
|
110
115
|
* Set the url of the object to load.
|
|
111
116
|
* @param {String} url the url of the object to load.
|
|
112
117
|
* @param {IElevationReaderOptions} [option] The Elevation reader options.
|
|
113
118
|
*/
|
|
114
|
-
setUrl(url: string, option?: IElevationReaderOptions):
|
|
119
|
+
setUrl(url: string, option?: IElevationReaderOptions): Promise<any>;
|
|
115
120
|
|
|
116
121
|
/**
|
|
117
122
|
*
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
2
|
+
import HtmlDataAccessHelper from '../Core/DataAccessHelper/HtmlDataAccessHelper';
|
|
3
|
+
import HttpDataAccessHelper from '../Core/DataAccessHelper/HttpDataAccessHelper';
|
|
4
|
+
import JSZipDataAccessHelper from '../Core/DataAccessHelper/JSZipDataAccessHelper';
|
|
5
|
+
import LiteHttpDataAccessHelper from '../Core/DataAccessHelper/LiteHttpDataAccessHelper';
|
|
2
6
|
|
|
3
7
|
interface IJSONNucleoReaderOptions {
|
|
4
8
|
binary?: boolean;
|
|
@@ -29,7 +33,7 @@ export interface vtkJSONNucleoReader extends vtkJSONNucleoReaderBase {
|
|
|
29
33
|
/**
|
|
30
34
|
*
|
|
31
35
|
*/
|
|
32
|
-
getDataAccessHelper():
|
|
36
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
33
37
|
|
|
34
38
|
/**
|
|
35
39
|
* Get the url of the object to load.
|
|
@@ -55,17 +59,17 @@ export interface vtkJSONNucleoReader extends vtkJSONNucleoReaderBase {
|
|
|
55
59
|
requestData(inData: any, outData: any): void;
|
|
56
60
|
|
|
57
61
|
/**
|
|
58
|
-
*
|
|
59
|
-
* @param
|
|
60
|
-
* @param {IJSONNucleoReaderOptions} [option] The JSONNucleo reader options.
|
|
62
|
+
*
|
|
63
|
+
* @param dataAccessHelper
|
|
61
64
|
*/
|
|
62
|
-
|
|
65
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
63
66
|
|
|
64
67
|
/**
|
|
65
|
-
*
|
|
66
|
-
* @param
|
|
68
|
+
* Set the url of the object to load.
|
|
69
|
+
* @param {String} url the url of the object to load.
|
|
70
|
+
* @param {IJSONNucleoReaderOptions} [option] The JSONNucleo reader options.
|
|
67
71
|
*/
|
|
68
|
-
|
|
72
|
+
setUrl(url: string, option: IJSONNucleoReaderOptions): Promise<string>;
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
/**
|
package/IO/Misc/JSONReader.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject, vtkSubscription } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject, vtkSubscription } from '../../interfaces';
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
interface IJSONReaderOptions {
|
|
@@ -51,9 +51,9 @@ export interface vtkJSONReader extends vtkJSONReaderBase {
|
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
|
-
* @param
|
|
54
|
+
* @param callback
|
|
55
55
|
*/
|
|
56
|
-
onBusy(busy: boolean): vtkSubscription;
|
|
56
|
+
onBusy(callback: (busy: boolean) => any): vtkSubscription;
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Parse data as text.
|
|
@@ -72,7 +72,7 @@ export interface vtkJSONReader extends vtkJSONReaderBase {
|
|
|
72
72
|
* @param {String} url the url of the object to load.
|
|
73
73
|
* @param {IJSONReaderOptions} [option] The JSON reader options.
|
|
74
74
|
*/
|
|
75
|
-
setUrl(url: string, option?: IJSONReaderOptions):
|
|
75
|
+
setUrl(url: string, option?: IJSONReaderOptions): Promise<string>;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
package/IO/Misc/MTLReader.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { vtkObject, vtkSubscription } from '
|
|
1
|
+
import { vtkObject, vtkSubscription } from '../../interfaces';
|
|
2
2
|
|
|
3
|
-
import vtkActor from '
|
|
3
|
+
import vtkActor from '../../Rendering/Core/Actor';
|
|
4
|
+
import HtmlDataAccessHelper from '../Core/DataAccessHelper/HtmlDataAccessHelper';
|
|
5
|
+
import HttpDataAccessHelper from '../Core/DataAccessHelper/HttpDataAccessHelper';
|
|
6
|
+
import JSZipDataAccessHelper from '../Core/DataAccessHelper/JSZipDataAccessHelper';
|
|
7
|
+
import LiteHttpDataAccessHelper from '../Core/DataAccessHelper/LiteHttpDataAccessHelper';
|
|
4
8
|
|
|
5
9
|
|
|
6
10
|
interface IMTLReaderOptions {
|
|
@@ -36,7 +40,7 @@ export interface vtkMTLReader extends vtkObject {
|
|
|
36
40
|
/**
|
|
37
41
|
*
|
|
38
42
|
*/
|
|
39
|
-
getDataAccessHelper():
|
|
43
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
40
44
|
|
|
41
45
|
/**
|
|
42
46
|
*
|
|
@@ -88,9 +92,9 @@ export interface vtkMTLReader extends vtkObject {
|
|
|
88
92
|
|
|
89
93
|
/**
|
|
90
94
|
*
|
|
91
|
-
* @param
|
|
95
|
+
* @param callback
|
|
92
96
|
*/
|
|
93
|
-
onBusy(busy: boolean): vtkSubscription;
|
|
97
|
+
onBusy(callback: (busy: boolean) => any): vtkSubscription;
|
|
94
98
|
|
|
95
99
|
/**
|
|
96
100
|
* Parse data as text.
|
|
@@ -108,7 +112,7 @@ export interface vtkMTLReader extends vtkObject {
|
|
|
108
112
|
*
|
|
109
113
|
* @param dataAccessHelper
|
|
110
114
|
*/
|
|
111
|
-
setDataAccessHelper(dataAccessHelper:
|
|
115
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
112
116
|
|
|
113
117
|
/**
|
|
114
118
|
*
|
|
@@ -134,7 +138,7 @@ export interface vtkMTLReader extends vtkObject {
|
|
|
134
138
|
* @param {String} url the url of the object to load.
|
|
135
139
|
* @param {IMTLReaderOptions} [option] The MTL reader options.
|
|
136
140
|
*/
|
|
137
|
-
setUrl(url: string, option?: IMTLReaderOptions):
|
|
141
|
+
setUrl(url: string, option?: IMTLReaderOptions): Promise<string>;
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
/**
|
package/IO/Misc/OBJReader.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject, vtkSubscription } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject, vtkSubscription } from '../../interfaces';
|
|
2
|
+
import HtmlDataAccessHelper from '../Core/DataAccessHelper/HtmlDataAccessHelper';
|
|
3
|
+
import HttpDataAccessHelper from '../Core/DataAccessHelper/HttpDataAccessHelper';
|
|
4
|
+
import JSZipDataAccessHelper from '../Core/DataAccessHelper/JSZipDataAccessHelper';
|
|
5
|
+
import LiteHttpDataAccessHelper from '../Core/DataAccessHelper/LiteHttpDataAccessHelper';
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
interface IOBJReaderOptions {
|
|
@@ -34,7 +38,7 @@ export interface vtkOBJReader extends vtkOBJReaderBase {
|
|
|
34
38
|
/**
|
|
35
39
|
*
|
|
36
40
|
*/
|
|
37
|
-
getDataAccessHelper():
|
|
41
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
38
42
|
|
|
39
43
|
/**
|
|
40
44
|
* Get the url of the object to load.
|
|
@@ -65,9 +69,9 @@ export interface vtkOBJReader extends vtkOBJReaderBase {
|
|
|
65
69
|
|
|
66
70
|
/**
|
|
67
71
|
*
|
|
68
|
-
* @param
|
|
72
|
+
* @param callback
|
|
69
73
|
*/
|
|
70
|
-
onBusy(busy: boolean): vtkSubscription;
|
|
74
|
+
onBusy(callback: (busy: boolean) => any): vtkSubscription;
|
|
71
75
|
|
|
72
76
|
/**
|
|
73
77
|
* Parse data as text.
|
|
@@ -86,7 +90,7 @@ export interface vtkOBJReader extends vtkOBJReaderBase {
|
|
|
86
90
|
*
|
|
87
91
|
* @param dataAccessHelper
|
|
88
92
|
*/
|
|
89
|
-
setDataAccessHelper(dataAccessHelper:
|
|
93
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
90
94
|
|
|
91
95
|
/**
|
|
92
96
|
*
|
|
@@ -99,7 +103,7 @@ export interface vtkOBJReader extends vtkOBJReaderBase {
|
|
|
99
103
|
* @param {String} url the url of the object to load.
|
|
100
104
|
* @param {IOBJReaderOptions} [option] The OBJ reader options.
|
|
101
105
|
*/
|
|
102
|
-
setUrl(url: string, option?: IOBJReaderOptions):
|
|
106
|
+
setUrl(url: string, option?: IOBJReaderOptions): Promise<string>;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
/**
|
package/IO/Misc/PDBReader.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject, vtkSubscription } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject, vtkSubscription } from '../../interfaces';
|
|
2
|
+
import HtmlDataAccessHelper from '../Core/DataAccessHelper/HtmlDataAccessHelper';
|
|
3
|
+
import HttpDataAccessHelper from '../Core/DataAccessHelper/HttpDataAccessHelper';
|
|
4
|
+
import JSZipDataAccessHelper from '../Core/DataAccessHelper/JSZipDataAccessHelper';
|
|
5
|
+
import LiteHttpDataAccessHelper from '../Core/DataAccessHelper/LiteHttpDataAccessHelper';
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
interface IPDBReaderOptions {
|
|
@@ -33,7 +37,7 @@ export interface vtkPDBReader extends vtkPDBReaderBase {
|
|
|
33
37
|
/**
|
|
34
38
|
*
|
|
35
39
|
*/
|
|
36
|
-
getDataAccessHelper():
|
|
40
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
37
41
|
|
|
38
42
|
/**
|
|
39
43
|
* Get the url of the object to load.
|
|
@@ -69,9 +73,9 @@ export interface vtkPDBReader extends vtkPDBReaderBase {
|
|
|
69
73
|
|
|
70
74
|
/**
|
|
71
75
|
*
|
|
72
|
-
* @param
|
|
76
|
+
* @param callback
|
|
73
77
|
*/
|
|
74
|
-
onBusy(busy: boolean): vtkSubscription;
|
|
78
|
+
onBusy(callback: (busy: boolean) => any): vtkSubscription;
|
|
75
79
|
|
|
76
80
|
/**
|
|
77
81
|
* Parse data as text.
|
|
@@ -89,14 +93,14 @@ export interface vtkPDBReader extends vtkPDBReaderBase {
|
|
|
89
93
|
*
|
|
90
94
|
* @param dataAccessHelper
|
|
91
95
|
*/
|
|
92
|
-
setDataAccessHelper(dataAccessHelper:
|
|
96
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
93
97
|
|
|
94
98
|
/**
|
|
95
99
|
* Set the url of the object to load.
|
|
96
100
|
* @param {String} url the url of the object to load.
|
|
97
101
|
* @param {IPDBReaderOptions} [option] The PDB reader options.
|
|
98
102
|
*/
|
|
99
|
-
setUrl(url: string, option?: IPDBReaderOptions):
|
|
103
|
+
setUrl(url: string, option?: IPDBReaderOptions): Promise<string>;
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
/**
|
package/IO/XML/XMLReader.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
2
|
+
import HtmlDataAccessHelper from '../Core/DataAccessHelper/HtmlDataAccessHelper';
|
|
3
|
+
import HttpDataAccessHelper from '../Core/DataAccessHelper/HttpDataAccessHelper';
|
|
4
|
+
import JSZipDataAccessHelper from '../Core/DataAccessHelper/JSZipDataAccessHelper';
|
|
5
|
+
import LiteHttpDataAccessHelper from '../Core/DataAccessHelper/LiteHttpDataAccessHelper';
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
interface IXMLReaderOptions {
|
|
@@ -36,7 +40,7 @@ export interface vtkXMLReader extends vtkXMLReaderBase {
|
|
|
36
40
|
/**
|
|
37
41
|
*
|
|
38
42
|
*/
|
|
39
|
-
getDataAccessHelper():
|
|
43
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
40
44
|
|
|
41
45
|
/**
|
|
42
46
|
* Get the url of the object to load.
|
|
@@ -74,17 +78,17 @@ export interface vtkXMLReader extends vtkXMLReaderBase {
|
|
|
74
78
|
requestData(inData: any, outData: any): void;
|
|
75
79
|
|
|
76
80
|
/**
|
|
77
|
-
*
|
|
78
|
-
* @param
|
|
79
|
-
* @param {IXMLReaderOptions} [option] The XML reader options.
|
|
81
|
+
*
|
|
82
|
+
* @param dataAccessHelper
|
|
80
83
|
*/
|
|
81
|
-
|
|
84
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
82
85
|
|
|
83
86
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @param
|
|
87
|
+
* Set the url of the object to load.
|
|
88
|
+
* @param {String} url the url of the object to load.
|
|
89
|
+
* @param {IXMLReaderOptions} [option] The XML reader options.
|
|
86
90
|
*/
|
|
87
|
-
|
|
91
|
+
setUrl(url: string, option?: IXMLReaderOptions): Promise<any>;
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
/**
|
|
@@ -98,34 +102,34 @@ export function extend(publicAPI: object, model: object, initialValues?: IXMLRea
|
|
|
98
102
|
|
|
99
103
|
/**
|
|
100
104
|
* @param {Number} size
|
|
101
|
-
* @param dataArrayElem
|
|
105
|
+
* @param {HTMLElement} dataArrayElem
|
|
102
106
|
* @param {String} compressor
|
|
103
107
|
* @param {String} byteOrder
|
|
104
108
|
* @param {String} headerType
|
|
105
109
|
* @param {ArrayBuffer} binaryBuffer
|
|
106
110
|
*/
|
|
107
|
-
export function processDataArray(size: number, dataArrayElem:
|
|
111
|
+
export function processDataArray(size: number, dataArrayElem: HTMLElement, compressor: string, byteOrder: string, headerType: string, binaryBuffer: ArrayBuffer): IRet;
|
|
108
112
|
|
|
109
113
|
/**
|
|
110
114
|
* @param {Number} size
|
|
111
|
-
* @param containerElem
|
|
115
|
+
* @param {HTMLElement} containerElem
|
|
112
116
|
* @param {String} compressor
|
|
113
117
|
* @param {String} byteOrder
|
|
114
118
|
* @param {String} headerType
|
|
115
119
|
* @param {ArrayBuffer} binaryBuffer
|
|
116
120
|
*/
|
|
117
|
-
export function processCells(size: number, containerElem:
|
|
121
|
+
export function processCells(size: number, containerElem: HTMLElement, compressor: string, byteOrder: string, headerType: string, binaryBuffer: ArrayBuffer): Uint32Array;
|
|
118
122
|
|
|
119
123
|
/**
|
|
120
124
|
* @param {Number} size
|
|
121
|
-
* @param fieldElem
|
|
122
|
-
* @param fieldContainer
|
|
125
|
+
* @param {HTMLElement} fieldElem
|
|
126
|
+
* @param {HTMLElement} fieldContainer
|
|
123
127
|
* @param {String} compressor
|
|
124
128
|
* @param {String} byteOrder
|
|
125
129
|
* @param {String} headerType
|
|
126
130
|
* @param {ArrayBuffer} binaryBuffer
|
|
127
131
|
*/
|
|
128
|
-
export function processFieldData(size: number, fieldElem:
|
|
132
|
+
export function processFieldData(size: number, fieldElem: HTMLElement, fieldContainer: HTMLElement, compressor: string, byteOrder: string, headerType: string, binaryBuffer: ArrayBuffer): void;
|
|
129
133
|
|
|
130
134
|
|
|
131
135
|
/**
|
|
@@ -149,12 +149,64 @@ function vtkMouseRangeManipulator(publicAPI, model) {
|
|
|
149
149
|
model.containerSize = size.map(function (v) {
|
|
150
150
|
return v * ratio;
|
|
151
151
|
});
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
publicAPI.onButtonUp = function (interactor) {
|
|
155
|
+
interactor.exitPointerLock();
|
|
156
|
+
}; //--------------------------------------------------------------------------
|
|
157
|
+
// TODO: at some point, this should perhaps be done in
|
|
158
|
+
// RenderWindowInteractor instead of here.
|
|
159
|
+
// We need to hook into mousemove directly for two reasons:
|
|
160
|
+
// 1. We need to keep receiving mouse move events after the mouse button
|
|
161
|
+
// is released. This is currently not possible with
|
|
162
|
+
// vtkInteractorStyleManipulator.
|
|
163
|
+
// 2. Since the mouse is stationary in pointer lock mode, we need the
|
|
164
|
+
// event.movementX and event.movementY info, which are not currently
|
|
165
|
+
// passed via interactor.onMouseMove.
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
publicAPI.startPointerLockEvent = function (interactor, renderer) {
|
|
169
|
+
var handlePointerLockMove = function handlePointerLockMove(event) {
|
|
170
|
+
publicAPI.onPointerLockMove(interactor, renderer, event);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
document.addEventListener('mousemove', handlePointerLockMove);
|
|
174
|
+
var subscription = null;
|
|
175
|
+
|
|
176
|
+
var endInteraction = function endInteraction() {
|
|
177
|
+
var _subscription;
|
|
178
|
+
|
|
179
|
+
document.removeEventListener('mousemove', handlePointerLockMove);
|
|
180
|
+
(_subscription = subscription) === null || _subscription === void 0 ? void 0 : _subscription.unsubscribe();
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
subscription = interactor === null || interactor === void 0 ? void 0 : interactor.onEndPointerLock(endInteraction);
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
publicAPI.onPointerLockMove = function (interactor, renderer, event) {
|
|
187
|
+
// There is a slight delay between the `onEndPointerLock` call
|
|
188
|
+
// and the last `onMouseMove` event, we must make sure the pointer
|
|
189
|
+
// is still locked before we run this logic otherwise we may
|
|
190
|
+
// get a `onMouseMove` call after the pointer has been unlocked.
|
|
191
|
+
if (!interactor.isPointerLocked()) return;
|
|
192
|
+
model.previousPosition.x += event.movementX;
|
|
193
|
+
model.previousPosition.y += event.movementY;
|
|
194
|
+
publicAPI.onMouseMove(interactor, renderer, model.previousPosition);
|
|
152
195
|
}; //-------------------------------------------------------------------------
|
|
153
196
|
|
|
154
197
|
|
|
155
198
|
publicAPI.onMouseMove = function (interactor, renderer, position) {
|
|
156
199
|
if (!model.verticalListener && !model.horizontalListener) {
|
|
157
200
|
return;
|
|
201
|
+
} // We only want to initialize the pointer lock listener
|
|
202
|
+
// after the user starts moving their mouse, this way
|
|
203
|
+
// we don't interfere with other events such as doubleClick,
|
|
204
|
+
// for this reason we don't call this from `onButtonDown`
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
if (model.usePointerLock && !interactor.isPointerLocked()) {
|
|
208
|
+
interactor.requestPointerLock();
|
|
209
|
+
publicAPI.startPointerLockEvent(interactor, renderer);
|
|
158
210
|
}
|
|
159
211
|
|
|
160
212
|
if (!position) {
|
|
@@ -202,7 +254,9 @@ function extend(publicAPI, model) {
|
|
|
202
254
|
Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance
|
|
203
255
|
|
|
204
256
|
macro.obj(publicAPI, model);
|
|
205
|
-
vtkCompositeMouseManipulator.extend(publicAPI, model, initialValues); //
|
|
257
|
+
vtkCompositeMouseManipulator.extend(publicAPI, model, initialValues); // Create get-set macros
|
|
258
|
+
|
|
259
|
+
macro.setGet(publicAPI, model, ['usePointerLock']); // Object specific methods
|
|
206
260
|
|
|
207
261
|
vtkMouseRangeManipulator(publicAPI, model);
|
|
208
262
|
} // ----------------------------------------------------------------------------
|