pex-renderer
pex-renderer copied to clipboard
Port to ECS
Log of outstanding issues and roadblocks
- [x] assumption that every entity has transform, entity was adding transform in it's constructor -> removed that assumption in line with ECS in Nodes
- transform.enabled could enable/disable whole entity
- [ ] in pex-renderer camera was updating it's own matrices, in nodes it's the ecs.Camera node via pex-cam, i we add "just data" camera in ecs, we need proper camera system?
- [x] it is assumed that all entities are children of root entity and entities array is rebuilt every frame by traversing transform tree -> removed, call renderer.add to push entities to an array, might remove that indirection in the future as well and access entities directly
- [ ] how system can find other systems if systems is array of plain objects with update function. Do we need "type" property on them? Why not Classes then?
- [x] who is responsible for passing
ctxto systems and when? -> currently done in renderer.createSystem - [ ] default component properties are exploited quite a lot e.g. in renderer
cullFace: material.cullFaceModeassumes thatcullFaceModeis well defined
Open Questions
- [ ] factory functions vs objects
- [ ] system naming
systems/geometry-systemugh
The tags and parent params were switched in createEntity factory function
return createEntity(components, tags, this);
export default function createEntity(components, parent, tags) {
constructor(components, tags, renderer) {
- [ ] can't pan with the current orbiter implementation in camera-system