fenomas / ent-comp Goto Github PK
View Code? Open in Web Editor NEWA light, fast Entity Component System in JS
A light, fast Entity Component System in JS
// calling tick/render triggers the systems
ecs.tick( tick_time )
ecs.tickRender( render_time )
s/tickRender/render
..causes the component to get removed.
I've been using the noa
package for a while and recently decided to switch to using a fork so I could update the dependencies. When I updated ent-comp
, it seems that storage
, systems
and renderSystems
are no longer accessible from the outside.
I'm mostly using it to quickly check states of different entities in the Chrome console, which is much faster than having to use the API calls for every single component type. (I simply type noa
in the console and have access to everything).
So I was wondering if you could possibly add them back to the object through this.storage
, etc. (seeing that this.components
is still available) or provide another way to quickly get all of this data.
So idk if you really need it since you seem to be doing everything in JS, but I've rewritten ent-comp
in TypeScript. I could submit a Pull Request if you wanted to add it in.
I've also added/modified some things, so it might not be the best idea to merge it as is.
For example, I removed multi-components because I thought that you can just have array inside the component's state (and they were forcing me to check for Array.isArray
every time due to TypeScript's strict typing nature). I've also upgraded everything to ES modules, added cleaner JSDoc, and added some extra functionality like getAllComponents().
So yeah, if you want to incorporate some/all of the new stuff I can make a pull request, if not, that's totally fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.