1 Utilities.extendObject(SimpleCanvasStage.prototype, {
8 this.offsetIndex = Math.max(this.offsetIndex + count, 0);
12 this.offsetIndex = this.offsetIndex + count;
13 if (this.offsetIndex > this.objects.length) {
14 // For some tests, it may be easier to see how well the test is going
15 // by limiting the range of coordinates in which new objects can reside
16 var coordinateMaximumFactor = Math.min(this.objects.length, Math.min(this.size.x, this.size.y)) / Math.min(this.size.x, this.size.y);
17 var newIndex = this.offsetIndex - this.objects.length;
18 for (var i = 0; i < newIndex; ++i)
19 this.objects.push(new this._canvasObject(this, coordinateMaximumFactor));
25 var context = this.context;
26 context.clearRect(0, 0, this.size.x, this.size.y);
27 for (var i = 0, length = this.offsetIndex; i < length; ++i)
28 this.objects[i].draw(context);
31 complexity: function()
33 return this.offsetIndex;