Skip to content

Commit

Permalink
Merge pull request Kitware#1983 from Kitware/fix_skybox_viewer_issues
Browse files Browse the repository at this point in the history
fix(SkyboxViewer): fix errors in the SkyboxViewer
  • Loading branch information
martinken authored Jul 2, 2021
2 parents 942ce30 + 3ac4c02 commit ee751f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Examples/Applications/SkyboxViewer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function createVisualization(container, mapReader) {
distPass.setCameraCenterX1(-eyeSpacing);
distPass.setCameraCenterX2(eyeSpacing);
distPass.setDelegates([vtkForwardPass.newInstance()]);
fullScreenRenderer.getOpenGLRenderWindow().setRenderPasses([distPass]);
fullScreenRenderer.getAPISpecificRenderWindow().setRenderPasses([distPass]);

// Hide any controller
fullScreenRenderer.setControllerVisibility(false);
Expand Down Expand Up @@ -278,10 +278,10 @@ function createVisualization(container, mapReader) {
mainRenderer.addActor(actor);

// add vr option button if supported
fullScreenRenderer.getOpenGLRenderWindow().onHaveVRDisplay(() => {
fullScreenRenderer.getApiSpecificRenderWindow().onHaveVRDisplay(() => {
if (
fullScreenRenderer.getOpenGLRenderWindow().getVrDisplay().capabilities
.canPresent
fullScreenRenderer.getApiSpecificRenderWindow().getVrDisplay()
.capabilities.canPresent
) {
const button = document.createElement('button');
button.style.position = 'absolute';
Expand Down
4 changes: 2 additions & 2 deletions Sources/Interaction/Misc/DeviceOrientationToCamera/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function addCameraToSynchronize(
listeners.push(listener);

if (orientation.update) {
listener.renderWindowInteractor.requestAnimation();
listener.renderWindowInteractor.requestAnimation(listener);
}

return listenerId;
Expand All @@ -100,7 +100,7 @@ function removeCameraToSynchronize(id, cancelAnimation = true) {
if (listener) {
listener.subscription.unsubscribe();
if (cancelAnimation) {
listener.renderWindowInteractor.cancelAnimation();
listener.renderWindowInteractor.cancelAnimation(listener);
}
}
listeners[id] = null;
Expand Down

0 comments on commit ee751f0

Please sign in to comment.