flx3d compilier flag
This commit is contained in:
+6
-1
@@ -148,6 +148,9 @@
|
||||
<!-- Comment this out to disable support for custom extended classes (data/classes). !-->
|
||||
<define name="SOFTCODED_CLASSES" />
|
||||
|
||||
<!-- Comment this out to disable support for Away3D Flixel Intergration (reduces compile times)-->
|
||||
<!-- <define name="THREE_D_SUPPORT" /> -->
|
||||
|
||||
<!-- Comment this out to disable video cutscene support, in case of compilation errors. !-->
|
||||
<define name="VIDEO_CUTSCENES" unless="web || linux || hl || mac" />
|
||||
|
||||
@@ -170,7 +173,9 @@
|
||||
<haxelib name="flixel-addons" />
|
||||
|
||||
<haxelib name="hxCodec" if="VIDEO_CUTSCENES" />
|
||||
<haxelib name="away3d" />
|
||||
<section if="THREE_D_SUPPORT">
|
||||
<haxelib name="away3d" />
|
||||
</section>
|
||||
<haxelib name="format" />
|
||||
<haxelib name="flxanimate" />
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package away3d.core.managers;
|
||||
|
||||
#if THREE_D_SUPPORT
|
||||
import away3d.debug.Debug;
|
||||
import away3d.events.Stage3DEvent;
|
||||
|
||||
@@ -712,3 +713,4 @@ class Stage3DProxy extends EventDispatcher
|
||||
_ibUploadCount++;
|
||||
}
|
||||
}
|
||||
#end
|
||||
@@ -1,5 +1,6 @@
|
||||
package flx3d;
|
||||
|
||||
#if THREE_D_SUPPORT
|
||||
import away3d.entities.SegmentSet;
|
||||
import away3d.cameras.Camera3D;
|
||||
import away3d.entities.TextureProjector;
|
||||
@@ -25,10 +26,12 @@ import openfl.Assets;
|
||||
import away3d.entities.Mesh;
|
||||
import away3d.loaders.Loader3D;
|
||||
import funkin.backend.utils.NativeAPI.ConsoleColor;
|
||||
import flixel.FlxCamera;
|
||||
import away3d.containers.View3D;
|
||||
#end
|
||||
import flixel.FlxCamera;
|
||||
|
||||
class Flx3DCamera extends FlxCamera {
|
||||
#if THREE_D_SUPPORT
|
||||
private static var __3DIDS:Int = 0;
|
||||
|
||||
public var view:View3D;
|
||||
@@ -169,6 +172,7 @@ class Flx3DCamera extends FlxCamera {
|
||||
super.destroy();
|
||||
}
|
||||
|
||||
public inline function addChild(c)
|
||||
public function addChild(c)
|
||||
view.scene.addChild(c);
|
||||
#end
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package flx3d;
|
||||
|
||||
#if THREE_D_SUPPORT
|
||||
import away3d.core.managers.Stage3DManager;
|
||||
import away3d.library.assets.IAsset;
|
||||
import flixel.FlxG;
|
||||
#end
|
||||
|
||||
/**
|
||||
* @author lunarclient
|
||||
@@ -13,6 +15,7 @@ import flixel.FlxG;
|
||||
*/
|
||||
class Flx3DUtil
|
||||
{
|
||||
#if THREE_D_SUPPORT
|
||||
/**
|
||||
* Returns the total amount of 3D stages (not excluding the ones in use)
|
||||
* @return Int
|
||||
@@ -48,4 +51,5 @@ class Flx3DUtil
|
||||
|
||||
return null;
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package flx3d;
|
||||
|
||||
#if THREE_D_SUPPORT
|
||||
import away3d.entities.SegmentSet;
|
||||
import away3d.cameras.Camera3D;
|
||||
import away3d.entities.TextureProjector;
|
||||
@@ -25,10 +26,11 @@ import openfl.Assets;
|
||||
import away3d.entities.Mesh;
|
||||
import away3d.loaders.Loader3D;
|
||||
import funkin.backend.utils.NativeAPI.ConsoleColor;
|
||||
#end
|
||||
|
||||
// FlxView3D with helpers for easier updating
|
||||
|
||||
class Flx3DView extends FlxView3D {
|
||||
#if THREE_D_SUPPORT
|
||||
private static var __3DIDS:Int = 0;
|
||||
|
||||
var meshes:Array<Mesh> = [];
|
||||
@@ -138,6 +140,7 @@ class Flx3DView extends FlxView3D {
|
||||
super.destroy();
|
||||
}
|
||||
|
||||
public inline function addChild(c)
|
||||
public function addChild(c)
|
||||
view.scene.addChild(c);
|
||||
#end
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package flx3d;
|
||||
|
||||
#if THREE_D_SUPPORT
|
||||
import away3d.containers.View3D;
|
||||
import away3d.library.assets.IAsset;
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
import openfl.display.BitmapData;
|
||||
#end
|
||||
import flixel.FlxSprite;
|
||||
|
||||
/**
|
||||
* @author Ne_Eo
|
||||
@@ -15,6 +17,7 @@ import openfl.display.BitmapData;
|
||||
*/
|
||||
class FlxView3D extends FlxSprite
|
||||
{
|
||||
#if THREE_D_SUPPORT
|
||||
@:noCompletion private var bmp:BitmapData;
|
||||
|
||||
/**
|
||||
@@ -114,4 +117,5 @@ class FlxView3D extends FlxSprite
|
||||
super.set_height(newHeight);
|
||||
return view != null ? view.height = height : height;
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user