Giter VIP home page Giter VIP logo

Comments (13)

ivanpopelyshev avatar ivanpopelyshev commented on August 26, 2024

Something like that:

spine.state.tracks[0].time = ...
spine.state.update(0);

may be

spine.update(0)

I'm not sure :)

from spine.

macguffin avatar macguffin commented on August 26, 2024

Thanks for the pointer. :)
On Mon, 2 Nov 2015 at 09:50, Ivan Popelyshev [email protected]
wrote:

Something like that:

spine.state.tracks[0].time = ...
spine.state.update(0);


Reply to this email directly or view it on GitHub
#64 (comment).

from spine.

macguffin avatar macguffin commented on August 26, 2024

spine.state.tracks[0].time is null in this animation. I've just cloned the repository so I will have a look round.

Do you have any idea what happens if animating on a crappy device, will frames be skipped?

I'm basically using events to drive other bits of code and and wondering if there is a possibility that these events could be missed, or skipped over.

The gotoAndStop(time or frame) would be a safety measure to force the animation to the correct frame when it has finished.

Thanks

from spine.

ivanpopelyshev avatar ivanpopelyshev commented on August 26, 2024

Did you start the animation first?

state.setAnimationByName(0, "animation1", true);

from spine.

ivanpopelyshev avatar ivanpopelyshev commented on August 26, 2024

Events wont be missed, that's for sure.

from spine.

macguffin avatar macguffin commented on August 26, 2024

That's great to know!

from spine.

macguffin avatar macguffin commented on August 26, 2024

I am starting the animation just not looping it

state.setAnimationByName(0, "animation1", false);

from spine.

ivanpopelyshev avatar ivanpopelyshev commented on August 26, 2024

When animation is complete, tracks[0] will dissappear. Are you sure that tracks[0] is defined when you do that thing with time?

from spine.

macguffin avatar macguffin commented on August 26, 2024

Ok that will be what it is.

I think maybe I'm being over cautious. If events will definitely fire and the animation will always show its final frame that should be enough.

When I used another spine runtime with createjs in the past I had an issue with a frame not being shown correctly when stopping the animation. I would have to manually set the delta time to be sure. I haven't had anything like that with your stuff.

Thanks for your help and your time.
BTW do you have an official forum for these sorts of questions?

from spine.

ivanpopelyshev avatar ivanpopelyshev commented on August 26, 2024

Posting the issue here is fastest way of finding solution for your problem :)

Pixijs subforum on html5gamedevs: http://www.html5gamedevs.com/forum/15-pixijs/

from spine.

macguffin avatar macguffin commented on August 26, 2024

Thanks

Last question I promise :)

Can you pause the animation via an event?
Is there something that would do the equivalent of:

spine.state.pause();

from spine.

ivanpopelyshev avatar ivanpopelyshev commented on August 26, 2024
spine.autoUpdate = false;

stops all animations.

You can update them manually by using

spine.update(dt); //dt is in millis

from spine.

macguffin avatar macguffin commented on August 26, 2024

Awesome thanks very much that is just what I need.

from spine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.