Skip to content

Commit 9df6777

Browse files
author
Alexis Girault
committed
feat(RenderWindowInteractor): trigger start/endAnimation events
1 parent 0564e3d commit 9df6777

File tree

1 file changed

+4
-0
lines changed
  • Sources/Rendering/Core/RenderWindowInteractor

1 file changed

+4
-0
lines changed

Sources/Rendering/Core/RenderWindowInteractor/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const deviceInputMap = {
2020
};
2121

2222
const handledEvents = [
23+
'StartAnimation',
2324
'Animation',
25+
'EndAnimation',
2426
'StartMouseMove',
2527
'MouseMove',
2628
'EndMouseMove',
@@ -264,6 +266,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
264266
model.lastFrameTime = 0.1;
265267
model.lastFrameStart = new Date().getTime();
266268
model.animationRequest = requestAnimationFrame(publicAPI.handleAnimation);
269+
publicAPI.startAnimationEvent();
267270
}
268271
};
269272

@@ -276,6 +279,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
276279
if (model.animationRequest && model.requestAnimationCount === 0) {
277280
cancelAnimationFrame(model.animationRequest);
278281
model.animationRequest = null;
282+
publicAPI.endAnimationEvent();
279283
publicAPI.forceRender();
280284
}
281285
};

0 commit comments

Comments
 (0)