Git Product home page Git Product logo

Comments (11)

Wolf480pl avatar Wolf480pl commented on August 18, 2024

I can see one problem: flow-math is immutable, and React uses mutable vectors.

from engine.

olliestanley avatar olliestanley commented on August 18, 2024

Does a generic API make it easier for developers writing for the platform? If so, how much easier?

from engine.

kitskub avatar kitskub commented on August 18, 2024

@Wolf480pl the point is we'd still have the ReactConverter stuff in math. But yes, that is a small oddity.

@DziNeIT it CAN. However, especially with React's latest update, much of the PhysicsComponent doesn't take advantage of the latest changes. And seeing as we don't really have a "team" to devote just to keeping the physics stuff updated/clean, it will lag behind and make things messy.

from engine.

olliestanley avatar olliestanley commented on August 18, 2024

@kitskub If the added ease for the developer comes with the consequence of not being able to provide up-to-date versions of React without a whole load of effort then I'm with you on this one. Like you say, it would be plausible if you had a big team but that's just not the case.

from engine.

kitskub avatar kitskub commented on August 18, 2024

Alright, @Wolf480pl do you have a better/different idea?

from engine.

DDoS avatar DDoS commented on August 18, 2024

React isn't versioned right now, but the upstream is, so it would be easy to do, just follow that.
I don't see any reason why React would need an API over it. Unlike certain things, such as graphics, it should work on all platform consistently (since it doesn't have any dependencies, graphics on the other hand depend on OpenGL, which varies often between 2.0 and 3.2).
The math is the only annoying thing to deal with since we're dealing with different classes, but the conventions are mostly the same.

from engine.

Zidane avatar Zidane commented on August 18, 2024

@DDoS

Is your plan to ever switch React to immutable vectors or is that borderline unrealistic?

from engine.

kitskub avatar kitskub commented on August 18, 2024

@Zidane

I'm pretty sure that it was decided to keep React using mutable vectors to keep the diff from the upstream as small as possible as well as decrease the performance hindrance from object creation.

from engine.

kitskub avatar kitskub commented on August 18, 2024

Comments: https://github.com/flow/flow-engine/tree/nophysicsapi

from engine.

DDoS avatar DDoS commented on August 18, 2024

@kitskub Right, except React doesn't make use that much of the mutability of the vectors to reuse them, but it does so in a few key areas that makes switching really difficult.
I actually tried debugging the last attempt for 1 week before giving up, having made no progress.

from engine.

kitskub avatar kitskub commented on August 18, 2024

In current now

from engine.

Related Issues (6)

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.