
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ecs-library
Advanced tools
A TypeScript Entity Component System (ECS) library for game development and simulation applications.
npm install ecs-library
import * as ecs from 'ecs-library';
// Create a world
const world = new ecs.World();
// Add systems
world.addSystem(new ecs.MovementSystem());
world.addSystem(new ecs.CollisionSystem());
// Create an entity
const player = world.createEntity();
player.addComponent(new ecs.TransformComponent(100, 100));
player.addComponent(new ecs.VelocityComponent(0, 0));
player.addComponent(new ecs.ColliderComponent(32, 32));
player.addTag('player');
// Game loop
function gameLoop(deltaTime) {
// Update the world
world.update(deltaTime);
// Request next frame
requestAnimationFrame(gameLoop);
}
// Start the game loop
requestAnimationFrame(gameLoop);
import { Component } from 'ecs-library';
class PlayerComponent extends Component {
public score: number = 0;
public lives: number = 3;
constructor(score: number = 0, lives: number = 3) {
super();
this.score = score;
this.lives = lives;
}
public clone(): PlayerComponent {
const player = new PlayerComponent();
player.score = this.score;
player.lives = this.lives;
return player;
}
}
import { System } from 'ecs-library';
import { PlayerComponent } from './PlayerComponent';
class PlayerSystem extends System {
public update(deltaTime: number): void {
if (!this.world) return;
const entities = this.world.getEntitiesWithComponent(PlayerComponent);
for (const entity of entities) {
const playerComponent = entity.getComponent(PlayerComponent);
// Game logic here...
}
}
}
For detailed documentation, see the ECS Library Documentation.
For API reference, see the API Reference.
Check out the examples directory for more usage examples:
MIT
FAQs
A full-featured Entity Component System library
We found that ecs-library demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.