1.0.0-beta.9 • Published 4 months ago

ecsjs v1.0.0-beta.9

Weekly downloads
4
License
GNU GPL v3
Repository
github
Last release
4 months ago

Entity Component System for Javascript

Pipeline status NPM version NPM downloads

BuyMeACoffee

An entity component system library for JavaScript

Install

NPM

  • Install: npm install --save ecsjs

Usage

Examples

Browser Module

import {ecs} from './some-path/ecs.js'

class PositionComponent {
  constructor(x, y) {
    this.x = x
    this.y = y
  }
}

// register a component
ecs.register(PositionComponent)

// create an entity
const entityId = ecs.getNextId()
ecs.set(entityId, new PositionComponent(25, 25))

Browser

<script type="application/javascript" src="./some-path/ecs.js"></script>
<script>
  class PositionComponent {
    constructor(x, y) {
      this.x = x
      this.y = y
    }
  }

  // register a component
  ecs.register(PositionComponent)

  // create an entity
  const entityId = ecs.getNextId()
  ecs.set(entityId, new PositionComponent(25, 25))
</script>

License

Licensed under GNU GPL v3

Copyright © 2013+ contributors

1.0.0-beta.5

4 months ago

1.0.0-beta.6

4 months ago

1.0.0-beta.7

4 months ago

1.0.0-beta.8

4 months ago

1.0.0-beta.9

4 months ago

1.0.0-beta.2

4 months ago

1.0.0-beta.3

4 months ago

1.0.0-beta.4

4 months ago

1.0.0-beta.1

4 months ago

1.0.0-alpha.5

7 years ago

1.0.0-alpha.4

7 years ago

1.0.0-alpha.3

7 years ago

1.0.0-alpha.2

7 years ago

1.0.0-alpha.1

7 years ago

0.15.1

7 years ago

0.15.0

7 years ago

0.15.0-alpha

7 years ago

0.14.0

9 years ago

0.13.0

9 years ago

0.12.0

10 years ago

0.11.0

10 years ago

0.10.1

10 years ago

0.10.0

10 years ago

0.9.0

10 years ago

0.7.0

11 years ago

0.6.1

11 years ago

0.6.0

11 years ago

0.4.0

11 years ago

0.0.1

11 years ago