@krol22/paula
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Paula

Paula is a Entity Component System written in TypeScript.

Installation

Use the npm repository to install paula.

npm install @krol22/paula

Basic usage

import { ECS, EcsSystem, EcsEntity } from '@krol22/paula';

const iterationType = 'ITERATION';

// Define your system
class IteratingSystem extends EcsSystem {
    tick(delta) {
        this.systemEntites.forEach((iterationEntity) => {
            const iterationComponent = entity.getComponent(iterationType);

            iterationComponent.value += 1;
        });
    }
}

const iteratingSystem = new IteratingSystem([iterationType]);

Dependents (0)

Package Sidebar

Install

npm i @krol22/paula

Weekly Downloads

0

Version

0.1.3

License

ISC

Unpacked Size

553 kB

Total Files

43

Last publish

Collaborators

  • krol22