lipstick-ECS
$ npm install lipstick-ecs --save
Introduction
lipstick-ECS is a tiny ECS framework for js or ts especially. It is easy to use because of good generic constraints implemented by full use of Generics of Typescript.
I try to make it support iteration of complex component combinations and keep it performant as possible. But there are still some unsatisfactory currently:
- If the number of entities exceeds 100k, it is better not to choose lipstick-ecs at present.
- The most consumptive operation is assigning a being watched component.
- Assigning 22k being watched components takes 70ms.(10ms to create 22k component object)
- Test in CPU: 3.40GHz Node: v10.11.0
Getting Started
Example Code
; ; ;admin.AddWatchingsMatch;admin.AddSystemMovementSystem;admin.AddSystemRendererSystem;admin.start; admin.CreateEntitynew Position22, 33, new Color, new Shape, new PlayerID;admin.CreateEntitynew PlayerID;;admin.AssignComponentsent, new Shape, new Color;admin.DeleteEntityent; setInterval, 200;
Future
I'm going to refactor code to improve performance of lipstick-ecs. And it's interfaces won't be changed as possible.