I'm very new to away3d, so please be kind.
My issue is this:
I've created a custom shape from a collection of dynamically generated
vertices. I'm trying to apply a bitmap once, to the shape as a whole,
but instead the bitmap is getting added to the five faces
individually.
Is there anyway to get the bitmap to wrap around the parent once
instead of each of the children?
I assume this issue stems from my lack of knowledge about all things
uv.
I'd really appreciate any help. Thank you.
Here's the code (without the vertex information [didn't think this was
necessary]):
var ap:AbstractPrimitive = new AbstractPrimitive();
var bmm:BitmapMaterial = new BitmapMaterial(Cast.bitmap("roundDoor"));
ap.bothsides = true;
ap.material = bmm;
view.scene.addChild(ap);
var uv0:UV = new UV(0,1); // this was a total guess
var uv1:UV = new UV(0,0); // this was a total guess
var uv2:UV =new UV(1,1); // this was a total guess
ap.addFace(new Face(v1, v2, v3, null, uv1,uv0 ,uv2 ));
ap.addFace(new Face(v4, v5, v6, null, uv0 ,uv1,uv2));
ap.addFace(new Face(v7, v8, v9, null,uv0 ,uv1,uv2));
ap.addFace(new Face(v10, v11, v12, null,uv0 ,uv1,uv2));
ap.addFace(new Face(v13, v14, v15, null,uv0 ,uv1,uv2));