From fdda0a19ec1365eed9413454a3a50911b0aa4011 Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Tue, 23 Sep 2014 18:16:30 +0200 Subject: [PATCH] Allow passing a material name to QuadC. --- src/yuu/rdr.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/yuu/rdr.js b/src/yuu/rdr.js index a03cbec..99b8c3f 100644 --- a/src/yuu/rdr.js +++ b/src/yuu/rdr.js @@ -272,6 +272,9 @@ constructor: function (material) { var buffer = new yuu.VertexBuffer(yuu.V3T2C4_F, 4); this._quad = new yuu.Quad(buffer); + material = yf.isString(material) + ? new yuu.Material(material) + : material; this._rdro = new yuu.Renderable( buffer, yuu.gl.TRIANGLE_STRIP, material, { model: mat4.create() }, 0.0); -- 2.30.2