-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add world or scene as a root ECS object #309
Comments
If we would get rid of component constructors and allow const lineBuilder = world.entity({ //OK
transform: { positions: [0, 0, 0] }
geometry: createCube(),
material: { baseColor: [1, 0, 0, 1] }
}); how does one discovers possible components and their values? |
Do we need a separate pex-ecs for world/entity adding? import createContext from "pex-context";
import createWorld from "pex-ecs"; // or if too many packages, import { createWorld } from "pex-renderer"
import { systems as rendererSystems } from "pex-renderer";
const ctx = createContext()
const world = createWorld({ ctx }) // world properties
world.addSystem(rendererSystems.geometry());
world.addSystem(rendererSystems.transform());
world.addSystem(rendererSystems.render());
I am all in favour of using plain object and removing |
i don't see value in completely separate |
v4: we settled on:
|
|
Also relevant: how do we plan on adding and optimising queries / searching for nodes with given component. Right now every system filters all entities. This could be something that the world takes care of. |
Given that pex-renderer is no longer Renderer but generic ECS machine should the main object be called World or Scene?
The text was updated successfully, but these errors were encountered: