@kitware/vtk.js 23.4.0 → 24.0.0-beta.1
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/BREAKING_CHANGES.md +33 -0
- package/Common/Core/DataArray.js +4 -0
- package/Common/Core/Math/index.js +2 -2
- package/Common/Core/Math.js +1 -1
- package/Common/DataModel/BoundingBox.js +3 -8
- package/Common/DataModel/DataSetAttributes/FieldData.js +9 -5
- package/Common/DataModel/ITKHelper.js +2 -346
- package/Common/DataModel/ImageData.d.ts +23 -6
- package/Common/DataModel/ImageData.js +8 -1
- package/Common/DataModel/PolyData.d.ts +8 -1
- package/Common/DataModel/PolyData.js +5 -3
- package/Common/DataModel/Triangle.js +217 -2
- package/Common/Transform/LandmarkTransform.js +1 -1
- package/Filters/General/OBBTree/OBBNode.js +82 -0
- package/Filters/General/OBBTree/helper.js +92 -0
- package/Filters/General/OBBTree.js +1249 -0
- package/Filters/General/WindowedSincPolyDataFilter.js +1 -1
- package/Filters/General.js +2 -0
- package/Filters/Sources/CircleSource.js +1 -1
- package/Filters/Sources/PointSource.js +1 -1
- package/Filters/Texture/TextureMapToPlane.js +1 -1
- package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
- package/Interaction/Style/InteractorStyleImage.js +3 -3
- package/Interaction/Style/InteractorStyleMPRSlice.js +12 -6
- package/Interaction/Style/InteractorStyleManipulator.js +42 -28
- package/Interaction/Style/InteractorStyleRemoteMouse.js +32 -14
- package/Interaction/Style/InteractorStyleTrackballCamera.js +7 -7
- package/Interaction/Widgets/OrientationMarkerWidget.js +18 -13
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +1 -1
- package/Interaction/Widgets.js +1 -35
- package/Proxy/Core/View2DProxy.js +1 -1
- package/Rendering/Core/ColorTransferFunction.js +1 -1
- package/Rendering/Core/Coordinate.js +1 -1
- package/Rendering/Core/CubeAxesActor.js +1 -1
- package/Rendering/Core/Glyph3DMapper.js +1 -1
- package/Rendering/Core/ImageMapper.js +1 -1
- package/Rendering/Core/InteractorObserver.js +11 -10
- package/Rendering/Core/InteractorStyle.js +9 -4
- package/Rendering/Core/Mapper.js +1 -1
- package/Rendering/Core/Prop.js +6 -4
- package/Rendering/Core/Prop3D.js +1 -1
- package/Rendering/Core/RenderWindowInteractor.js +24 -17
- package/Rendering/Core/Renderer.js +24 -19
- package/Rendering/Core/ScalarBarActor.js +1 -1
- package/Rendering/Core/Viewport.js +1 -1
- package/Rendering/Core/VolumeMapper.js +1 -1
- package/Rendering/OpenGL/Actor.js +2 -2
- package/Rendering/OpenGL/Actor2D.js +2 -2
- package/Rendering/OpenGL/BufferObject.js +6 -5
- package/Rendering/OpenGL/Camera.js +3 -3
- package/Rendering/OpenGL/CellArrayBufferObject.js +1 -1
- package/Rendering/OpenGL/Framebuffer.js +13 -12
- package/Rendering/OpenGL/Glyph3DMapper.js +10 -8
- package/Rendering/OpenGL/HardwareSelector.js +35 -25
- package/Rendering/OpenGL/ImageMapper.js +51 -45
- package/Rendering/OpenGL/ImageSlice.js +2 -2
- package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +4 -2
- package/Rendering/OpenGL/PolyDataMapper.js +14 -11
- package/Rendering/OpenGL/PolyDataMapper2D.js +17 -16
- package/Rendering/OpenGL/Renderer.js +11 -7
- package/Rendering/OpenGL/ReplacementShaderMapper.js +1 -1
- package/Rendering/OpenGL/ScalarBarActor.js +2 -2
- package/Rendering/OpenGL/ShaderCache.js +7 -5
- package/Rendering/OpenGL/Skybox.js +11 -9
- package/Rendering/OpenGL/SphereMapper.js +2 -2
- package/Rendering/OpenGL/StickMapper.js +2 -2
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D/pingpong.js +13 -12
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D.js +11 -9
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +19 -12
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +9 -6
- package/Rendering/OpenGL/Texture.js +44 -31
- package/Rendering/OpenGL/VertexArrayObject.js +7 -7
- package/Rendering/OpenGL/Volume.js +3 -2
- package/Rendering/OpenGL/VolumeMapper.js +30 -26
- package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
- package/Rendering/SceneGraph/ViewNode.js +8 -7
- package/Rendering/WebGPU/Renderer.js +18 -10
- package/Widgets/Core/AbstractWidget.js +5 -4
- package/Widgets/Core/AbstractWidgetFactory.js +2 -1
- package/Widgets/Core/WidgetManager.js +66 -49
- package/Widgets/Manipulators/LineManipulator.js +1 -1
- package/Widgets/Representations/CircleContextRepresentation.js +1 -1
- package/Widgets/Representations/ImplicitPlaneRepresentation.js +5 -5
- package/Widgets/Representations/PolyLineRepresentation.js +1 -1
- package/Widgets/Representations/ResliceCursorContextRepresentation.js +7 -7
- package/Widgets/SVG/SVGLandmarkRepresentation/Constants.js +2 -2
- package/Widgets/SVG/SVGLandmarkRepresentation.js +21 -8
- package/Widgets/SVG/SVGRepresentation.js +1 -1
- package/Widgets/Widgets3D/AngleWidget/behavior.js +14 -6
- package/Widgets/Widgets3D/DistanceWidget/behavior.js +14 -6
- package/Widgets/Widgets3D/EllipseWidget.js +0 -1
- package/Widgets/Widgets3D/ImageCroppingWidget/behavior.js +6 -2
- package/Widgets/Widgets3D/ImplicitPlaneWidget.js +4 -2
- package/Widgets/Widgets3D/LabelWidget/behavior.js +138 -0
- package/Widgets/Widgets3D/LabelWidget/state.js +22 -0
- package/Widgets/Widgets3D/LabelWidget.js +79 -0
- package/Widgets/Widgets3D/LineWidget/behavior.js +18 -9
- package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/LineWidget.js +0 -1
- package/Widgets/Widgets3D/PaintWidget/behavior.js +5 -3
- package/Widgets/Widgets3D/PolyLineWidget/behavior.js +18 -8
- package/Widgets/Widgets3D/RectangleWidget.js +0 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +18 -11
- package/Widgets/Widgets3D/SplineWidget/behavior.js +33 -21
- package/index.d.ts +3 -4
- package/interfaces.d.ts +11 -0
- package/macros.d.ts +26 -1
- package/macros.js +51 -19
- package/package.json +1 -1
- package/types.d.ts +1 -0
- package/Interaction/Widgets/AbstractWidget.js +0 -104
- package/Interaction/Widgets/DistanceRepresentation.js +0 -116
- package/Interaction/Widgets/DistanceWidget.js +0 -77
- package/Interaction/Widgets/HandleRepresentation/Constants.js +0 -12
- package/Interaction/Widgets/HandleRepresentation.js +0 -100
- package/Interaction/Widgets/HandleWidget/Constants.js +0 -9
- package/Interaction/Widgets/HandleWidget.js +0 -194
- package/Interaction/Widgets/ImageCroppingRegionsRepresentation.js +0 -233
- package/Interaction/Widgets/ImageCroppingRegionsWidget/Constants.js +0 -16
- package/Interaction/Widgets/ImageCroppingRegionsWidget.js +0 -573
- package/Interaction/Widgets/LabelRepresentation/Constants.js +0 -17
- package/Interaction/Widgets/LabelRepresentation.js +0 -325
- package/Interaction/Widgets/LabelWidget.js +0 -65
- package/Interaction/Widgets/LineRepresentation/Constants.js +0 -21
- package/Interaction/Widgets/LineRepresentation.js +0 -498
- package/Interaction/Widgets/LineWidget/Constants.js +0 -11
- package/Interaction/Widgets/LineWidget.js +0 -296
- package/Interaction/Widgets/PointPlacer.js +0 -51
- package/Interaction/Widgets/ResliceCursor/ResliceCursor/Constants.js +0 -10
- package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +0 -269
- package/Interaction/Widgets/ResliceCursor/ResliceCursorActor/Constants.js +0 -10
- package/Interaction/Widgets/ResliceCursor/ResliceCursorActor.js +0 -146
- package/Interaction/Widgets/ResliceCursor/ResliceCursorLineRepresentation.js +0 -332
- package/Interaction/Widgets/ResliceCursor/ResliceCursorPolyDataAlgorithm.js +0 -134
- package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation/Constants.js +0 -16
- package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +0 -371
- package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget/Constants.js +0 -10
- package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget.js +0 -157
- package/Interaction/Widgets/SphereHandleRepresentation.js +0 -370
- package/Interaction/Widgets/WidgetRepresentation.js +0 -121
- package/Widgets/Representations/SphereContextRepresentation.js +0 -131
- package/Widgets/Widgets3D/SphereWidget/behavior.js +0 -177
- package/Widgets/Widgets3D/SphereWidget/state.js +0 -45
- package/Widgets/Widgets3D/SphereWidget.d.ts +0 -50
- package/Widgets/Widgets3D/SphereWidget.js +0 -62
|
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
3
|
import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
|
|
4
4
|
import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
5
|
-
import {
|
|
5
|
+
import { w as vtkMath } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import { AttributeTypes } from '../../Common/DataModel/DataSetAttributes/Constants.js';
|
|
7
7
|
import vtkPoints from '../../Common/Core/Points.js';
|
|
8
8
|
import vtkPolyData from '../../Common/DataModel/PolyData.js';
|
package/Filters/General.js
CHANGED
|
@@ -8,6 +8,7 @@ import vtkImageOutlineFilter from './General/ImageOutlineFilter.js';
|
|
|
8
8
|
import vtkImageSliceFilter from './General/ImageSliceFilter.js';
|
|
9
9
|
import vtkImageStreamline from './General/ImageStreamline.js';
|
|
10
10
|
import vtkMoleculeToRepresentation from './General/MoleculeToRepresentation.js';
|
|
11
|
+
import vtkOBBTree from './General/OBBTree.js';
|
|
11
12
|
import vtkOutlineFilter from './General/OutlineFilter.js';
|
|
12
13
|
import vtkPaintFilter from './General/PaintFilter.js';
|
|
13
14
|
import vtkScalarToRGBA from './General/ScalarToRGBA.js';
|
|
@@ -26,6 +27,7 @@ var General = {
|
|
|
26
27
|
vtkImageSliceFilter: vtkImageSliceFilter,
|
|
27
28
|
vtkImageStreamline: vtkImageStreamline,
|
|
28
29
|
vtkMoleculeToRepresentation: vtkMoleculeToRepresentation,
|
|
30
|
+
vtkOBBTree: vtkOBBTree,
|
|
29
31
|
vtkOutlineFilter: vtkOutlineFilter,
|
|
30
32
|
vtkPaintFilter: vtkPaintFilter,
|
|
31
33
|
vtkScalarToRGBA: vtkScalarToRGBA,
|
|
@@ -3,7 +3,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
3
3
|
import macro from '../../macros.js';
|
|
4
4
|
import vtkPolyData from '../../Common/DataModel/PolyData.js';
|
|
5
5
|
import vtkMatrixBuilder from '../../Common/Core/MatrixBuilder.js';
|
|
6
|
-
import {
|
|
6
|
+
import { x as multiplyScalar } from '../../Common/Core/Math/index.js';
|
|
7
7
|
|
|
8
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import macro from '../../macros.js';
|
|
2
2
|
import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
3
|
-
import { l as normalize, d as dot, j as cross, f as distance2BetweenPoints,
|
|
3
|
+
import { l as normalize, d as dot, j as cross, f as distance2BetweenPoints, z as determinant3x3 } from '../../Common/Core/Math/index.js';
|
|
4
4
|
import vtkPolyData from '../../Common/DataModel/PolyData.js';
|
|
5
5
|
|
|
6
6
|
var vtkErrorMacro = macro.vtkErrorMacro; // ----------------------------------------------------------------------------
|
|
@@ -82,7 +82,7 @@ function vtkKeyboardCameraManipulator(publicAPI, model) {
|
|
|
82
82
|
internal.animationSub = null;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
model.
|
|
85
|
+
model._interactor.cancelAnimation(ANIMATION_REQUESTER);
|
|
86
86
|
|
|
87
87
|
if (internal.cameraModifiedSub) {
|
|
88
88
|
internal.cameraModifiedSub.unsubscribe();
|
|
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
|
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
3
|
import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
|
|
4
4
|
import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
|
|
5
|
-
import { r as radiansFromDegrees,
|
|
5
|
+
import { r as radiansFromDegrees, A as degreesFromRadians } from '../../Common/Core/Math/index.js';
|
|
6
6
|
|
|
7
7
|
// vtkMouseCameraTrackballRollManipulator methods
|
|
8
8
|
// ----------------------------------------------------------------------------
|
|
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
|
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
3
|
import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
|
|
4
4
|
import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
|
|
5
|
-
import {
|
|
5
|
+
import { x as multiplyScalar, d as dot, k as add, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
|
|
6
6
|
|
|
7
7
|
// vtkMouseCameraTrackballRotateManipulator methods
|
|
8
8
|
// ----------------------------------------------------------------------------
|
|
@@ -5,7 +5,7 @@ import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
|
|
|
5
5
|
import vtkInteractorStyleConstants from '../../Rendering/Core/InteractorStyle/Constants.js';
|
|
6
6
|
import vtkMouseCameraUnicamRotateManipulator from './MouseCameraUnicamRotateManipulator.js';
|
|
7
7
|
import macro from '../../macros.js';
|
|
8
|
-
import { g as subtract,
|
|
8
|
+
import { g as subtract, x as multiplyScalar, l as normalize, d as dot, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
|
|
9
9
|
|
|
10
10
|
var States = vtkInteractorStyleConstants.States; // ----------------------------------------------------------------------------
|
|
11
11
|
// vtkMouseCameraUnicamManipulator methods
|
|
@@ -10,7 +10,7 @@ import vtkSphereSource from '../../Filters/Sources/SphereSource.js';
|
|
|
10
10
|
import { FieldAssociations } from '../../Common/DataModel/DataSet/Constants.js';
|
|
11
11
|
import { mat4, vec3 } from 'gl-matrix';
|
|
12
12
|
import macro from '../../macros.js';
|
|
13
|
-
import {
|
|
13
|
+
import { B as areEquals, l as normalize, d as dot, C as clampValue, g as subtract, j as cross, x as multiplyScalar, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
|
|
14
14
|
|
|
15
15
|
var States = vtkInteractorStyleConstants.States; // ----------------------------------------------------------------------------
|
|
16
16
|
// vtkMouseCameraUnicamRotateManipulator methods
|
|
@@ -120,7 +120,7 @@ function vtkInteractorStyleImage(publicAPI, model) {
|
|
|
120
120
|
publicAPI.windowLevel = function (renderer, position) {
|
|
121
121
|
model.windowLevelCurrentPosition[0] = position.x;
|
|
122
122
|
model.windowLevelCurrentPosition[1] = position.y;
|
|
123
|
-
var rwi = model.
|
|
123
|
+
var rwi = model._interactor;
|
|
124
124
|
|
|
125
125
|
if (model.currentImageProperty) {
|
|
126
126
|
var size = rwi.getView().getViewportSize(renderer);
|
|
@@ -166,7 +166,7 @@ function vtkInteractorStyleImage(publicAPI, model) {
|
|
|
166
166
|
|
|
167
167
|
|
|
168
168
|
publicAPI.slice = function (renderer, position) {
|
|
169
|
-
var rwi = model.
|
|
169
|
+
var rwi = model._interactor;
|
|
170
170
|
var dy = position.y - model.lastSlicePosition;
|
|
171
171
|
var camera = renderer.getActiveCamera();
|
|
172
172
|
var range = camera.getClippingRange();
|
|
@@ -208,7 +208,7 @@ function vtkInteractorStyleImage(publicAPI, model) {
|
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
var renderer = model.
|
|
211
|
+
var renderer = model._interactor.getCurrentRenderer();
|
|
212
212
|
|
|
213
213
|
if (!renderer) {
|
|
214
214
|
return;
|
|
@@ -91,7 +91,8 @@ function vtkInteractorStyleMPRSlice(publicAPI, model) {
|
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
publicAPI.handleMouseMove = macro.chain(publicAPI.handleMouseMove, function () {
|
|
94
|
-
var renderer = model.
|
|
94
|
+
var renderer = model._interactor.getCurrentRenderer();
|
|
95
|
+
|
|
95
96
|
var camera = renderer.getActiveCamera();
|
|
96
97
|
var dist = camera.getDistance();
|
|
97
98
|
camera.setClippingRange(dist, dist + 0.1);
|
|
@@ -100,7 +101,8 @@ function vtkInteractorStyleMPRSlice(publicAPI, model) {
|
|
|
100
101
|
|
|
101
102
|
publicAPI.setVolumeMapper = function (mapper) {
|
|
102
103
|
if (superSetVolumeMapper(mapper)) {
|
|
103
|
-
var renderer = model.
|
|
104
|
+
var renderer = model._interactor.getCurrentRenderer();
|
|
105
|
+
|
|
104
106
|
var camera = renderer.getActiveCamera();
|
|
105
107
|
|
|
106
108
|
if (mapper) {
|
|
@@ -114,7 +116,8 @@ function vtkInteractorStyleMPRSlice(publicAPI, model) {
|
|
|
114
116
|
};
|
|
115
117
|
|
|
116
118
|
publicAPI.getSlice = function () {
|
|
117
|
-
var renderer = model.
|
|
119
|
+
var renderer = model._interactor.getCurrentRenderer();
|
|
120
|
+
|
|
118
121
|
var camera = renderer.getActiveCamera();
|
|
119
122
|
var sliceNormal = publicAPI.getSliceNormal(); // Get rotation matrix from normal to +X (since bounds is aligned to XYZ)
|
|
120
123
|
|
|
@@ -125,7 +128,8 @@ function vtkInteractorStyleMPRSlice(publicAPI, model) {
|
|
|
125
128
|
};
|
|
126
129
|
|
|
127
130
|
publicAPI.setSlice = function (slice) {
|
|
128
|
-
var renderer = model.
|
|
131
|
+
var renderer = model._interactor.getCurrentRenderer();
|
|
132
|
+
|
|
129
133
|
var camera = renderer.getActiveCamera();
|
|
130
134
|
|
|
131
135
|
if (model.volumeMapper) {
|
|
@@ -187,7 +191,8 @@ function vtkInteractorStyleMPRSlice(publicAPI, model) {
|
|
|
187
191
|
|
|
188
192
|
publicAPI.getSliceNormal = function () {
|
|
189
193
|
if (model.volumeMapper) {
|
|
190
|
-
var renderer = model.
|
|
194
|
+
var renderer = model._interactor.getCurrentRenderer();
|
|
195
|
+
|
|
191
196
|
var camera = renderer.getActiveCamera();
|
|
192
197
|
return camera.getDirectionOfProjection();
|
|
193
198
|
}
|
|
@@ -197,7 +202,8 @@ function vtkInteractorStyleMPRSlice(publicAPI, model) {
|
|
|
197
202
|
|
|
198
203
|
|
|
199
204
|
publicAPI.setSliceNormal = function () {
|
|
200
|
-
var renderer = model.
|
|
205
|
+
var renderer = model._interactor.getCurrentRenderer();
|
|
206
|
+
|
|
201
207
|
var camera = renderer.getActiveCamera();
|
|
202
208
|
|
|
203
209
|
for (var _len = arguments.length, normal = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -307,8 +307,10 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
model.currentManipulator.startInteraction();
|
|
310
|
-
model.currentManipulator.onButtonDown(model.
|
|
311
|
-
|
|
310
|
+
model.currentManipulator.onButtonDown(model._interactor, callData.pokedRenderer, callData.position);
|
|
311
|
+
|
|
312
|
+
model._interactor.requestAnimation(publicAPI.onButtonDown);
|
|
313
|
+
|
|
312
314
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
313
315
|
} else {
|
|
314
316
|
vtkDebugMacro('No manipulator found');
|
|
@@ -371,10 +373,12 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
371
373
|
}
|
|
372
374
|
|
|
373
375
|
if (model.currentManipulator.getButton && model.currentManipulator.getButton() === button) {
|
|
374
|
-
model.currentManipulator.onButtonUp(model.
|
|
376
|
+
model.currentManipulator.onButtonUp(model._interactor);
|
|
375
377
|
model.currentManipulator.endInteraction();
|
|
376
378
|
model.currentManipulator = null;
|
|
377
|
-
|
|
379
|
+
|
|
380
|
+
model._interactor.cancelAnimation(publicAPI.onButtonDown);
|
|
381
|
+
|
|
378
382
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
379
383
|
}
|
|
380
384
|
}; //-------------------------------------------------------------------------
|
|
@@ -399,9 +403,11 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
399
403
|
|
|
400
404
|
if (manipulator) {
|
|
401
405
|
model.currentWheelManipulator = manipulator;
|
|
402
|
-
model.currentWheelManipulator.onStartScroll(model.
|
|
406
|
+
model.currentWheelManipulator.onStartScroll(model._interactor, callData.pokedRenderer, callData.spinY);
|
|
403
407
|
model.currentWheelManipulator.startInteraction();
|
|
404
|
-
|
|
408
|
+
|
|
409
|
+
model._interactor.requestAnimation(publicAPI.handleStartMouseWheel);
|
|
410
|
+
|
|
405
411
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
406
412
|
} else {
|
|
407
413
|
vtkDebugMacro('No manipulator found');
|
|
@@ -415,10 +421,12 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
415
421
|
}
|
|
416
422
|
|
|
417
423
|
if (model.currentWheelManipulator.onEndScroll) {
|
|
418
|
-
model.currentWheelManipulator.onEndScroll(model.
|
|
424
|
+
model.currentWheelManipulator.onEndScroll(model._interactor);
|
|
419
425
|
model.currentWheelManipulator.endInteraction();
|
|
420
426
|
model.currentWheelManipulator = null;
|
|
421
|
-
|
|
427
|
+
|
|
428
|
+
model._interactor.cancelAnimation(publicAPI.handleStartMouseWheel);
|
|
429
|
+
|
|
422
430
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
423
431
|
}
|
|
424
432
|
}; //-------------------------------------------------------------------------
|
|
@@ -426,7 +434,7 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
426
434
|
|
|
427
435
|
publicAPI.handleMouseWheel = function (callData) {
|
|
428
436
|
if (model.currentWheelManipulator && model.currentWheelManipulator.onScroll) {
|
|
429
|
-
model.currentWheelManipulator.onScroll(model.
|
|
437
|
+
model.currentWheelManipulator.onScroll(model._interactor, callData.pokedRenderer, callData.spinY, model.cachedMousePosition);
|
|
430
438
|
publicAPI.invokeInteractionEvent(INTERACTION_EVENT);
|
|
431
439
|
}
|
|
432
440
|
}; //-------------------------------------------------------------------------
|
|
@@ -436,7 +444,7 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
436
444
|
model.cachedMousePosition = callData.position;
|
|
437
445
|
|
|
438
446
|
if (model.currentManipulator && model.currentManipulator.onMouseMove) {
|
|
439
|
-
model.currentManipulator.onMouseMove(model.
|
|
447
|
+
model.currentManipulator.onMouseMove(model._interactor, callData.pokedRenderer, callData.position);
|
|
440
448
|
publicAPI.invokeInteractionEvent(INTERACTION_EVENT);
|
|
441
449
|
}
|
|
442
450
|
}; //-------------------------------------------------------------------------
|
|
@@ -448,7 +456,7 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
448
456
|
model.keyboardManipulators.filter(function (m) {
|
|
449
457
|
return m.onKeyPress;
|
|
450
458
|
}).forEach(function (manipulator) {
|
|
451
|
-
manipulator.onKeyPress(model.
|
|
459
|
+
manipulator.onKeyPress(model._interactor, callData.pokedRenderer, callData.key);
|
|
452
460
|
publicAPI.invokeInteractionEvent(INTERACTION_EVENT);
|
|
453
461
|
});
|
|
454
462
|
}; //-------------------------------------------------------------------------
|
|
@@ -458,7 +466,7 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
458
466
|
model.keyboardManipulators.filter(function (m) {
|
|
459
467
|
return m.onKeyDown;
|
|
460
468
|
}).forEach(function (manipulator) {
|
|
461
|
-
manipulator.onKeyDown(model.
|
|
469
|
+
manipulator.onKeyDown(model._interactor, callData.pokedRenderer, callData.key);
|
|
462
470
|
publicAPI.invokeInteractionEvent(INTERACTION_EVENT);
|
|
463
471
|
});
|
|
464
472
|
}; //-------------------------------------------------------------------------
|
|
@@ -468,7 +476,7 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
468
476
|
model.keyboardManipulators.filter(function (m) {
|
|
469
477
|
return m.onKeyUp;
|
|
470
478
|
}).forEach(function (manipulator) {
|
|
471
|
-
manipulator.onKeyUp(model.
|
|
479
|
+
manipulator.onKeyUp(model._interactor, callData.pokedRenderer, callData.key);
|
|
472
480
|
publicAPI.invokeInteractionEvent(INTERACTION_EVENT);
|
|
473
481
|
});
|
|
474
482
|
}; //-------------------------------------------------------------------------
|
|
@@ -484,12 +492,13 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
484
492
|
var manipulator = model.gestureManipulators[count];
|
|
485
493
|
|
|
486
494
|
if (manipulator && manipulator.isPinchEnabled()) {
|
|
487
|
-
manipulator.onStartPinch(model.
|
|
495
|
+
manipulator.onStartPinch(model._interactor, callData.scale);
|
|
488
496
|
manipulator.startInteraction();
|
|
489
497
|
}
|
|
490
498
|
}
|
|
491
499
|
|
|
492
|
-
model.
|
|
500
|
+
model._interactor.requestAnimation(publicAPI.handleStartPinch);
|
|
501
|
+
|
|
493
502
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
494
503
|
}; //--------------------------------------------------------------------------
|
|
495
504
|
|
|
@@ -502,12 +511,13 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
502
511
|
var manipulator = model.gestureManipulators[count];
|
|
503
512
|
|
|
504
513
|
if (manipulator && manipulator.isPinchEnabled()) {
|
|
505
|
-
manipulator.onEndPinch(model.
|
|
514
|
+
manipulator.onEndPinch(model._interactor);
|
|
506
515
|
manipulator.endInteraction();
|
|
507
516
|
}
|
|
508
517
|
}
|
|
509
518
|
|
|
510
|
-
model.
|
|
519
|
+
model._interactor.cancelAnimation(publicAPI.handleStartPinch);
|
|
520
|
+
|
|
511
521
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
512
522
|
}; //----------------------------------------------------------------------------
|
|
513
523
|
|
|
@@ -520,12 +530,13 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
520
530
|
var manipulator = model.gestureManipulators[count];
|
|
521
531
|
|
|
522
532
|
if (manipulator && manipulator.isRotateEnabled()) {
|
|
523
|
-
manipulator.onStartRotate(model.
|
|
533
|
+
manipulator.onStartRotate(model._interactor, callData.rotation);
|
|
524
534
|
manipulator.startInteraction();
|
|
525
535
|
}
|
|
526
536
|
}
|
|
527
537
|
|
|
528
|
-
model.
|
|
538
|
+
model._interactor.requestAnimation(publicAPI.handleStartRotate);
|
|
539
|
+
|
|
529
540
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
530
541
|
}; //--------------------------------------------------------------------------
|
|
531
542
|
|
|
@@ -538,12 +549,13 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
538
549
|
var manipulator = model.gestureManipulators[count];
|
|
539
550
|
|
|
540
551
|
if (manipulator && manipulator.isRotateEnabled()) {
|
|
541
|
-
manipulator.onEndRotate(model.
|
|
552
|
+
manipulator.onEndRotate(model._interactor);
|
|
542
553
|
manipulator.endInteraction();
|
|
543
554
|
}
|
|
544
555
|
}
|
|
545
556
|
|
|
546
|
-
model.
|
|
557
|
+
model._interactor.cancelAnimation(publicAPI.handleStartRotate);
|
|
558
|
+
|
|
547
559
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
548
560
|
}; //----------------------------------------------------------------------------
|
|
549
561
|
|
|
@@ -556,12 +568,13 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
556
568
|
var manipulator = model.gestureManipulators[count];
|
|
557
569
|
|
|
558
570
|
if (manipulator && manipulator.isPanEnabled()) {
|
|
559
|
-
manipulator.onStartPan(model.
|
|
571
|
+
manipulator.onStartPan(model._interactor, callData.translation);
|
|
560
572
|
manipulator.startInteraction();
|
|
561
573
|
}
|
|
562
574
|
}
|
|
563
575
|
|
|
564
|
-
model.
|
|
576
|
+
model._interactor.requestAnimation(publicAPI.handleStartPan);
|
|
577
|
+
|
|
565
578
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
566
579
|
}; //--------------------------------------------------------------------------
|
|
567
580
|
|
|
@@ -574,12 +587,13 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
574
587
|
var manipulator = model.gestureManipulators[count];
|
|
575
588
|
|
|
576
589
|
if (manipulator && manipulator.isPanEnabled()) {
|
|
577
|
-
manipulator.onEndPan(model.
|
|
590
|
+
manipulator.onEndPan(model._interactor);
|
|
578
591
|
manipulator.endInteraction();
|
|
579
592
|
}
|
|
580
593
|
}
|
|
581
594
|
|
|
582
|
-
model.
|
|
595
|
+
model._interactor.cancelAnimation(publicAPI.handleStartPan);
|
|
596
|
+
|
|
583
597
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
584
598
|
}; //----------------------------------------------------------------------------
|
|
585
599
|
|
|
@@ -592,7 +606,7 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
592
606
|
var manipulator = model.gestureManipulators[count];
|
|
593
607
|
|
|
594
608
|
if (manipulator && manipulator.isPinchEnabled()) {
|
|
595
|
-
manipulator.onPinch(model.
|
|
609
|
+
manipulator.onPinch(model._interactor, callData.pokedRenderer, callData.scale);
|
|
596
610
|
actionCount++;
|
|
597
611
|
}
|
|
598
612
|
}
|
|
@@ -611,7 +625,7 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
611
625
|
var manipulator = model.gestureManipulators[count];
|
|
612
626
|
|
|
613
627
|
if (manipulator && manipulator.isPanEnabled()) {
|
|
614
|
-
manipulator.onPan(model.
|
|
628
|
+
manipulator.onPan(model._interactor, callData.pokedRenderer, callData.translation);
|
|
615
629
|
actionCount++;
|
|
616
630
|
}
|
|
617
631
|
}
|
|
@@ -630,7 +644,7 @@ function vtkInteractorStyleManipulator(publicAPI, model) {
|
|
|
630
644
|
var manipulator = model.gestureManipulators[count];
|
|
631
645
|
|
|
632
646
|
if (manipulator && manipulator.isRotateEnabled()) {
|
|
633
|
-
manipulator.onRotate(model.
|
|
647
|
+
manipulator.onRotate(model._interactor, callData.pokedRenderer, callData.rotation);
|
|
634
648
|
actionCount++;
|
|
635
649
|
}
|
|
636
650
|
}
|
|
@@ -42,10 +42,10 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
42
42
|
|
|
43
43
|
var action = buttonLeft || buttonMiddle || buttonRight ? 'down' : 'up'; // Fixme x / y
|
|
44
44
|
|
|
45
|
-
var _model$
|
|
46
|
-
_model$
|
|
47
|
-
width = _model$
|
|
48
|
-
height = _model$
|
|
45
|
+
var _model$_interactor$ge = model._interactor.getView().getSizeByReference(),
|
|
46
|
+
_model$_interactor$ge2 = _slicedToArray(_model$_interactor$ge, 2),
|
|
47
|
+
width = _model$_interactor$ge2[0],
|
|
48
|
+
height = _model$_interactor$ge2[1];
|
|
49
49
|
|
|
50
50
|
var _callData$position = callData.position,
|
|
51
51
|
x = _callData$position.x,
|
|
@@ -109,7 +109,8 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
publicAPI.onButtonDown = function (button, callData) {
|
|
112
|
-
model.
|
|
112
|
+
model._interactor.requestAnimation(publicAPI.onButtonDown);
|
|
113
|
+
|
|
113
114
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
114
115
|
publicAPI.invokeRemoteMouseEvent(createRemoteEvent(callData));
|
|
115
116
|
}; //-------------------------------------------------------------------------
|
|
@@ -118,7 +119,8 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
118
119
|
publicAPI.onButtonUp = function (button, callData) {
|
|
119
120
|
publicAPI.invokeRemoteMouseEvent(createRemoteEvent(callData));
|
|
120
121
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
121
|
-
|
|
122
|
+
|
|
123
|
+
model._interactor.cancelAnimation(publicAPI.onButtonDown);
|
|
122
124
|
}; //-------------------------------------------------------------------------
|
|
123
125
|
|
|
124
126
|
|
|
@@ -127,7 +129,9 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
127
129
|
altKey = callData.altKey,
|
|
128
130
|
controlKey = callData.controlKey,
|
|
129
131
|
shiftKey = callData.shiftKey;
|
|
130
|
-
|
|
132
|
+
|
|
133
|
+
model._interactor.requestAnimation(publicAPI.handleStartMouseWheel);
|
|
134
|
+
|
|
131
135
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
132
136
|
publicAPI.invokeRemoteWheelEvent(_objectSpread({
|
|
133
137
|
type: 'StartMouseWheel',
|
|
@@ -159,7 +163,9 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
159
163
|
publicAPI.invokeRemoteWheelEvent(_objectSpread({
|
|
160
164
|
type: 'EndMouseWheel'
|
|
161
165
|
}, model.remoteEventAddOn));
|
|
162
|
-
|
|
166
|
+
|
|
167
|
+
model._interactor.cancelAnimation(publicAPI.handleStartMouseWheel);
|
|
168
|
+
|
|
163
169
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
164
170
|
}; //-------------------------------------------------------------------------
|
|
165
171
|
|
|
@@ -185,7 +191,9 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
185
191
|
publicAPI.handleStartPinch = function (callData) {
|
|
186
192
|
publicAPI.startDolly();
|
|
187
193
|
var scale = callData.scale;
|
|
188
|
-
|
|
194
|
+
|
|
195
|
+
model._interactor.requestAnimation(publicAPI.handleStartPinch);
|
|
196
|
+
|
|
189
197
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
190
198
|
publicAPI.invokeRemoteGestureEvent(_objectSpread({
|
|
191
199
|
type: 'StartPinch',
|
|
@@ -208,7 +216,9 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
208
216
|
publicAPI.invokeRemoteGestureEvent(_objectSpread({
|
|
209
217
|
type: 'EndPinch'
|
|
210
218
|
}, model.remoteEventAddOn));
|
|
211
|
-
|
|
219
|
+
|
|
220
|
+
model._interactor.cancelAnimation(publicAPI.handleStartPinch);
|
|
221
|
+
|
|
212
222
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
213
223
|
}; //----------------------------------------------------------------------------
|
|
214
224
|
|
|
@@ -216,7 +226,9 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
216
226
|
publicAPI.handleStartRotate = function (callData) {
|
|
217
227
|
publicAPI.startRotate();
|
|
218
228
|
var rotation = callData.rotation;
|
|
219
|
-
|
|
229
|
+
|
|
230
|
+
model._interactor.requestAnimation(publicAPI.handleStartRotate);
|
|
231
|
+
|
|
220
232
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
221
233
|
publicAPI.invokeRemoteGestureEvent(_objectSpread({
|
|
222
234
|
type: 'StartRotate',
|
|
@@ -239,7 +251,9 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
239
251
|
publicAPI.invokeRemoteGestureEvent(_objectSpread({
|
|
240
252
|
type: 'EndRotate'
|
|
241
253
|
}, model.remoteEventAddOn));
|
|
242
|
-
|
|
254
|
+
|
|
255
|
+
model._interactor.cancelAnimation(publicAPI.handleStartRotate);
|
|
256
|
+
|
|
243
257
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
244
258
|
}; //----------------------------------------------------------------------------
|
|
245
259
|
|
|
@@ -247,7 +261,9 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
247
261
|
publicAPI.handleStartPan = function (callData) {
|
|
248
262
|
publicAPI.startPan();
|
|
249
263
|
var translation = callData.translation;
|
|
250
|
-
|
|
264
|
+
|
|
265
|
+
model._interactor.requestAnimation(publicAPI.handleStartPan);
|
|
266
|
+
|
|
251
267
|
publicAPI.invokeStartInteractionEvent(START_INTERACTION_EVENT);
|
|
252
268
|
publicAPI.invokeRemoteGestureEvent(_objectSpread({
|
|
253
269
|
type: 'StartPan',
|
|
@@ -270,7 +286,9 @@ function vtkInteractorStyleRemoteMouse(publicAPI, model) {
|
|
|
270
286
|
publicAPI.invokeRemoteGestureEvent(_objectSpread({
|
|
271
287
|
type: 'EndPan'
|
|
272
288
|
}, model.remoteEventAddOn));
|
|
273
|
-
|
|
289
|
+
|
|
290
|
+
model._interactor.cancelAnimation(publicAPI.handleStartPan);
|
|
291
|
+
|
|
274
292
|
publicAPI.invokeEndInteractionEvent(END_INTERACTION_EVENT);
|
|
275
293
|
};
|
|
276
294
|
} // ----------------------------------------------------------------------------
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import macro from '../../macros.js';
|
|
2
2
|
import vtkInteractorStyle from '../../Rendering/Core/InteractorStyle.js';
|
|
3
3
|
import vtkInteractorStyleConstants from '../../Rendering/Core/InteractorStyle/Constants.js';
|
|
4
|
-
import {
|
|
4
|
+
import { A as degreesFromRadians } from '../../Common/Core/Math/index.js';
|
|
5
5
|
import { Device, Input } from '../../Rendering/Core/RenderWindowInteractor/Constants.js';
|
|
6
6
|
|
|
7
7
|
var States = vtkInteractorStyleConstants.States;
|
|
@@ -200,7 +200,7 @@ function vtkInteractorStyleTrackballCamera(publicAPI, model) {
|
|
|
200
200
|
camera.setFocalPoint(motionVector[0] + viewFocus[0], motionVector[1] + viewFocus[1], motionVector[2] + viewFocus[2]);
|
|
201
201
|
camera.setPosition(motionVector[0] + viewPoint[0], motionVector[1] + viewPoint[1], motionVector[2] + viewPoint[2]);
|
|
202
202
|
|
|
203
|
-
if (model.
|
|
203
|
+
if (model._interactor.getLightFollowCamera()) {
|
|
204
204
|
callData.pokedRenderer.updateLightsGeometryToFollowCamera();
|
|
205
205
|
}
|
|
206
206
|
|
|
@@ -218,7 +218,7 @@ function vtkInteractorStyleTrackballCamera(publicAPI, model) {
|
|
|
218
218
|
|
|
219
219
|
|
|
220
220
|
publicAPI.handleMouseRotate = function (renderer, position) {
|
|
221
|
-
var rwi = model.
|
|
221
|
+
var rwi = model._interactor;
|
|
222
222
|
var dx = position.x - model.previousPosition.x;
|
|
223
223
|
var dy = position.y - model.previousPosition.y;
|
|
224
224
|
var size = rwi.getView().getViewportSize(renderer);
|
|
@@ -251,7 +251,7 @@ function vtkInteractorStyleTrackballCamera(publicAPI, model) {
|
|
|
251
251
|
|
|
252
252
|
|
|
253
253
|
publicAPI.handleMouseSpin = function (renderer, position) {
|
|
254
|
-
var rwi = model.
|
|
254
|
+
var rwi = model._interactor;
|
|
255
255
|
var camera = renderer.getActiveCamera();
|
|
256
256
|
var center = rwi.getView().getViewportCenter(renderer);
|
|
257
257
|
var oldAngle = degreesFromRadians(Math.atan2(model.previousPosition.y - center[1], model.previousPosition.x - center[0]));
|
|
@@ -284,7 +284,7 @@ function vtkInteractorStyleTrackballCamera(publicAPI, model) {
|
|
|
284
284
|
camera.setFocalPoint(motionVector[0] + viewFocus[0], motionVector[1] + viewFocus[1], motionVector[2] + viewFocus[2]);
|
|
285
285
|
camera.setPosition(motionVector[0] + viewPoint[0], motionVector[1] + viewPoint[1], motionVector[2] + viewPoint[2]);
|
|
286
286
|
|
|
287
|
-
if (model.
|
|
287
|
+
if (model._interactor.getLightFollowCamera()) {
|
|
288
288
|
renderer.updateLightsGeometryToFollowCamera();
|
|
289
289
|
}
|
|
290
290
|
}; //----------------------------------------------------------------------------
|
|
@@ -292,7 +292,7 @@ function vtkInteractorStyleTrackballCamera(publicAPI, model) {
|
|
|
292
292
|
|
|
293
293
|
publicAPI.handleMouseDolly = function (renderer, position) {
|
|
294
294
|
var dy = position.y - model.previousPosition.y;
|
|
295
|
-
var rwi = model.
|
|
295
|
+
var rwi = model._interactor;
|
|
296
296
|
var center = rwi.getView().getViewportCenter(renderer);
|
|
297
297
|
var dyf = model.motionFactor * dy / center[1];
|
|
298
298
|
publicAPI.dollyByFactor(renderer, Math.pow(1.1, dyf));
|
|
@@ -322,7 +322,7 @@ function vtkInteractorStyleTrackballCamera(publicAPI, model) {
|
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
if (model.
|
|
325
|
+
if (model._interactor.getLightFollowCamera()) {
|
|
326
326
|
renderer.updateLightsGeometryToFollowCamera();
|
|
327
327
|
}
|
|
328
328
|
};
|