@kitware/vtk.js 25.7.0 → 25.7.3
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.
|
@@ -701,9 +701,10 @@ function vtkClipClosedSurface(publicAPI, model) {
|
|
|
701
701
|
copyPolygons(inputPolys, polys, inputScalars, firstPolyScalar, polyScalars, colors[0]); // TODO: Support triangle strips
|
|
702
702
|
|
|
703
703
|
breakTriangleStrips(input.getStrips(), polys, inputScalars, firstStripScalar, polyScalars, colors[0]); // Check if the input has polys and quads or just triangles
|
|
704
|
-
// TODO: Improve performance
|
|
705
704
|
|
|
706
|
-
polyMax =
|
|
705
|
+
polyMax = inputPolys.getCellSizes().reduce(function (a, b) {
|
|
706
|
+
return a > b ? a : b;
|
|
707
|
+
}, 0);
|
|
707
708
|
} // Arrays for storing the clipped lines and polys
|
|
708
709
|
|
|
709
710
|
|
|
@@ -35,13 +35,15 @@ export interface vtkAbstractMapper extends vtkAbstractMapperBase {
|
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Remove all clipping planes.
|
|
38
|
+
* @return true if there were planes, false otherwise.
|
|
38
39
|
*/
|
|
39
|
-
removeAllClippingPlanes():
|
|
40
|
+
removeAllClippingPlanes(): boolean;
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Remove clipping plane.
|
|
44
|
+
* @param {vtkPlane} plane
|
|
45
|
+
* @return true if plane existed and therefore is removed, false otherwise.
|
|
46
|
+
*/
|
|
45
47
|
removeClippingPlane(plane: vtkPlane): boolean;
|
|
46
48
|
|
|
47
49
|
/**
|
|
@@ -29,7 +29,13 @@ function vtkAbstractMapper(publicAPI, model) {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
publicAPI.removeAllClippingPlanes = function () {
|
|
32
|
+
if (model.clippingPlanes.length === 0) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
32
36
|
model.clippingPlanes.length = 0;
|
|
37
|
+
publicAPI.modified();
|
|
38
|
+
return true;
|
|
33
39
|
};
|
|
34
40
|
|
|
35
41
|
publicAPI.removeClippingPlane = function (clippingPlane) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { vtkObject } from './../../interfaces';
|
|
2
2
|
import vtkCanvasView from './CanvasView';
|
|
3
|
+
import vtkImageStream from './../../IO/Core/ImageStream';
|
|
3
4
|
import vtkViewStream from './../../IO/Core/ImageStream/ViewStream';
|
|
4
5
|
|
|
5
6
|
interface IRemoteViewInitialValues {
|
|
@@ -188,13 +189,18 @@ export function newInstance(
|
|
|
188
189
|
initialValues?: IRemoteViewInitialValues
|
|
189
190
|
): vtkRemoteView;
|
|
190
191
|
|
|
191
|
-
export function connectImageStream(session: any):
|
|
192
|
+
export function connectImageStream(session: any): void;
|
|
193
|
+
|
|
194
|
+
export function disconnectImageStream(): void;
|
|
195
|
+
|
|
192
196
|
/**
|
|
193
197
|
* vtkRemoteView provides a way to create a remote view.
|
|
194
198
|
*/
|
|
195
199
|
export declare const vtkRemoteView: {
|
|
196
200
|
newInstance: typeof newInstance;
|
|
197
201
|
extend: typeof extend;
|
|
202
|
+
SHARED_IMAGE_STREAM: vtkImageStream;
|
|
198
203
|
connectImageStream: typeof connectImageStream;
|
|
204
|
+
disconnectImageStream: typeof disconnectImageStream;
|
|
199
205
|
};
|
|
200
206
|
export default vtkRemoteView;
|
|
@@ -41,7 +41,7 @@ function createContextProxyHandler() {
|
|
|
41
41
|
|
|
42
42
|
return {
|
|
43
43
|
get: function get(gl, prop, receiver) {
|
|
44
|
-
var value = Reflect.get(gl, prop,
|
|
44
|
+
var value = Reflect.get(gl, prop, gl);
|
|
45
45
|
|
|
46
46
|
if (value instanceof Function) {
|
|
47
47
|
// prevents Illegal Invocation errors
|