Forum Discussion
JoanneChen
3 years agoSuper Hero
Demo: Detective Security Leaks within 360 panorama
I used to love using 2D office layouts for creating learning activities for different course topics. Learners can explore the virtual office and learn to deal with whatever might actually happened i...
CarlaOllero
Community Member
Great example, Joanne! Can you explain how you created the zoom effect?
JoanneChen
3 years agoSuper Hero
At first, I used the zoom function built in SL with the jump to time triggers to create the zoom effect. Though I got that work it would also zoom layers too. So I had to add more triggers to fix it (described in the third point of the article). After I post, one day an idea came to me that since we can use JS to scale an image, maybe it could scale the panorama image too since it is a jpg file. And then I instead SL zoom function with JS code and it works perfectly.
The JS code I used is:
var myElement = document.querySelectorAll("[NAME OF THE PANORAMA IMAGE']");
gsap.to(myElement, {duration: 0.5,scale:2});