Jump to content

Mr P

  • Posts

  • Joined

  • Last visited

Mr P's Achievements



  1. Mr P

    Exporting timelines

    Ahh well spotted.. though I don't think this is the only issue in the above example as I am only using the json stringify on the timeline to display the object, not changging it. However you are right I am going to run into this exact issue later on with this approach. The way I see it, the easiest course of action for me here is to: save the timeline obj with stringfy clear the timeline re run the tween on the timline using the saved timeline data
  2. Mr P

    Exporting timelines

    First of all thanks for the answers, once I collected the children I noticed the target id for the tweens were undefined [as you predicted], so to resolve this I gave the fabric objects ids. Then when I collected the tweens up again the target ids were correctly matched with the id that I was just after creating (great how that just worked). Now my question is when I clear the canvas and then reload the canvas with the same obj (instantly) without any changes to the timeline, should it not simply work ? I checked the tweens and its still had the same target ids If not is the solution you are suggesting to iterate through the children and rerun the tweens on the fabric objects ? I made a simpler codepen if its any help; As you can see once you save and reload the canvas, the timeline doesn't work. However the timeline obj is unchanged To reproduce: Display timeline object Pause the timeline Save the canvas (it also reloads it after 1 sec) Try to play the timeline again (displaying the timeline obj you can see its unchanged) Thanks in advance
  3. Mr P

    Exporting timelines

    Ok my question is sort of related to this so just put it out there for reference: https://greensock.com/forums/topic/14782-exportimport-timelinestweens-to-json/ I have been using fabric.js with GSAP to create an app to make animations. I have run into a problem where i need to save animation in the db. I am saving my canvas as a JSON. Then the way i went about saving the saving the timeline is by just saving the whole timeline object. I think the saving is working (tell me if I am wrong?) but I think its the fact that the timeline doesn't see the reloaded canvas and its objects as the same. ?? If so what about the ideal solution here. Btw I am very new to GSAP and I am using for my project and love it so far. The fact that I am new I could be missing something very obvious and so far the forums have been helpful with the answers already up and now I am hoping someone can help me with my mine. Thanks in Advance. Regards, Mr P