Giter Club home page Giter Club logo

actionbuilder's Introduction

iphone-banner

Hi there ๐Ÿ‘‹ I'm Kuba

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป I'm a highly capable and motivated iOS developer, with back-end engineering experience and a degree in Computer Science, passionate about creating exceptional user experiences.

Take a look at my ๐Ÿ’ผ iOS Developer Portfolio.

actionbuilder's People

Contributors

coughski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

actionbuilder's Issues

Runnables redirected to another node always complete instantly

In the following example, a sequence of runnables is set to run on firstNode: the 1 second duration Fade runnable is redirected to run on secondNode, and then the 1 second duration Scale runnable runs on firstNode.

It would be reasonable to expect that secondNode will fade out over 1 second, and afterwards, firstNode will double in size over 1 second, and that the entire sequence should take 2 seconds total to run.

But that is not how the .changeTarget(to:) modifier currently behaves. Once the fade is redirected to secondNode and begins to execute, that step in the sequence is considered to be complete, and the scale on firstNode will begin, so the 2 nodes will end up animating at the same time. The total duration of the sequence will be around 1 second.

I think the first behavior should be implemented because it simplifies the coordination of animations across multiple nodes. A workaround is to keep nesting redirections, shown in the second block of code, but this is both harder to write and read.

let firstNode = SKNode()
let secondNode = SKNode()

firstNode.run {
  Sequence {
      Fade.out(over: 1)
          .changeTarget(to: secondNode)
      Scale(to: 2, over: 1)
  }
}

Convoluted workaround to implement expected behavior:

firstNode.run {
  Sequence {
    Sequence {
        Fade.out(over: 1)
        Scale(to: 2, over: 1)
            .changeTarget(to: firstNode)
    }
    .changeTarget(to: secondNode)
  }
}

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.