Away3D basic shader demo not working

I posted this in the away3d github issues but doesn’t look like they get looked at much there … (Is it alright if I post away3d stuff here?)

I’m just trying to test it out and none of the demos are working. If it’s alright I’m just going to copy-paste here.

Just installed away3d for the first time.

C:\dev\away3d>haxelib list actuate: [1.8.4] away3d-examples: [1.1.0] away3d: [1.1.0] box2d: [1.2.3] flixel-addons: [1.1.0] flixel-demos: [1.1.1] flixel-templates: [1.0.2] flixel-tools: [1.0.5] flixel-ui: [1.0.2] flixel: [3.3.8] hxcpp: 3.2.81 [3.2.94] layout: [1.2.0] lime-samples: [2.3.0] lime: [2.3.3] openfl-samples: [2.2.2] openfl: [2.2.4] 3.0.3 swf: [1.8.6]
I’m getting (different) errors trying to run for lime, flash and html5.

C:\dev\away3d\Basic_Shading>lime test neko Called from openfl/_v2/utils/ByteArray.hx line 757 Called from openfl/_v2/Lib.hx line 248 Called from openfl/_v2/Lib.hx line 391 Called from openfl/_v2/Lib.hx line 193 Called from C:\HaxeToolkit\haxe\std/neko/Lib.hx line 30 Uncaught exception - load.c(237) : Failed to load library : lime.ndll
C:\dev\away3d\Basic_Shading>lime test flash C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:157: characters 10-14 : li me.text.Font should be openfl.text.Font C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:157: characters 10-14 : li me.text.Font should be flash.text.Font C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:577: lines 577-582 : font : openfl.text.Font -> Void should be lime.text.Font -> Void C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:577: lines 577-582 : Canno t unify argument 1 C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:577: lines 577-582 : lime. text.Font should be openfl.text.Font C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:577: lines 577-582 : lime. text.Font should be flash.text.Font C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:577: lines 577-582 : For f unction argument 'handler' C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:586: characters 35-42 : op enfl.text.Font -> Void should be lime.text.Font -> Void C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:586: characters 35-42 : Ca nnot unify argument 1 C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:586: characters 35-42 : li me.text.Font should be openfl.text.Font C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:586: characters 35-42 : li me.text.Font should be flash.text.Font C:/HaxeToolkit/haxe/lib/openfl/2,2,4/openfl/Assets.hx:586: characters 35-42 : Fo r function argument 'handler'
C:\dev\away3d\Basic_Shading>lime test html5 Error: Could not find haxelib "format", does it need to be installed?

I just realised the last error is easy enough to fix … Need to switch machines. Though I’d be surprised if HTML5 works and none of the others do …

Hi @mike1101

Sorry I didn’t reply to your git issue, I’ve been busy with work and not had much chance to catch up on the issues front recently.

Anyway, for starters, can you try using the latest openFL. I see it’s installed but you are currently using v2.2.4 rather than 3.0.3. Secondly, make sure you use the -Dlegacy option as ‘next’ isnt fully operational as yet.

cheers

Greg

You make it sound like a Death Star :slight_smile:

I really meant that the Away3D port hasn’t been 'next’ified but…

1 Like

Yes, that works great. (BTW the haxelib installer tries to set lime to 2.2.4…)

I still have one issue, though - The generated .swf doesn’t run in a browser (just blank), is that to be expected ?

For the SWF to run in a browser, make sure that you have set wmode:“direct” in the swfobject embedSWF call as it is necessary to get Stage3D content rendering.

swfobject.embedSWF ("Basic_Load3DS.swf", "openfl-application", "100%", "100%", "11.2", "expressInstall.swf", {}, { wmode:"direct" });

Haxelib isn’t working particularly well at the moment and does do some odd things.

Glad it’s working for you now.

Greg

Yes - Got it. I used the swfobject_generator_1_2_html to make an index.html that embedded the flash (making sure wmode was set to direct) and it worked. Thanks…