(x, y)
| 113 | this.update(); |
| 114 | } |
| 115 | onTouchMoved(x, y) { |
| 116 | let currentBounds = this.bounds; |
| 117 | let newBounds = new Rectangle(this.anchor.x + x, this.anchor.y + y, this.bounds.w, this.bounds.h); |
| 118 | let unionBounds = Rectangle.union(currentBounds, newBounds); |
| 119 | this.bounds = newBounds; |
| 120 | render.begin(unionBounds.x, unionBounds.y, unionBounds.w, unionBounds.h); |
| 121 | this.draw(); |
| 122 | render.end(); |
| 123 | } |
| 124 | onTouchEnded(/* x, y */) { |
| 125 | this.state = 0; |
| 126 | this.update(); |