Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backgroundimage of view3d is not displayed ( Flash ) #54

Open
ustutz opened this issue Jun 29, 2015 · 0 comments
Open

Backgroundimage of view3d is not displayed ( Flash ) #54

ustutz opened this issue Jun 29, 2015 · 0 comments

Comments

@ustutz
Copy link

ustutz commented Jun 29, 2015

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();
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant