I'm very new to away3d and currently going through Jens tutorials
(http://www.flashmagazine.com/Tutorials/detail/away3d_basics_5_-
_primitives_part_1/).
I noticed that in one of the early examples a triangle is created
where some of the initial properties are set using a verbose approach:
// verbose approach
var triangle:Triangle = new Triangle();
triangle.a = new Vertex(0, 200, 0);
triangle.b = new Vertex(100, 0, 0);
triangle.c = new Vertex(-100, 0, 0);
triangle.bothsides = true;
view.scene.addChild(triangle);
Since I wanted to test what I've learned I tried to do the same thing
using the initObj but got completely different results:
// initObj approach
var triangle:Triangle = new Triangle({material: 'white#black', a: new
Vertex(0, 200, 0), b: new Vertex(100, 0, 0), c: new Vertex(-100, 0,
0)});
triangle.bothsides = true;
view.scene.addChild(triangle);
When I use the verbose approach I get a triangle as expected. Using
the initObj as I have produces a horizontal line on the screen. Could
someone fill me in on what I'm doing wrong?