You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/core/README.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,12 @@
1
1
# `@typeonce/ecs`
2
2
An **Entity Component System** (ECS) implementation in TypeScript, extensible, working with any renderer, type safe and composable 🕹️
3
3
4
+
> `@typeonce/ecs` has zero dependencies. It makes no assumptions about your game engine, renderer or any other library or framework.
5
+
6
+
It is designed to provide a **solid and type-safe ECS implementation** to keep the logic of your game organized and easy to understand.
7
+
8
+
How you choose to render, apply physics, manage input, etc. is up to you, `@typeonce/ecs`**doesn't impose any constraints**.
9
+
4
10
## Getting started
5
11
The package is available on [npm](https://www.npmjs.com/package/@typeonce/ecs):
6
12
@@ -18,7 +24,7 @@ const world = ECS.create(() => {
18
24
});
19
25
```
20
26
21
-
> Every call to `ECS.create` creates a new world. You can use multiple worlds for different scenes.
27
+
> Every call to `ECS.create` creates a new world. You can use *multiple worlds for different scenes*.
22
28
23
29
The function inside `ECS.create` is where you initialize the game:
24
30
- Add systems
@@ -117,8 +123,6 @@ export class FoodSpawnSystem extends SystemFactory<{
117
123
}) {}
118
124
```
119
125
120
-
The library does nothing more than organizing the logic of your game into entity, components and systems.
121
-
122
126
The created `ECS` instance provides an `update` function that you can call each frame to update the game, using whatever other library or framework you prefer:
123
127
124
128
> Calling `update` will execute all the systems in the world **one time**. You are expected to call `update` once per frame (or whatever other frequency you prefer).
0 commit comments