UNPKG

@byloth/micro-ecs

Version:

A simple & lightweight ECS (Entity Component System) library for JavaScript and TypeScript. 🕹

13 lines (10 loc) • 252 B
export default abstract class μObject { // eslint-disable-next-line camelcase private static __μECS_nextId__ = 0; public readonly id: number; public constructor() { this.id = (μObject["__μECS_nextId__"] += 1); } }