Giter Club home page Giter Club logo

Comments (2)

jackw01 avatar jackw01 commented on July 28, 2024

Changed the default behavior to reset both time and state when the animation is changed or recompiled since this makes more sense, clarified the README, and added a command-line flag to revert back to the original behavior.

from led-control.

ohthehugemanatee avatar ohthehugemanatee commented on July 28, 2024

Thank you for the amazingly fast response.

May I suggest: the desire to transition smoothly between two animations is a property of the transition, or maybe of the pattern. It's not a global property of the whole execution lifetime. There's a reasonable use case for both (and a mixture of both, which is my own case).

Consider a pattern like "fade to off," or "fade in from end to end". There's no way to implement these if t and prev_state are linked like this.

If it's globally set to blackout at the first cycle, I could check for t==1 and set the color... but I have no access to the previous state, so I don't know what that color is. If it's globally set to preserve prev_state and t, I can't determine time from start of animation to do that progressive fade in.

But if the t value resets and prev_state is preserved, then I have options. I can manually set a blackout at beginning, or just inherit. And I always know my time from animation start.

I suggest that t should always reset at start of pattern/compile (after all, what's the value of a cycle count from execution start?), and the global option should only control if prev_state is zeroed out. In fact the global option could disappear, since the pattern code can manually zero it out.

from led-control.

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.