Closed AnonymousSausage77 closed 1 month ago
This feature/bug fix has been released in version 5.11.0.
@AnonymousSausage77 please check https://github.com/mistic100/Photo-Sphere-Viewer/issues/1460#issuecomment-2424903963 this might be a better solution
Describe the feature
I need a way to force PSV to re-fetch a node when using Virtual Tour. Currently, I have changed the data of a virtual tour node and want to refetch it without changing which node is currently being looked at, but neither:
tour.setCurrentNode(nodeId)
nortour.init();
norviewer.needsUpdate();
trigger a refetch of the existing node.For example, let's say i have changed the direction of the virtual tour links (arrows) of currently-viewed virtual tour node, or perhaps I have changed the offset of the pano image, if I want to force a refetch to update the current node's configuration I don't believe there is a way to do this without deleting and re-initialising the entire viewer (let me know if there is!).
Maybe something like:
would be cool.
Alternatives you've considered
Until this point, I was recreating the entire viewer; I was calling destroy on PSV and then recreating it with the updated settings to trigger a refetch of all settings. This had its own issues, including a webgl context overflow and is just inefficient.
Additional context
I need this because the pano viewer is acting as a frontend to give users the ability to preview their changes in real time.
I am using: