Giter Club home page Giter Club logo

Comments (5)

jackdoyle avatar jackdoyle commented on September 28, 2024

Hm, do you have a minimal demo you can share that clearly illustrates the issue? I was always under the impression that it didn't make sense to do any kind of animation work inside a worker because the entire point is to have it driven by the requestAnimationFrame loop that's on the main thread, but it looks like there is support for requestAnimationFrame in workers.

I just updated the next release of PixiPlugin so that it doesn't require the window (you can preview the minified version at https://assets.codepen.io/16327/PixiPlugin3.min.js)

And I also made improvements to the core to accommodate this: https://assets.codepen.io/16327/gsap-latest-beta.min.js

If you can share a minimal demo so that we can verify that it works in your particular scenario, that'd be super helpful. Maybe a CodePen or Stackblitz?

from gsap.

jackdoyle avatar jackdoyle commented on September 28, 2024

This should be more doable in the latest release, but let us know if you run into any trouble. A minimal demo would be super helpful.

from gsap.

gabrielecirulli avatar gabrielecirulli commented on September 28, 2024

Thank you for looking into this! For now I decided to use popmotion instead, but in summary what I'm trying to do is render an animated game entirely within a Web Worker using OffscreenCanvas. Pixi.js is capable of running within a Worker, so GSAP would have to run there too in order not to have animation data cross the bridge every frame.

What this essentially means is that the rendering loop runs in a completely isolated thread than the main browser thread. This theoretically helps with performance because your renderer and animations wouldn't have to share resources with other scripts.

from gsap.

jackdoyle avatar jackdoyle commented on September 28, 2024

Thanks for the added details. Did you try the latest release of GSAP?

from gsap.

gabrielecirulli avatar gabrielecirulli commented on September 28, 2024

from gsap.

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.