1
1
import { vtkAlgorithm } from '../../../interfaces' ;
2
+ import { Nullable } from '../../../types' ;
2
3
3
4
/**
4
5
*
@@ -14,68 +15,110 @@ export interface ITextureInitialValues {
14
15
}
15
16
16
17
export interface vtkTexture extends vtkAlgorithm {
18
+
19
+ /**
20
+ * Returns the canvas used by the texture.
21
+ */
22
+ getCanvas ( ) : Nullable < HTMLCanvasElement > ;
23
+
17
24
/**
18
- *
25
+ * Returns true if the texture is set to repeat at the edges.
19
26
*/
20
27
getRepeat ( ) : boolean ;
21
28
22
29
/**
23
- *
30
+ * Returns true if the texture is set to clamp at the edges.
24
31
*/
25
32
getEdgeClamp ( ) : boolean ;
26
33
27
34
/**
28
- *
35
+ * Returns true if the texture is set to interpolate between texels.
29
36
*/
30
37
getInterpolate ( ) : boolean ;
31
38
32
39
/**
33
- *
40
+ * Returns the image used by the texture.
41
+ */
42
+ getImage ( ) : HTMLImageElement ;
43
+
44
+ /**
45
+ * Returns an ImageBitmap object.
34
46
*/
35
- getImage ( ) : any ;
47
+ getImageBitmap ( ) : ImageBitmap ;
36
48
37
49
/**
38
- *
50
+ * Returns true if the image is loaded.
39
51
*/
40
52
getImageLoaded ( ) : boolean ;
41
53
42
54
/**
43
- *
55
+ * Returns the input image data as a JavaScript ImageData object.
56
+ */
57
+ getInputAsJsImageData ( ) : any ;
58
+
59
+ /**
60
+ * Returns the current mip level of the texture.
44
61
*/
45
62
getMipLevel ( ) : number ;
46
63
47
64
/**
48
- *
49
- * @param repeat
50
- * @default false
65
+ * Returns true if the texture can be resized at run time.
66
+ * This is useful for dynamic textures that may change size based on user
67
+ * interaction or other factors.
51
68
*/
52
- setRepeat ( repeat : boolean ) : boolean ;
69
+ getResizable ( ) : boolean ;
70
+
71
+ /**
72
+ * Returns the canvas used by the texture.
73
+ */
74
+ setCanvas ( canvas : HTMLCanvasElement ) : void ;
53
75
54
76
/**
55
- *
77
+ * Sets the texture to clamp at the edges.
56
78
* @param edgeClamp
57
79
* @default false
58
80
*/
59
81
setEdgeClamp ( edgeClamp : boolean ) : boolean ;
60
82
61
83
/**
62
- *
84
+ * Sets the texture to interpolate between texels.
63
85
* @param interpolate
64
86
* @default false
65
87
*/
66
88
setInterpolate ( interpolate : boolean ) : boolean ;
67
89
68
90
/**
69
- *
91
+ * Sets the image used by the texture.
70
92
* @param image
71
93
* @default null
72
94
*/
73
- setImage ( image : any ) : void ;
95
+ setImage ( image : HTMLImageElement ) : void ;
96
+
97
+ /**
98
+ * Sets the image as an ImageBitmap object.
99
+ * Supported in WebGPU only.
100
+ * @param imageBitmap
101
+ */
102
+ setImageBitmap ( imageBitmap : ImageBitmap ) : void ;
103
+
104
+ /**
105
+ * Sets the input image data as a JavaScript ImageData object.
106
+ * @param imageData
107
+ */
108
+ setJsImageData ( imageData : any ) : void ;
74
109
75
110
/**
111
+ * Sets the current mip level of the texture.
76
112
* @param level
77
113
*/
78
114
setMipLevel ( level : number ) : boolean ;
115
+
116
+ /**
117
+ * Sets the texture to repeat at the edges.
118
+ * @param repeat
119
+ * @default false
120
+ */
121
+ setRepeat ( repeat : boolean ) : boolean ;
79
122
}
80
123
81
124
/**
@@ -116,10 +159,11 @@ export function generateMipmaps(
116
159
) : Array < Uint8ClampedArray > ;
117
160
118
161
/**
119
- * vtkTexture is an image algorithm that handles loading and binding of texture maps.
120
- * It obtains its data from an input image data dataset type.
121
- * Thus you can create visualization pipelines to read, process, and construct textures.
122
- * Note that textures will only work if texture coordinates are also defined, and if the rendering system supports texture.
162
+ * vtkTexture is an image algorithm that handles loading and binding of texture
163
+ * maps. It obtains its data from an input image data dataset type. Thus you can
164
+ * create visualization pipelines to read, process, and construct textures. Note
165
+ * that textures will only work if texture coordinates are also defined, and if
166
+ * the rendering system supports texture.
123
167
*/
124
168
export declare const vtkTexture : {
125
169
newInstance : typeof newInstance ;
0 commit comments