Genome2D编译方法

Genome2D是一个高效的2D引擎,如今支持Flash(stage3d)和HTML5,由于只有做者一我的在维护,就没开源代码。git

最近和做者沟通了下,已经开源啦。github

做者划分了几个模块,编译起来不是特别方便,这里就简单介绍下Flash的编译方法。ui

由于做者把代码转换到haxe上,因此要安装haxe,如今Genome2D的版本是1.0.277,haxe版本3.1.3。spa

怎么安装haxe和git就不用讲了吧?一下是本地文件夹和git的对应关系:命令行

genome2d
    core                 git@github.com:pshtif/Genome2D-Core.git
    context
        flash            git@github.com:pshtif/Genome2D-ContextFlash.git
        common           git@github.com:pshtif/Genome2D-ContextCommon.git
out

其中out是输出目录,按照上面的对应关系clone好后,在genome2d目录下,命令行运行haxe core\build\swc.hxml就生成swc,3d

不要觉得到这里就完成了,由于haxe在连接时,不会连接lib的catalog,因此要用winrar之类的打开swc添加AGAL的catalog,否则会编译报错。code

<script name="com/adobe/utils/extended/AGALMiniAssembler" mod="1407288430000">
                <def id="com.adobe.utils.extended:AGALMiniAssembler"/>
                <dep id="Array" type="e"/>
                <dep id="Boolean" type="s"/>
                <dep id="Number" type="e"/>
                <dep id="Object" type="i"/>
                <dep id="RegExp" type="s"/>
                <dep id="String" type="s"/>
                <dep id="flash.display3D:Context3D" type="s"/>
                <dep id="flash.display3D:Program3D" type="e"/>
                <dep id="flash.utils:ByteArray" type="s"/>
                <dep id="flash.utils:Dictionary" type="e"/>
                <dep id="flash.utils:Endian" type="e"/>
                <dep id="flash.utils:getTimer" type="e"/>
                <dep id="int" type="s"/>
                <dep id="trace" type="e"/>
                <dep id="uint" type="s"/>
            </script>
      <script name="fl

若是你要编译HTML5版本的,可本身研究下,比Flash版本的容易。xml

最后放上做者的github地址:https://github.com/pshtif,感兴趣的同窗能够本身去研究下。blog

相关文章
相关标签/搜索