Skip to content

Commit 71fa4cd

Browse files
authored
Merge pull request #2173 from daker/ts-defs-update
docs(ts): Update Typescript definitions
2 parents 15c0f1e + de2a187 commit 71fa4cd

File tree

25 files changed

+579
-680
lines changed

25 files changed

+579
-680
lines changed

Sources/Common/DataModel/PiecewiseFunction/api.md

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

Sources/Common/Transform/LandmarkTransform/api.md

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

Sources/Common/Transform/LandmarkTransform/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function newInstance(initialValues?: ILandmarkTransformInitialValues): vt
8989
*
9090
* @example
9191
* '''js
92-
* import vtkLandmarkTransform from 'vtk.js/Sources/Common/Transform/LandmarkTransform';
92+
* import vtkLandmarkTransform from '@kitware/vtk.js/Common/Transform/LandmarkTransform';
9393
*
9494
* const transform = LandmarkTransform.New();
9595
* transform.setMode(Mode.RIGID_BODY);

Sources/Filters/Sources/Arrow2DSource/index.d.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { vtkAlgorithm, vtkObject } from "../../../interfaces";
2+
import { Vector3 } from "../../../types";
23

34
export enum ShapeType {
45
TRIANGLE,
@@ -15,10 +16,10 @@ export interface IArrow2DSourceInitialValues {
1516
height?: number;
1617
width?: number;
1718
thickness?: number;
18-
center?: number[];
19+
center?: Vector3;
1920
pointType?: string;
20-
origin?: number[];
21-
direction?: number[];
21+
origin?: Vector3;
22+
direction?: Vector3;
2223
}
2324

2425
type vtkArrow2DSourceBase = vtkObject & Omit<vtkAlgorithm,
@@ -41,23 +42,23 @@ export interface vtkArrow2DSource extends vtkArrow2DSourceBase {
4142
* Get the center of the cone.
4243
* @default [0, 0, 0]
4344
*/
44-
getCenter(): number[];
45+
getCenter(): Vector3;
4546

4647
/**
4748
* Get the center of the cone.
4849
*/
49-
getCenterByReference(): number[];
50+
getCenterByReference(): Vector3;
5051

5152
/**
5253
* Get the orientation vector of the cone.
5354
* @default [1.0, 0.0, 0.0]
5455
*/
55-
getDirection(): number[];
56+
getDirection(): Vector3;
5657

5758
/**
5859
* Get the orientation vector of the cone.
5960
*/
60-
getDirectionByReference(): number[];
61+
getDirectionByReference(): Vector3;
6162

6263
/**
6364
* Get the height of the cone.
@@ -107,10 +108,10 @@ export interface vtkArrow2DSource extends vtkArrow2DSourceBase {
107108
* It is located at the middle of the axis of the cone.
108109
* !!! warning
109110
* This is not the center of the base of the cone!
110-
* @param {Number[]} center The center of the cone coordinates.
111+
* @param {Vector3} center The center of the cone coordinates.
111112
* @default [0, 0, 0]
112113
*/
113-
setCenterFrom(center: number[]): boolean;
114+
setCenterFrom(center: Vector3): boolean;
114115

115116
/**
116117
* Set the direction for the arrow.
@@ -122,15 +123,15 @@ export interface vtkArrow2DSource extends vtkArrow2DSourceBase {
122123

123124
/**
124125
* Set the direction for the arrow 2D.
125-
* @param {Number[]} direction The direction coordinates.
126+
* @param {Vector3} direction The direction coordinates.
126127
*/
127-
setDirection(direction: number[]): boolean;
128+
setDirection(direction: Vector3): boolean;
128129

129130
/**
130131
* Set the direction for the arrow 2D.
131-
* @param {Number[]} direction The direction coordinates.
132+
* @param {Vector3} direction The direction coordinates.
132133
*/
133-
setDirectionFrom(direction: number[]): boolean;
134+
setDirectionFrom(direction: Vector3): boolean;
134135

135136
/**
136137
* Set the height of the cone.

Sources/Filters/Sources/ArrowSource/index.d.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { vtkAlgorithm, vtkObject } from "../../../interfaces";
2+
import { Vector3 } from "../../../types";
23

34
export enum ShapeType {
45
TRIANGLE,
@@ -17,7 +18,7 @@ export interface IArrowSourceInitialValues {
1718
shaftResolution?: number;
1819
shaftRadius?: number;
1920
invert?: boolean;
20-
direction?: number[];
21+
direction?: Vector3;
2122
pointType?: string;
2223
}
2324

@@ -35,12 +36,12 @@ export interface vtkArrowSource extends vtkArrowSourceBase {
3536
* Get the orientation vector of the cone.
3637
* @default [1.0, 0.0, 0.0]
3738
*/
38-
getDirection(): number[];
39+
getDirection(): Vector3;
3940

4041
/**
4142
* Get the orientation vector of the cone.
4243
*/
43-
getDirectionByReference(): number[];
44+
getDirectionByReference(): Vector3;
4445

4546
/**
4647
*
@@ -95,15 +96,15 @@ export interface vtkArrowSource extends vtkArrowSourceBase {
9596

9697
/**
9798
* Set the direction for the arrow.
98-
* @param {Number[]} direction The direction coordinates.
99+
* @param {Vector3} direction The direction coordinates.
99100
*/
100-
setDirection(direction: number[]): boolean;
101+
setDirection(direction: Vector3): boolean;
101102

102103
/**
103104
* Set the direction for the arrow.
104-
* @param {Number[]} direction The direction coordinates.
105+
* @param {Vector3} direction The direction coordinates.
105106
*/
106-
setDirectionFrom(direction: number[]): boolean;
107+
setDirectionFrom(direction: Vector3): boolean;
107108

108109
/**
109110
* Inverts the arrow direction.
@@ -168,7 +169,7 @@ export function newInstance(initialValues?: IArrowSourceInitialValues): vtkArrow
168169
*
169170
* @example
170171
* ```js
171-
* import vtkArrowSource from 'vtk.js/Sources/Filters/Sources/ArrowSource';
172+
* import vtkArrowSource from '@kitware/vtk.js/Filters/Sources/ArrowSource';
172173
*
173174
* const arrow = vtkArrowSource.newInstance({
174175
* tipResolution: 6,

Sources/Filters/Sources/CircleSource/index.d.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { vtkAlgorithm, vtkObject } from "../../../interfaces";
2+
import { Vector3 } from "../../../types";
23

34
/**
45
*
56
*/
67
export interface ICircleSourceInitialValues {
78
radius?: number;
89
resolution?: number;
9-
center?: number[];
10+
center?: Vector3;
1011
pointType?: string;
1112
lines?: boolean;
1213
face?: boolean;
@@ -26,23 +27,23 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
2627
* Get the center of the cone.
2728
* @default [0, 0, 0]
2829
*/
29-
getCenter(): number[];
30+
getCenter(): Vector3;
3031

3132
/**
3233
* Get the center of the cone.
3334
*/
34-
getCenterByReference(): number[];
35+
getCenterByReference(): Vector3;
3536

3637
/**
3738
* Get the orientation vector of the cone.
3839
* @default [1.0, 0.0, 0.0]
3940
*/
40-
getDirection(): number[];
41+
getDirection(): Vector3;
4142

4243
/**
4344
* Get the orientation vector of the cone.
4445
*/
45-
getDirectionByReference(): number[];
46+
getDirectionByReference(): Vector3;
4647

4748
/**
4849
*
@@ -85,15 +86,15 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
8586

8687
/**
8788
* Set the direction for the circle.
88-
* @param {Number[]} direction The direction coordinates.
89+
* @param {Vector3} direction The direction coordinates.
8990
*/
90-
setDirection(direction: number[]): boolean;
91+
setDirection(direction: Vector3): boolean;
9192

9293
/**
9394
* Set the direction for the circle.
94-
* @param {Number[]} direction The direction coordinates.
95+
* @param {Vector3} direction The direction coordinates.
9596
*/
96-
setDirectionFrom(direction: number[]): boolean;
97+
setDirectionFrom(direction: Vector3): boolean;
9798

9899
/**
99100
* Set the center of the circle.
@@ -106,10 +107,10 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
106107

107108
/**
108109
* Set the center of the circle.
109-
* @param {Number[]} center
110+
* @param {Vector3} center
110111
* @default [0, 0, 0]
111112
*/
112-
setCenterFrom(center: number[]): boolean;
113+
setCenterFrom(center: Vector3): boolean;
113114

114115
/**
115116
*
@@ -125,13 +126,13 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
125126

126127
/**
127128
* Set the radius of the circle.
128-
* @param {Number} radius
129+
* @param {Number} radius The radius of the circle.
129130
*/
130131
setRadius(radius: number): boolean;
131132

132133
/**
133134
* Set the resolution of the circle.
134-
* @param resolution
135+
* @param {Number} resolution The resolution of the circle.
135136
*/
136137
setResolution(resolution: number): boolean;
137138
}
@@ -157,7 +158,7 @@ export function newInstance(initialValues?: ICircleSourceInitialValues): vtkCirc
157158
*
158159
* @example
159160
* ```js
160-
* import vtkCircleSource from 'vtk.js/Sources/Filters/Sources/CircleSource';
161+
* import vtkCircleSource from '@kitware/vtk.js/Filters/Sources/CircleSource';
161162
*
162163
* const circle = vtkCircleSource.newInstance({ radius: 1, resolution: 80 });
163164
* const polydata = circle.getOutputData();

0 commit comments

Comments
 (0)