Sprite3D help

Software: Away3D 4.x

dubletar, Member
Posted: 14 January 2013 09:30 PM   Total Posts: 73

Hi everyone,

I know I have a very stupid question…

I have been using away3d for almost a year now, however, this is the first time I’m using Sprite3D.

I’ve looked at all the examples I can find, but I see Sprite3D using bitmapMaterial, while the new Sprite3D needs TextureMaterial.

So here’s the question, since I simply cannot find the answer (for such a newbish question):

How can I create a Sprite3D from an embedded image?

[Embed(source="../embeds/icon.png")]
private var icon:Class;

...

var 
texture:TextureMaterial = new TextureMaterial(icon);
var 
_points:Sprite3D = new Sprite3D(texture1010);
_points.mesh.getHeightAt(Parent.xParent.z) + 10;
_this.addChild(_points); 

This doesnt work, unfortunately.

Please help!

Thank you.

   

Qbrain, Member
Posted: 14 January 2013 11:21 PM   Total Posts: 92   [ # 1 ]

try this: (didnt test it but should work)

var texture:TextureMaterial = new TextureMaterial(new BitmapTexture(new icon().bitmapData)); 

greets,

-Q

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X