Jump to content
Search Community

Klaas

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Klaas's Achievements

  1. This is perfect. I've tried both the "sticky" workaround and the pinSpacer approach. Both work like a charm, thank you very much.
  2. Hi, I am trying to work with a Sketchfab model, a Scrolltrigger and pinning. My goal is that while the 3D model is pinned, the camera is animated when scrolling. I've got all the parts built, but now I'm running into an issue with pinning. In short: when I pin the div that contains the 3D model, the 3d model is reloaded and I lose the connection to the 3D model API. In the example codepen you can see this happening. The model starts loading twice. The probable cause is that I create the Scrolltrigger with pin after the Sketchfab model has initially loaded. The reason I do this, is that I need to add information from the 3D model in the timeline of the Scrolltrigger. If you remove the pin, the model loads once, as expected. I believe the issue boils down to: I need the 3D model to be ready before creating the Scrolltrigger, but the pin in the Scrolltrigger will refresh the 3D model. My question: is there a way to avoid this reload while keeping the Scrolltrigger with pin inside the viewerready event. Or can I add a timeline and onUpdate event to a Scrolltrigger after it has been created?
  3. @GreenSock that's fantastic. It works great. Thanks a lot. And @Rodrigo thanks for welcoming to the forum. Your reaction speed is impressive.
  4. I am using GSAP with Sketchfab (webgl 3d models). This works great! I have got one scenario that I need some help with. I'm using the onUpdate callback of my timeline to manipulate the 3D model and camera. This also includes making a render of the 3D model. The renderer returns a promise as it takes a little bit of time. I'd like the timeline to wait for the promise to resolve before continuing with the timeline. As if I'm stepping through the animation, frame by frame. Is this possible? In the codepen I've substituted the rendering of a Sketchfab model with a setTimeout in a Promise. I hope that illustrates the issue. The example uses a timeout of 200ms. I'd like the timeline to wait for 200ms before stepping through the animation.
×
×
  • Create New...