Compiles an OpenFL project using the Genes library. When a button is clicked, a new module is loaded from the server at runtime.
Genes modifies the behavior of the Haxe compiler to split the generated JavaScript into modern modules, instead of a single monolithic bundle. This makes it easier to integrate Haxe projects with other tooling from the JavaScript ecosystem.
Sample created by Josh Tynjala, the author of Feathers UI.
Add the genes Haxelib to your project.xml file:
<haxelib name="genes"/>
Copy the templates directory from this repository to your project. Then, add the following element to your project.xml file:
<template path="templates" if="html5"/>
That's it! You don't need to do anything special to build and run.
openfl test html5 -debug
To use a bundler with the JavaScript modules generated with Genes, check out the following projects.
- Genes 0.4.4 or newer
- Lime 8.0.0 or newer
Sample created by Josh Tynjala, the author of Feathers UI and core contributor to OpenFL.