Skip to content

Commit

Permalink
Fix #623 panoData not applied with "transition" method
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jan 22, 2022
1 parent 279f30d commit 2788ef0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/services/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export class Renderer extends AbstractService {
const mesh = this.psv.adapter.createMesh(0.5);
this.psv.adapter.setTexture(mesh, textureData);
this.psv.adapter.setTextureOpacity(mesh, 0);
this.setPanoramaPose(options.panoData, mesh);
this.setPanoramaPose(textureData.panoData, mesh);
this.setSphereCorrection(options.sphereCorrection, group);

// rotate the new sphere to make the target position face the camera
Expand Down Expand Up @@ -335,6 +335,7 @@ export class Renderer extends AbstractService {
easing : 'outCubic',
onTick : (properties) => {
this.psv.adapter.setTextureOpacity(mesh, properties.opacity);
this.psv.adapter.setTextureOpacity(this.mesh, 1 - properties.opacity);

if (zoomProvided) {
this.psv.zoom(properties.zoom);
Expand All @@ -346,7 +347,8 @@ export class Renderer extends AbstractService {
.then(() => {
// remove temp sphere and transfer the texture to the main sphere
this.setTexture(textureData);
this.setPanoramaPose(options.panoData);
this.psv.adapter.setTextureOpacity(this.mesh, 1);
this.setPanoramaPose(textureData.panoData);
this.setSphereCorrection(options.sphereCorrection);

this.scene.remove(group);
Expand Down

0 comments on commit 2788ef0

Please sign in to comment.