ecsy-actors

ECSY Actors - State & Transitions and Events for stateful objects, i.e. actors, using a VFSM pattern adapted for ECS architecture

Usage no npm install needed!

<script type="module">
  import ecsyActors from 'https://cdn.skypack.dev/ecsy-actors';
</script>

README

ecsy-actors

Input action handling, state management, axis blending and event output for character controllers and stateful, interactive objects.

Why Do I Need This?

Mapping "input" -- what the user wants to do -- to "state" -- what an object ends up doing -- can be complicated. ecsy-actors bridges input actions and output state mappings, and can be combined with ecsy-three and ecsy-input for complete character controller and stateful object interaction systems.

Installation

npm install ecsy-actors

How to use

import { World } from 'ecsy'
import {  addActorSystem } from 'ecsy-actors'

const world = new World()

const entity = world.createEntity()

addActorSystem(entity)

world.execute()

To Build

npm run build

This will open up the rollup dev server on port 10001 You can see input in the console