I have a Haxe project that targets HTML5 and successfully uses an Actuate tween. It works when targeting Windows too. When I build an Electron application, everything works except the tween.
Unfortunately, what’s going on under the hood is not my forte–nor is web development.
To create the Electron app I have been using the steps from @joshtynjala’s FeathersUI documemtation:
I’ve tried to modify the Electron build process as suggested by @singmajesty
Though I have no idea what “yo openfl” is supposed to be.
Here are my steps:
Use VSCode to build HTML5 debug version and verify tween works
In DOS prompt, go to project folder and enter
openfl build electron -debug
I make a copy of bin\electron\haxe\debug.hxml and put it in bin\electron\bin renamed as debugbbw.hxml
I edit debugbbw.hxml to add
-lib actuate
cd bin/electron/bin
I edit the project.json file in that folder by adding:
Something’s going on within the SimpleActuator.hx constructor, startTime is 0 instead of a real value on Electron target, haxe ifs get messed up, I’m sure someone will take a look at it later (maybe you can create a github issue)
For a quick solution build your app with
openfl build electron -debug -Delectron
or even better add
<haxedef name="electron" />
to your project.xml, it’ll be fine after that. Just tested it, this seemingly fixed it.
Cheers
Edit: I didn’t do any special magic, just created a simple feathers app, built the project for electron target, ran npm install and npm start.
Okay, I checked Lime source on Github, and looks like -D electron has already been added to the Electron hxml templates. So if you install Lime from github, it’ll be fine without the previously mentioned haxedef or -D build parameter. Or you can wait til the next Lime release or add it to your own hxml templates (debug, final, release) manually