X-Git-Url: https://git.yukkurigames.com/?p=featherfall2.git;a=blobdiff_plain;f=src%2Fyuu%2Frdr.js;h=552d593aad9a4514fede443e650467510c9b9278;hp=a03cbec56482b6274583b09a581ec5082e425591;hb=c6354eb6e6a63ba19bc2c7879bafeea12e72fe3e;hpb=d2962105772fbdc548118bd65cd5bb4934e66085 diff --git a/src/yuu/rdr.js b/src/yuu/rdr.js index a03cbec..552d593 100644 --- a/src/yuu/rdr.js +++ b/src/yuu/rdr.js @@ -176,6 +176,15 @@ b[3] = b[7] = b[11] = b[15] = a; this._vbuf.dirty = true; } + }, + + anchorAtPosition: { + get: function () { return this.anchor; }, + set: function (a) { + var position = this.position; + this.anchor = a; + this.position = position; + } } }); @@ -272,6 +281,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); @@ -294,6 +306,7 @@ size: { alias: "_quad.size", chainable: true }, position: { alias: "_quad.position", chainable: true }, anchor: { alias: "_quad.anchor", chainable: true }, + anchorAtPosition: { alias: "_quad.anchorAtPosition", chainable: true }, xy: { alias: "_quad.position", chainable: true }, texBounds: { alias: "_quad.texBounds", chainable: true }, color: { alias: "_quad.color", chainable: true },