Invisible Geometry [resolved]

sign up sign in

Hello all,

I'm trying to generate and render a mesh with luxe. Cruising through the APIs, it looks like the Geometry class is the way to go, but I'm having trouble getting it to render. Here is my code far:

var geo : Geometry;

override function ready() {
    var cx = Luxe.screen.w / 2;
    var cy = Luxe.screen.h / 2;

    geo = new Geometry({
        visible: true, 
        color: new Color().rgb(0xffffff),
        primitive_type: PrimitiveType.triangles

    var vert1 : Vertex = new Vertex(new Vector(cx, cy + 10), new Color().rgb(0xff0000));
    var vert2 : Vertex = new Vertex(new Vector(cx + 10, cy - 10), new Color().rgb(0x00ff00));
    var vert3 : Vertex = new Vertex(new Vector(cx - 10, cy - 10), new Color().rgb(0x0000ff));

} //ready

It compiles but all I get is an empty window.

I feel like I must be missing an important option somewhere... but I'm having trouble figuring it out just by looking at the API.

Thanks for your help!