Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
HECS Entity Component System
An experimental ECS written in Javascript.
npm install -S hecs
import { World, System, EntityId, Read, Write } from "hecs";
const world = new World();
class Position {
constructor(x) {
this.x = x;
}
}
class Velocity {
constructor(v) {
this.v = v;
}
}
world.registerComponent(Position);
world.registerComponent(Velocity);
class VelocitySystem extends System {
setup() {
return {
entities: this.world.createQuery(Write(Position), Read(Velocity))
};
}
update() {
for (const [position, velocity] of this.ctx.entities) {
position.x += velocity.v;
}
}
}
class LoggingSystem extends System {
setup() {
return {
entities: this.world.createQuery(EntityId, Read(Position))
};
}
update() {
for (const [entityId, position] of this.ctx.entities) {
console.log(`Entity ${entityId} has position: ${position.x}`);
}
}
}
world.registerSystem(new VelocitySystem());
world.registerSystem(new LoggingSystem());
const entity1 = world.createEntity();
world.addComponent(entity1, new Position(0));
world.addComponent(entity1, new Velocity(1));
const entity2 = world.createEntity();
world.addComponent(entity2, new Position(10));
world.addComponent(entity2, new Velocity(0.5));
function update() {
world.update();
requestAnimationFrame(update);
}
requestAnimationFrame(update);
FAQs
A high performance ECS with a plugin ecosystem
The npm package hecs receives a total of 1 weekly downloads. As such, hecs popularity was classified as not popular.
We found that hecs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.