Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Transition Animation using setPanorama in Photo Sphere Viewer #1332

Closed
luisjm1992 opened this issue Jun 20, 2024 · 3 comments
Closed

Comments

@luisjm1992
Copy link

luisjm1992 commented Jun 20, 2024

Describe your problem

I'm experiencing an issue with the transition animation when changing the panoramic image using the setPanorama method in Photo Sphere Viewer. The problem is that the loading logo appears in the center, and then the image changes without the smooth transition I expected.

const viewer = new Viewer({
    container: 'viewer',
    loadingImg: baseUrl,
    defaultYaw: '100deg',
    plugins: [
        MarkersPlugin,
        [VirtualTourPlugin, {
            positionMode: 'gps',
            renderMode: '3d',
            startNodeId: nodes[0].id,
            preload: true,
            arrowPosition: 'bottom',
            dataMode: 'client',
            nodes: nodes
        }]
    ]
});

viewer.setPanorama(panoramaUrl, {
    transition: {
        duration: 1000,
        loader: true,
    },
    speed: '20rpm',
    position: { yaw: 0, pitch: 0 },
    caption: 'The new caption'
})
.then(() => console.log('Update complete!'))
.catch((error) => console.error('Error loading panorama:', error));

I've verified that the image URL is correct and configured the animation and speed options according to the documentation. However, the loading logo appears, and then the image changes abruptly without a smooth transition.

someone provide an example of how to achieve a smooth transition when changing panoramic images using setPanorama in Photo Sphere Viewer?

Thank!

Online demo URL

No response

Photo Sphere Viewer version

5.7.4

Plugins loaded

VirtualTourPlugin MarkersPlugin

Additional context

No response

@mistic100
Copy link
Owner

If you are using the virtual tour plugin you should not use setPanorama API, you should use virtualTour.setCurrentNode

@luisjm1992
Copy link
Author

If you are using the virtual tour plugin you should not use setPanorama API, you should use virtualTour.setCurrentNode

Thank you very much, I'm going to implement it.

Copy link

github-actions bot commented Jul 3, 2024

This issue has been automatically marked as stale because not enough information was provided. It will be closed if no further activity occurs.

@github-actions github-actions bot added the Stale label Jul 3, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment