My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 33: Sprite2D bitmap does not update when changed
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by antonkulaga, Feb 17, 2009
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)*/
		}
		
	}
}
BugInAway3D.as
1.0 KB   Download
Sign in to add a comment

Hosted by Google Code