Comments (6)
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?
from pex-renderer.
Given that pex-renderer is no longer Renderer but generic ECS machine should the main object be called World or Scene?
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());
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?
I am all in favour of using plain object and removing renderer.material()
calls that are a bit heavy to parse.
from pex-renderer.
i don't see value in completely separate pex-ecs
(I can see use cases like html canvas projects) but i would just use pex-renderer createWorld
with 100% custom systems first as a test case. systems
namespace is fine although i prefer flat apis. Any particular reasons for world.geometrySystem()
-> rendererSystem.geometry()
?
from pex-renderer.
v4: we settled on:
- world: as a list of entities and systems and keeping track of deltaTime for animation in update.
- default renderEngine: update (all its system, kind of like world?) and render selected entities
- components: pex-renderer components which goal is to set default values. If that's 100% true, why are systems still checking so many default values
pex-renderer/systems/renderer/standard.js
Lines 445 to 452 in 90a39cb
from pex-renderer.
- are renderEngine and world overlapping (both a collection of systems with an update method)
- we need to check who sets default value instead of having it define it 2 places (components and renderer) cc #307
from pex-renderer.
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.
from pex-renderer.
Related Issues (20)
- material.id is missing and leads to cache issues HOT 4
- Improve reflection probes seams HOT 3
- Move shaders back to pex-shaders
- MSAA Antialiasing
- Layer system
- Reflection map prefiltering improvements HOT 5
- Provide default values when creating light components HOT 1
- Add support for attribute.dirty HOT 2
- Allow shadow map size customisation HOT 1
- Prevent camera helper rendering when rendering from the same entity camera component
- Renderer crashes on directional lights that don't cast shadows HOT 1
- Something is broken
- Directional light entity helper should not grow with light intensity HOT 9
- Maximum call stack size exceeded HOT 3
- Add basic render engine example
- Default skybox sunPosition HOT 1
- PostProcessing cleanup HOT 1
- Add custom attributeMap
- Camera clear color should be in linear space HOT 1
- [v4] material receiveShadows is not used
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 pex-renderer.