X-Git-Url: https://git.yukkurigames.com/?p=featherfall2.git;a=blobdiff_plain;f=src%2Fyuu%2Fce.js;h=430030013bdca82f60021a7628f6d463bcf3311c;hp=bb5c6e5935897b22b13d73cbcb463fd57247bb64;hb=920effc9482b10a336cbcdd93d0bc2eb739eccc7;hpb=c952777104ad747e255efd1bcc395fcb04d09ed1 diff --git a/src/yuu/ce.js b/src/yuu/ce.js index bb5c6e5..4300300 100644 --- a/src/yuu/ce.js +++ b/src/yuu/ce.js @@ -588,6 +588,22 @@ } }, + aabb2d: { + get: function () { + return new yuu.AABB( + this.x - this.scaleX / 2, + this.y - this.scaleY / 2, + this.x + this.scaleX / 2, + this.y + this.scaleY / 2); + }, + set: function (aabb) { + this.x = aabb.x0 + aabb.w / 2; + this.y = aabb.y0 + aabb.h / 2; + this.scaleX = aabb.w; + this.scaleY = aabb.h; + } + }, + yaw: { aliasSynthetic: "ypr[0]", chainable: true }, pitch: { aliasSynthetic: "ypr[1]", chainable: true }, roll: { aliasSynthetic: "ypr[2]", chainable: true },