0.0.14 • Published 4 years ago
dreki v0.0.14
🐉 dreki
An Entity-Component System (ecs) library written in Typescript.
🚧 The package is a work-in-progress and might be unstable, use it at your own risks. 🚧
🚀 Install
npm i dreki
📜 Example
import { World, query } from "dreki";
import { not } from "dreki/filters";
class Dead {}
class Position {
x: = 0;
y: = 0;
}
const alive = query(not(Dead), Position);
function aliveSystem() {
for (const [pos] of alive) {
// do something to alive entities ...
}
}
const world = World.build()
.with({ capacity: 200 })
.stageAfter(Stages.Update, "my_custom_stage")
.systems("my_custom_stage", aliveSystem)
.done();
const entity = world.spawn(Position);
const dead_entity = world.spawn(Position, Dead);
setInterval(() => {
world.update();
}, 1 / 60);
🥳 Getting started
TODO
0.0.10
4 years ago
0.0.11
4 years ago
0.0.12
4 years ago
0.0.13
4 years ago
0.0.14
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.3
4 years ago
0.0.4
4 years ago
0.0.0
4 years ago
1.3.0
4 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.1.1
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago