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)
- 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
- PCSS shadows are camera dependent
- Bring light.radius range from 0...shadowMapSize to 0..1
- Line thickness is viewport aspect ratio dependent
- [glTF] xmag and ymag in glTF loaders shouldn't be halved
- Adding hook to material breaks shadows of instanced geometry HOT 3
- Reduce online dependencies in examples HOT 2
- [glTF] alphaMode blend sets depthWrite to false in loaders HOT 1
- Add support for gain maps HOT 2
- Double pass transmission HOT 1
- Alpha blended transmission HOT 1
- Transmission IBL reflection color is wrong HOT 2
- Always use color for bloom source
- Transmission is black when IBL Reflection Probe is not present
- Double Pass Transmission grab texture has black artefacts at high lod when using normalTexture HOT 1
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.