Hello,
I wrote a method for cr.rect class (in edittime.js):
cr.rect.prototype.height = function () { return Math.abs(this.top - this.bottom) }[/code:2jj9qpq9] But I can't access this method from result of [i]instance.GetBoundingRect()[i] I wrote this test code: [code:2jj9qpq9]var x = 0; IDEInstance.prototype.Draw = function(renderer) { var rect = this.instance.GetBoundingRect() if (x == 0) { alert(rect instanceof cr.rect); x = 1; } }[/code:2jj9qpq9] And it alerted false while in documentation is written: [quote:2jj9qpq9]instance.GetBoundingRect() Return a cr.rect object specifying the object's axis-aligned bounding rectangle.
Develop games in your browser. Powerful, performant & highly capable.
There isn't a method called GetBoundingRect(), so I'm not sure how that code even ran? Nor is that quote in the documentation. What exactly are you looking at?