A barebones Entity Component System.
- Clone the code
lib
folder contains the framework, simplyconst Component = include('lib/Component');
Simply create an instance of Engine:
const engine = new Engine();
Optionally pass in your entities and systems:
const entities = {};
const systems = [];
const engine = new Engine(entities, systems);
Then call engine.start();
git clone
the reponpm install
at the base directory- Make your changes to the
src/
files - Test each new interface especially members of any new classes (please see goals to ensure the highest chance that your contribution will be accepted)
npm run test
to build thelib/
files and run the tests- Optionally, to only build the
lib/
files, runnpm run build
- Usability
- Simple API
- Fully functional ECS
- Nothing extra, only the building blocks
- Test Coverage
- 100% test coverage
- Every interface covered by tests
- Testing positive and negative (API does what it says, doesn't do what it doesn't say)
- Documentation
- Extensive documentation (Each function documented)
- Usable without needing to view source
- Coverage of all effects and side effects (if there are any) of each interface