Skip to content

Commit

Permalink
fix(SkyboxViewer): fix errors in the SkyboxViewer
Browse files Browse the repository at this point in the history
Update getOpenGLRenderWindow to getAPISpecificRenderWindow

Make sure requestAnimation has a requestor as now required
  • Loading branch information
martinken committed Jul 2, 2021
1 parent 942ce30 commit 3ac4c02
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 3ac4c02

Please sign in to comment.