Comments (11)
I can see one problem: flow-math is immutable, and React uses mutable vectors.
from engine.
Does a generic API make it easier for developers writing for the platform? If so, how much easier?
from engine.
@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.
@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.
Alright, @Wolf480pl do you have a better/different idea?
from engine.
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.
Is your plan to ever switch React to immutable vectors or is that borderline unrealistic?
from engine.
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.
Comments: https://github.com/flow/flow-engine/tree/nophysicsapi
from engine.
@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.
In current now
from engine.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engine.