Examples
The examples/ directory contains several loading and usage styles:
| Example | Description |
|---|---|
| load_from_tree | Load from an exported tree file |
| load_from_project | Load from an exported project file |
| load_from_rawproject | Load from a raw project file |
| subtree | SubTree usage (requires the dedicated editor branch behavior3editor) |
| memsubtree | Memory subtree example |
| testwork | Node worker test example |
| mmoarpg | A behavior example for an MMOARPG-style game; open it in the desktop editor (Projects → open project) |
Running an example
cd examples/load_from_tree
go run main.go
Running the web editor locally
- Download the
behavior3editorsource. - Install Node.js and npm.
- Install bower:
npm install -g bower - In the project directory:
npm installthenbower install - Install gulp:
npm install --global gulp - Run:
gulp servein the project directory - Open
http://127.0.0.1:8000in a browser
To deploy a web build yourself, just drop the generated build directory into your Tomcat / IIS directory.
Full example
An io-style game example lives under h5game/server. bin/b3.json is the behavior tree data: create any new project in the editor, then choose Project → Import → Tree as json to restore the project.