mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Merge branch 'master' of github.com:scriptographer/paper.js
This commit is contained in:
commit
4bd12feb49
2 changed files with 8 additions and 9 deletions
|
@ -42,16 +42,14 @@
|
|||
vector.length = 10;
|
||||
mouseDown = false;
|
||||
}
|
||||
|
||||
function onFrame() {
|
||||
if (!mouseDown)
|
||||
iterate();
|
||||
}
|
||||
|
||||
var grow = false;
|
||||
var vector = new Point(150, 0);
|
||||
setInterval(draw, 30);
|
||||
function draw() {
|
||||
if (!mouseDown) {
|
||||
iterate();
|
||||
document.redraw();
|
||||
}
|
||||
}
|
||||
|
||||
function iterate() {
|
||||
for (var i = 0, l = gradient.stops.length; i < l; i++)
|
||||
|
@ -73,7 +71,8 @@
|
|||
var radius = Math.max(document.size.height, document.size.width) * 0.75;
|
||||
var gradientColor = path.fillColor;
|
||||
gradientColor.origin = point;
|
||||
gradientColor.origin = point + radius;
|
||||
var radius = Math.max(document.size.height, document.size.width) * 0.75;
|
||||
gradientColor.destination = point + [radius, 0];
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -46,7 +46,7 @@ var Tool = this.Tool = ToolHandler.extend(new function() {
|
|||
// If the event was triggered by a touch screen device,
|
||||
// prevent the default behaviour, as it will otherwise
|
||||
// scroll the page:
|
||||
if (event.targetTouches)
|
||||
if (event && event.targetTouches)
|
||||
event.preventDefault();
|
||||
var point = event && viewToArtwork(event, that._document);
|
||||
// If there is only an onMouseMove handler, call it when
|
||||
|
|
Loading…
Reference in a new issue