Mirror Engine
V5
How To
Mirror Engine Logo

Mirror Engine API


Mirror Engine API / AnimStateGraph

Class: AnimStateGraph

An asset resource which represents an anim state graph. It can be loaded into an anim component using the AnimComponent#loadStateGraph method.

Usage

Scripts can retrieve an AnimStateGraph instance from assets of type 'animstategraph'. An AnimStateGraph can then be loaded into an anim component as follows:

const animStateGraph = app.assets.get(ASSET_ID).resource
const entity = new Entity()
entity.addComponent('anim')
entity.anim.loadStateGraph(animStateGraph)
Mirror Engine Logo