|
|
In away 2.3 (and in revision 1113 also) Sprite2D does not update after I
change its bitmap. Below I give the code sample which recreates this bug.
package
{
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import away3d.containers.*;
import away3d.core.base.*;
import away3d.primitives.*;
import away3d.core.math.*;
import away3d.materials.*;
import away3d.sprites.*;
public class BugInAway3D extends MovieClip
{
public var view:View3D;
public var test:Sprite2D;
public var mat:IMaterial;
public function BugInAway3D()
{
super();
this.initAway3D();
}
public function initAway3D():void
{
this.view = new View3D({x:this.stage.stageWidth/2,
y:this.stage.stageHeight/2});
this.addChild(view);
this.test = new Sprite2D(new BitmapData(100,100,false,0xFF0000));
this.view.scene.addChild(test);
view.camera.position = new Number3D(1000, 1000, 1000);
view.camera.lookAt(test.position);
view.render();
test.bitmap=new BitmapData(200,100,false,0x00FF00);
view.render();
/*new (green an rectangular) bitmap should be shown but I see an old one
(square and red)*/
}
}
}
|