Giter Site home page Giter Site logo

Comments (4)

macroing avatar macroing commented on May 24, 2024

I just added support for animations to the GPU-renderer. It does not seem to work as expected in the CPU-renderer, though.

The Scene class contains an addSceneObserver(SceneObserver) method. The SceneObserver interface now contains an onUpdate(Scene, float) method that can be implemented. You could use the AbstractSceneObserver class and only override that method, instead of implementing them all.

I'm not sure if this could be used by you, or you need something else?

An example scene, called Animation.java, has been added as well.

from dayflower.

madhephaestus avatar madhephaestus commented on May 24, 2024

Thats so awesome!

An observer on the Transforms would be the easiest interface. That said i guess i can look into a stateful update. I will look closely at Animation.java when im back at work tomorrow morning.

from dayflower.

macroing avatar macroing commented on May 24, 2024

The Transform class already has methods to add TransformObservers to it. But they are only called by the Transform class, when it is updated by its methods. You perhaps need some adapter class that delegates changes from the JavaFX Transform to something equivalent in its associated Dayflower Transform? Or even in both directions; from JavaFX to Dayflower and from Dayflower to JavaFX.

from dayflower.

madhephaestus avatar madhephaestus commented on May 24, 2024

In what use case would Dayflower modify a Transform itself? I think one directional binding is sufficient. If your transform implemented

cube.localToSceneTransformProperty().addListener((value, oldValue, newValue) -> {
     System.out.println("Transformation has changed");
});

and applied that in a way that the renderer is aware, then a User can write code to attach the Dayflower transfomr to the JavaFX transform (where animations are targeted by other software to be rendered)

from dayflower.

Related Issues (14)

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.