SpineBoy

  • 10 juin 2014
  • Inscrit 21 mai 2014
  • martinr a écrit

    Just thought of something - while the solution of setting key frames at frame 0 works for most timelines, it would not work for event timelines. The event timeline seems like it would need a redo in order to work with a reversed animation. Actually, the event timeline would fire all events after lastTime every frame for reversed animations:

    if (lastTime > time) { // Fire events after last time for looped animations.
             this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha);
             lastTime = -1;
    

    I would like this fixed too 🙂

  • rosme a écrit

    Thanks, no video yet. Maybe I will shoot one with my youngest kid.

    That escalated quickly 😉

  • Hello,

    I've encountered some odd behavior with the JS runtime, while making an animation which a scale of 0,0 in setup pose.
    When loading the bones for a skeleton with JS runtime, it uses the following code at line 1160 and 1161:

    boneData.scaleX = boneMap["scaleX"] || 1;
    boneData.scaleY = boneMap["scaleY"] || 1;
    

    and it also does the same with attachments at line 1239 and 1240:

    attachment.scaleX = map["scaleX"] || 1;
    attachment.scaleY = map["scaleY"] || 1;
    

    That means with the JS runtime (haven't checked the others), that it is not possible to make a "hidden" bone or attachment with a scale of 0,0.
    I think a better solution would be to change the code to the following:

    boneData.scaleX = boneMap["scaleX"] != null ? boneMap["scaleX"] : 1;
    boneData.scaleY = boneMap["scaleY"] != null ? boneMap["scaleY"] : 1;
    
    attachment.scaleX = map["scaleX"] != null ? map["scaleX"] : 1;
    attachment.scaleY = map["scaleY"] != null ? map["scaleY"] : 1;
    

    Keep up the good work 🙂

    Regards,
    SpineBoy