behavior3 / behavior3editor

An awesome online visual editor for Behavior3 (Behavior Trees Visual Editor)
MIT License
643 stars 264 forks source link

Getting this working with nw.js #24

Open piller187 opened 8 years ago

piller187 commented 8 years ago

I downloaded the editor source and tried to get it to work with node-webkit but I get an error in index.html on the app.initialize() saying "Cannot read property 'initialize' of undefined.

At the top you have:

var loader, app;

But I can't see where app is created anywhere. The loader variables is of type createjs.LoadQueue() but 'app' doesn't get assigned anywhere.

Any help on getting this to work on nw.js would be huge! I'm trying to use this for the Leadwerks game engine for AI and I think having a desktop version of this editor would be nice and nw.js can help get that.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/36382314-getting-this-working-with-nw-js?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).
aleneum commented 7 years ago

Hi @piller187,

did you figure out how to use behavior3editor as a standalone app? I am not sure if this had been implemented back then but the editor now supports electron which has a scope similar to nw.js. The standalone app can be built via gulp dist. The built applications will reside under .dev/. If gulp returns with Error: EISDIR: illegal operation on a directory do not worry. This is just gulp shooting itself in the foot during copying files and linking folders. The applications should be in .temp-dist/ then. If you want to build for OSX as well, you should add darwin as a target here. If the built fails, try to remove the platforms you do not require.

screenshot_osx

Best regards!