# ecsy **Repository Path**: weykon/ecsy ## Basic Information - **Project Name**: ecsy - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: dev - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-10-08 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ecsy [![NPM package][npm]][npm-url] [![Build Size][build-size]][build-size-url] [![Dev Dependencies][dev-dependencies]][dev-dependencies-url] [![Build Status][build-status]][build-status-url] ECSY (pronounced as "eck-see") is an highly experimental Entity Component System framework implemented in javascript, aiming to be lightweight, easy to use and with good performance. For detailed information on the architecture and API please visit the [documentation page](https://ecsy.io/docs/#/) * discourse forum: https://discourse.mozilla.org/c/mixed-reality/ecsy * discord: https://discord.gg/cFnrQ2v ## Features - Framework agnostic - Focused on providing a simple but yet efficient API - Designed to avoid garbage collection as possible - Systems, entities and components are scoped in a `world` instance - Multiple queries per system - Reactive support: - Support for reactive behaviour on systems (React to changes on entities and components) - System can query mutable or immutable components - Predictable: - Systems will run on the order they were registered or based on the priority defined when registering them - Reactive events will not generate a random callback when emited but queued and be processed in order - Modern Javascript: ES6, classes, modules,... - Pool for components and entities ## Goals Our goal is for ECSY to be a lightweight, simple, and performant ECS library that can be easily extended and encoruages open source collaboration. ECSY will not ship with features that bind it to a rendering engine or framework. Instead, we encourage the community to build framework specific projects like [ecsy-three](https://github.com/MozillaReality/ecsy-three), [ecsy-babylon](https://github.com/kaliber5/ecsy-babylon), and [ecsy-two](https://github.com/joshmarinacci/ecsy-two). ECSY does not adhere strictly to "pure ECS design". We focus on APIs that push users towards good ECS design like putting their logic in systems and data in components. However, we will sometimes break the rules for API ergonomics, performance in a JS context, or integration with non-ECS frameworks. ECSY is designed for a community driven ecosystem. We encourage users to come up with modular components and systems that can be composed into larger games, apps, and engines. # Examples - Ball example: - three.js: https://ecsy.io/examples/ball-example/three - babylon: https://ecsy.io/examples/ball-example/babylon - 2D Canvas https://ecsy.io/examples/canvas - Factory pattern with `Not` operator: https://ecsy.io/examples/factory - System state component example: https://ecsy.io/examples/systemstatecomponents # Usage Installing the package via `npm`: ``` npm install --save ecsy ``` ```html Hello! ``` [Try it on glitch](https://glitch.com/~ecsy-0-3-0-boxes-and-circles) You can also include the hosted javascript directly on your HTML: ```html ``` [npm]: https://img.shields.io/npm/v/ecsy.svg [npm-url]: https://www.npmjs.com/package/ecsy [build-size]: https://badgen.net/bundlephobia/minzip/ecsy [build-size-url]: https://bundlephobia.com/result?p=ecsy [dependencies]: https://img.shields.io/david/fernandojsg/ecsy.svg [dependencies-url]: https://david-dm.org/fernandojsg/ecsy [dev-dependencies]: https://img.shields.io/david/dev/fernandojsg/ecsy.svg [dev-dependencies-url]: https://david-dm.org/fernandojsg/ecsy#info=devDependencies [lgtm]: https://img.shields.io/lgtm/grade/javascript/g/fernandojsg/ecsy.svg?label=code%20quality [lgtm-url]: https://lgtm.com/projects/g/fernandojsg/ecsy/ [build-status]: https://travis-ci.com/fernandojsg/ecsy.svg?branch=master [build-status-url]: https://travis-ci.com/fernandojsg/ecsy