owl-bt
Version:
owl-bt is editor for Behavior trees. It has been inspired by Unreal engine behavior trees in a way, that it supports special node items like decorators and services. This makes trees smaller and much more readable.
23 lines (19 loc) • 670 B
JavaScript
;
angular.module('editorApp')
.controller('TreeCtrl', function ($scope, $interpolate, $location, hotkeys, ListSelectDialog,
TreeMruList, TreeStore, TreeSelection, TreeNode, UndoRedoManager, AlertList) {
this.TreeSelection = TreeSelection;
this.path = $location.search().path;
//TODO: extract
AlertList.clear();
UndoRedoManager.clear();
TreeSelection.select();
TreeStore.load(this.path)
.then(() => {
TreeMruList.register(TreeStore.treePath);
this.rootNode = TreeStore.rootNode;
})
.catch((err) => {
AlertList.addErr(`Failed to load tree. Error = '${err.data}'`);
});
});