From: Joe Wreschnig Date: Tue, 23 Sep 2014 16:16:30 +0000 (+0200) Subject: Allow passing a material name to QuadC. X-Git-Url: https://git.yukkurigames.com/?p=yuu.git;a=commitdiff_plain;h=fdda0a19ec1365eed9413454a3a50911b0aa4011;ds=sidebyside Allow passing a material name to QuadC. --- 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);