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(texture, 10, 10);
_points.y = mesh.getHeightAt(Parent.x, Parent.z) + 10;
_this.addChild(_points);
This doesnt work, unfortunately.
Please help!
Thank you.