tecs 1.0.12 copy "tecs: ^1.0.12" to clipboard
tecs: ^1.0.12 copied to clipboard

Simple ECS for dart.

TECS #

pub.dev GitHub

An archetype-based Entity Component System (ECS) written in Dart.

📖 Documentation

class MoveSystem extends System<double> {
  final params = QueryParams([PositionComponent, VelocityComponent]);

  @override
  void update(double deltaTime) {
    world.queryEach(params, (row) {
      final position = row.get<PositionComponent>();
      final velocity = row.get<VelocityComponent>();

      position.x += velocity.x * deltaTime;
      position.y += velocity.y * deltaTime;
    });
  }
}

🚀 Made with TECS #

LunaPulse — A space shmup built with TECS + Tremble.

2
likes
130
points
112
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Simple ECS for dart.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on tecs