Comments (5)
Hi !
Yes, _dirtyVector is just hard-coded (for performance reason) event stream, with ENTITY_TRANSFORM_COULD_BE_DIRTY, each with entity ID data.
I want to do something like ?
in annotation of Family to mark component as optional. But for now just dont include these component to Family, and check them with component storage instance getted with Wire
.
So for example you have:
Family<Transform, Renderable> // ?Scissors component is optional
then you just have
Wire<Transform>
Wire<Renderable
and
Wire<Scissors>
Family guarantee that Transform and Renderable will be attached to each listed entity.
But you can check for each of them is Scissors component is also attached or not:
var scissors = _scissors.get(child);
if (scissors != null && !processScissors(entity)) {
// entity fully clipped by scissors
child = _node.__getNextSibling(child);
continue;
}
from ecx.
@patternspandemic also remember, ecx
is in progress, and maybe not the best suitable ECS-framework for first experience :)
But I realised that you have got a lot, that's nice.
from ecx.
I've added optional component notation:
var _entities:Family<Transform, Node, Renderable, (Scissors)>;
Scissors component are not required in example, but family declaration becomes more readable from some point...
from ecx.
Well I've been playing with ecx with Kha as the rendering side and it works wonderfully. :-)
from ecx.
I want to do something like ? in annotation of Family to mark component as optional.
This was the first thing I tried, and figured it simply wasn't implemented yet.
also remember, ecx is in progress, and maybe not the best suitable ECS-framework for first experience :)
Actually, I found the Wire
capability allowed me to choose / experiment / switch between: easily getting things to work and having a more decoupled, 'pure' separation setup. AutoComp
is great too, even if not being the first choice for performance. I am no where near having enough experience to worry about that :)
The optional component notation should help keep things clear, thanks.
Well I've been playing with ecx with Kha as the rendering side and it works wonderfully. :-)
I'm using Kha as well, and found Service
injection an easy way to pass around a canvas for systems to render to, as well as hook together Kha's scheduler and ecx-common's SystemRunner. Whether that's a great way to do it, not sure. But it works great for me so far!
Cool stuff!
from ecx.
Related Issues (20)
- Mb. strict type-check is better there? HOT 2
- Custom component storage HOT 13
- System iterates over non-matching entities HOT 8
- update while updating HOT 3
- ecx.ds.* as separate library? HOT 8
- Hxcpp hack not working HOT 2
- Typecompletion issue with Haxe 3.4 HOT 2
- Is it legal to use Primitive data types T directly for AutoComp? HOT 1
- Architectural Issues with Data storage and Memory Usage HOT 2
- How to reset world? HOT 2
- How to add/remove Systems? HOT 6
- Primary Targets and Frameworks HOT 6
- Compilation issues with haxe4 HOT 2
- How to destroy the world? HOT 2
- Prevent using Family<> in services
- Duplicate metadata 'systems' HOT 2
- World invalidate not having any effect HOT 1
- Can't destroy entities
- Duplicate metadata 'systems'
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 ecx.