kevinresol / hxgenjs

Extensible JS generator for Haxe
57 stars 16 forks source link

generate openfl with away3d #14

Closed varadig closed 6 years ago

varadig commented 6 years ago

I try to compile a simple away3d project, with hxgenjs. Without hxgenjs is working, but with it i got thie:

(anonymous function) Uncaught ReferenceError: require is not defined Load3DS.js:1 the first line of the file is require("./Std")

Ok so I add the requirejs to the index.html <script type="text/javascript" src="http://requirejs.org/docs/release/2.2.0/minified/require.js"></script> But after I got this:


F   m   requirejs   (anonymous function)    Uncaught Error: Module name "Std" has not been loaded yet for context: _. Use require([])

(anonymous function)    Uncaught ReferenceError: lime is not defined

F   P   (anonymous function)    Uncaught Error: Mismatched anonymous define() module: function (){return{Howler:t,Howl:n}}

What have I do?

thanks

varadig commented 6 years ago

here is my project.xml the:

<?xml version="1.0" encoding="utf-8"?>
<project>

    <meta title="Away3D Basic Load3DS" package="away3d.samples.basicload3ds" version="1.0.0" />
    <app main="Main" file="Load3DS" path="Export" />

    <window background="0x000000" orientation="landscape" />
    <window width="1024" height="700" if="desktop" />

    <source path="Source" />

    <haxelib name="away3d" />
    <haxelib name="hxgenjs"/>

    <assets path="Assets" rename="assets" />

</project>
kevinresol commented 6 years ago

You need to bundle the files with packager such as webpack or browserify, as mentioned in the readme.

varadig commented 6 years ago

thanks