Created
November 24, 2016 04:10
-
-
Save mikekavouras/be69a561fe08d92c6a2644b123be99cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(t) { | |
var i, | |
n, | |
s = this.brush.img.width * this.scale, | |
e = this.brush.img.height * this.scale, | |
h = { | |
x: this.pointer.x, | |
y: this.pointer.y | |
}; | |
this.pointPosition(t); | |
for (var o = { | |
x: this.pointer.x, | |
y: this.pointer.y | |
}, a = this.pointDistance(h, o), r = this.pointAngle(h, o), c = 0; c <= a || 0 === c; c++) | |
i = h.x + Math.sin(r) * c - s / 2, n = h.y + Math.cos(r) * c - e / 2, this.context.drawImage(this.brush.img, i, n, s, e) | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment