@kitware/vtk.js 21.1.5 → 21.2.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/Transform/LandmarkTransform.d.ts +1 -1
- package/Filters/Sources/Arrow2DSource.d.ts +14 -13
- package/Filters/Sources/ArrowSource.d.ts +9 -8
- package/Filters/Sources/CircleSource.d.ts +15 -14
- package/Filters/Sources/ConeSource.d.ts +18 -17
- package/Filters/Sources/CubeSource.d.ts +19 -19
- package/Filters/Sources/Cursor3D.d.ts +19 -16
- package/Filters/Sources/CylinderSource.d.ts +15 -14
- package/Filters/Sources/LineSource.d.ts +1 -1
- package/Filters/Sources/PlaneSource.d.ts +29 -28
- package/Filters/Sources/PointSource.d.ts +9 -8
- package/Filters/Sources/SphereSource.d.ts +9 -8
- package/Rendering/Core/AbstractMapper.js +1 -0
- package/Rendering/Core/Light.d.ts +277 -234
- package/Rendering/Core/Property.d.ts +43 -43
- package/Rendering/Core/Property2D.d.ts +21 -5
- package/Rendering/Core/RenderWindowInteractor.js +7 -7
- package/Rendering/Core/Volume.d.ts +9 -0
- package/Rendering/OpenGL/ImageMapper.js +1 -1
- package/Rendering/OpenGL/PolyDataMapper.js +5 -17
- package/Rendering/OpenGL/RenderWindow.js +190 -106
- package/Rendering/OpenGL/ShaderProgram.js +0 -12
- package/interfaces.d.ts +66 -24
- package/package.json +1 -1
- package/types.d.ts +4 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { vec3 } from 'gl-matrix';
|
|
2
2
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
3
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
@@ -7,9 +8,9 @@ import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
|
7
8
|
export interface IPlaneSourceInitialValues {
|
|
8
9
|
xResolution?: number;
|
|
9
10
|
yResolution?: number;
|
|
10
|
-
origin?:
|
|
11
|
-
point1?:
|
|
12
|
-
point2?:
|
|
11
|
+
origin?: Vector3;
|
|
12
|
+
point1?: Vector3;
|
|
13
|
+
point2?: Vector3;
|
|
13
14
|
pointType?: string;
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -27,56 +28,56 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
|
|
|
27
28
|
* Get the center of the plane.
|
|
28
29
|
* @default [0, 0, 0]
|
|
29
30
|
*/
|
|
30
|
-
getCenter():
|
|
31
|
+
getCenter(): Vector3;
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* Get the center of the plane.
|
|
34
35
|
*/
|
|
35
|
-
getCenterByReference():
|
|
36
|
+
getCenterByReference(): Vector3;
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Get the normal of the plane.
|
|
39
40
|
* @default [0, 0, 1]
|
|
40
41
|
*/
|
|
41
|
-
getNormal():
|
|
42
|
+
getNormal(): Vector3;
|
|
42
43
|
|
|
43
44
|
/**
|
|
44
45
|
* Get the normal of the plane.
|
|
45
46
|
*/
|
|
46
|
-
getNormalByReference():
|
|
47
|
+
getNormalByReference(): Vector3;
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
50
|
* Get the origin of the plane, lower-left corner.
|
|
50
51
|
* @default [0, 0, 0]
|
|
51
52
|
*/
|
|
52
|
-
getOrigin():
|
|
53
|
+
getOrigin(): Vector3;
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
56
|
* Get the origin of the plane, lower-left corner.
|
|
56
57
|
*/
|
|
57
|
-
getOriginByReference():
|
|
58
|
+
getOriginByReference(): Vector3;
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
* Get the x axes of the plane.
|
|
61
62
|
* @default [1, 0, 0]
|
|
62
63
|
*/
|
|
63
|
-
getPoint1():
|
|
64
|
+
getPoint1(): Vector3;
|
|
64
65
|
|
|
65
66
|
/**
|
|
66
67
|
* Get the x axes of the plane.
|
|
67
68
|
*/
|
|
68
|
-
getPoint1ByReference():
|
|
69
|
+
getPoint1ByReference(): Vector3;
|
|
69
70
|
|
|
70
71
|
/**
|
|
71
72
|
* Get the y axes of the plane.
|
|
72
73
|
* @default [0, 1, 0]
|
|
73
74
|
*/
|
|
74
|
-
getPoint2():
|
|
75
|
+
getPoint2(): Vector3;
|
|
75
76
|
|
|
76
77
|
/**
|
|
77
78
|
* Get the y axes of the plane.
|
|
78
79
|
*/
|
|
79
|
-
getPoint2ByReference():
|
|
80
|
+
getPoint2ByReference(): Vector3;
|
|
80
81
|
|
|
81
82
|
/**
|
|
82
83
|
* Get the x resolution of the plane.
|
|
@@ -114,15 +115,15 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
|
|
|
114
115
|
|
|
115
116
|
/**
|
|
116
117
|
* Set the center of the plane.
|
|
117
|
-
* @param {
|
|
118
|
+
* @param {Vector3} center The coordinate of the center point.
|
|
118
119
|
*/
|
|
119
|
-
setCenter(center:
|
|
120
|
+
setCenter(center: Vector3): void;
|
|
120
121
|
|
|
121
122
|
/**
|
|
122
123
|
* Set the normal of the plane.
|
|
123
|
-
* @param {
|
|
124
|
+
* @param {Vector3} normal The normal coordinate.
|
|
124
125
|
*/
|
|
125
|
-
setNormal(normal:
|
|
126
|
+
setNormal(normal: Vector3): boolean;
|
|
126
127
|
|
|
127
128
|
/**
|
|
128
129
|
* Set the normal of the plane.
|
|
@@ -134,15 +135,15 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
|
|
|
134
135
|
|
|
135
136
|
/**
|
|
136
137
|
* Set the normal of the plane.
|
|
137
|
-
* @param {
|
|
138
|
+
* @param {Vector3} normal The normal coordinate.
|
|
138
139
|
*/
|
|
139
|
-
setNormalFrom(normal:
|
|
140
|
+
setNormalFrom(normal: Vector3): boolean;
|
|
140
141
|
|
|
141
142
|
/**
|
|
142
143
|
* Set the origin of the plane.
|
|
143
|
-
* @param {
|
|
144
|
+
* @param {Vector3} origin The coordinate of the origin point.
|
|
144
145
|
*/
|
|
145
|
-
setOrigin(origin:
|
|
146
|
+
setOrigin(origin: Vector3): boolean;
|
|
146
147
|
|
|
147
148
|
/**
|
|
148
149
|
* Set the origin of the plane.
|
|
@@ -154,9 +155,9 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
|
|
|
154
155
|
|
|
155
156
|
/**
|
|
156
157
|
* Set the origin of the plane.
|
|
157
|
-
* @param {
|
|
158
|
+
* @param {Vector3} origin The coordinate of the origin point.
|
|
158
159
|
*/
|
|
159
|
-
setOriginFrom(origin:
|
|
160
|
+
setOriginFrom(origin: Vector3): boolean;
|
|
160
161
|
|
|
161
162
|
/**
|
|
162
163
|
* Specify a point defining the first axis of the plane.
|
|
@@ -168,9 +169,9 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
|
|
|
168
169
|
|
|
169
170
|
/**
|
|
170
171
|
* Specify a point defining the first axis of the plane.
|
|
171
|
-
* @param {
|
|
172
|
+
* @param {Vector3} point1
|
|
172
173
|
*/
|
|
173
|
-
setPoint1(point1:
|
|
174
|
+
setPoint1(point1: Vector3): boolean;
|
|
174
175
|
|
|
175
176
|
/**
|
|
176
177
|
* Specify a point defining the second axis of the plane.
|
|
@@ -182,9 +183,9 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
|
|
|
182
183
|
|
|
183
184
|
/**
|
|
184
185
|
* Specify a point defining the second axis of the plane.
|
|
185
|
-
* @param {
|
|
186
|
+
* @param {Vector3} point2
|
|
186
187
|
*/
|
|
187
|
-
setPoint2(point2:
|
|
188
|
+
setPoint2(point2: Vector3): boolean;
|
|
188
189
|
|
|
189
190
|
/**
|
|
190
191
|
* Set the number of facets used to represent the cone.
|
|
@@ -234,7 +235,7 @@ export function newInstance(initialValues?: IPlaneSourceInitialValues): vtkPlane
|
|
|
234
235
|
*
|
|
235
236
|
* @example
|
|
236
237
|
* ```js
|
|
237
|
-
* import vtkPlaneSource from 'vtk.js/
|
|
238
|
+
* import vtkPlaneSource from '@kitware/vtk.js/Filters/Sources/PlaneSource';
|
|
238
239
|
*
|
|
239
240
|
* const plane = vtkPlaneSource.newInstance({ xResolution: 10, yResolution: 10 });
|
|
240
241
|
* const polydata = plane.getOutputData();
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
2
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
6
|
*/
|
|
6
7
|
export interface IPointSourceInitialValues {
|
|
7
8
|
numberOfPoints?: number;
|
|
8
|
-
center?:
|
|
9
|
+
center?: Vector3;
|
|
9
10
|
radius?: number;
|
|
10
11
|
pointType?: string;
|
|
11
12
|
}
|
|
@@ -24,12 +25,12 @@ export interface vtkPointSource extends vtkPointSourceBase {
|
|
|
24
25
|
* Get the center of the plane.
|
|
25
26
|
* @default [0, 0, 0]
|
|
26
27
|
*/
|
|
27
|
-
getCenter():
|
|
28
|
+
getCenter(): Vector3;
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* Get the center of the plane.
|
|
31
32
|
*/
|
|
32
|
-
getCenterByReference():
|
|
33
|
+
getCenterByReference(): Vector3;
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Get the number of points to generate.
|
|
@@ -60,15 +61,15 @@ export interface vtkPointSource extends vtkPointSourceBase {
|
|
|
60
61
|
|
|
61
62
|
/**
|
|
62
63
|
* Set the center of the point cloud.
|
|
63
|
-
* @param {
|
|
64
|
+
* @param {Vector3} center The center point's coordinates.
|
|
64
65
|
*/
|
|
65
|
-
setCenter(center:
|
|
66
|
+
setCenter(center: Vector3): boolean;
|
|
66
67
|
|
|
67
68
|
/**
|
|
68
69
|
* Set the center of the point cloud.
|
|
69
|
-
* @param {
|
|
70
|
+
* @param {Vector3} center The center point's coordinates.
|
|
70
71
|
*/
|
|
71
|
-
setCenterFrom(center:
|
|
72
|
+
setCenterFrom(center: Vector3): boolean;
|
|
72
73
|
|
|
73
74
|
/**
|
|
74
75
|
* Set the number of points to generate.
|
|
@@ -110,7 +111,7 @@ export function newInstance(initialValues?: IPointSourceInitialValues): vtkPoint
|
|
|
110
111
|
*
|
|
111
112
|
* @example
|
|
112
113
|
* ```js
|
|
113
|
-
* import vtkPointSource from 'vtk.js/
|
|
114
|
+
* import vtkPointSource from '@kitware/vtk.js/Filters/Sources/PointSource';
|
|
114
115
|
*
|
|
115
116
|
* const point = vtkPointSource.newInstance({ numberOfPoints: 10 });
|
|
116
117
|
* const polydata = point.getOutputData();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
2
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
@@ -12,7 +13,7 @@ export interface ISphereSourceInitialValues {
|
|
|
12
13
|
phiResolution?: number;
|
|
13
14
|
startPhi?: number;
|
|
14
15
|
endPhi?: number;
|
|
15
|
-
center?:
|
|
16
|
+
center?: Vector3;
|
|
16
17
|
pointType?: string;
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -30,12 +31,12 @@ export interface vtkSphereSource extends vtkSphereSourceBase {
|
|
|
30
31
|
* Get the center of the sphere.
|
|
31
32
|
* @default [0, 0, 0]
|
|
32
33
|
*/
|
|
33
|
-
getCenter():
|
|
34
|
+
getCenter(): Vector3;
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* Get the center of the sphere.
|
|
37
38
|
*/
|
|
38
|
-
getCenterByReference():
|
|
39
|
+
getCenterByReference(): Vector3;
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
/**
|
|
@@ -103,15 +104,15 @@ export interface vtkSphereSource extends vtkSphereSourceBase {
|
|
|
103
104
|
|
|
104
105
|
/**
|
|
105
106
|
* Set the center of the sphere.
|
|
106
|
-
* @param {
|
|
107
|
+
* @param {Vector3} center The center point's coordinates.
|
|
107
108
|
*/
|
|
108
|
-
setCenter(center:
|
|
109
|
+
setCenter(center: Vector3): boolean;
|
|
109
110
|
|
|
110
111
|
/**
|
|
111
112
|
* Set the center of the sphere.
|
|
112
|
-
* @param {
|
|
113
|
+
* @param {Vector3} center The center point's coordinates.
|
|
113
114
|
*/
|
|
114
|
-
setCenterFrom(center:
|
|
115
|
+
setCenterFrom(center: Vector3): boolean;
|
|
115
116
|
|
|
116
117
|
/**
|
|
117
118
|
* Set the ending latitude angle.
|
|
@@ -192,7 +193,7 @@ export function newInstance(initialValues?: ISphereSourceInitialValues): vtkSphe
|
|
|
192
193
|
*
|
|
193
194
|
* @example
|
|
194
195
|
* ```js
|
|
195
|
-
* import vtkSphereSource from 'vtk.js/
|
|
196
|
+
* import vtkSphereSource from '@kitware/vtk.js/Filters/Sources/SphereSource';
|
|
196
197
|
*
|
|
197
198
|
* const sphere = vtkSphereSource.newInstance();
|
|
198
199
|
* const polydata = sphere.getOutputData();
|