Backgroundimage of view3d is not displayed ( Flash )
ustutz opened this issue · comments
this is my code:
The screen stays black.
It works in the as3 version of away3d.
package;
import away3d.containers.View3D;
import away3d.textures.BitmapTexture;
import flash.display.BitmapData;
import flash.events.Event;
import flash.Lib;
@:bitmap("lib/floor_diffuse.jpg") class FloorDiffuse extends BitmapData {}
class BackgroundMain {
var view:View3D;
static function main() {
// Entry point
new BackgroundMain();
}
public function new() {
var root = Lib.current;
view = new View3D();
root.addChild( view );
var floorDiffuse = new FloorDiffuse( 0, 0 );
view.background = new BitmapTexture( floorDiffuse ); //trace( view.background );
root.addEventListener( Event.ENTER_FRAME, onEnterFrame );
}
function onEnterFrame( e:Event ):Void {
view.render();
}
}