mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Fix RadialRainbows example.
The example stopped working, because we were changing values on another gradient colour object than the one used by the path: the color is cloned when passed to path.fillColor
This commit is contained in:
parent
d12c680be6
commit
e1bb0a23e7
1 changed files with 2 additions and 2 deletions
|
@ -20,8 +20,8 @@
|
|||
var path = new Path.Rectangle(view.bounds);
|
||||
var gradient = new Gradient(colors, 'radial');
|
||||
var radius = Math.max(view.size.width, view.size.height) * 0.75;
|
||||
var gradientColor = new GradientColor(gradient, point, point + [radius, 0]);
|
||||
path.fillColor = gradientColor;
|
||||
path.fillColor = new GradientColor(gradient, point, point + [radius, 0]);
|
||||
var gradientColor = path.fillColor;
|
||||
|
||||
var mouseDown = false,
|
||||
mousePoint = view.center;
|
||||
|
|
Loading…
Reference in a new issue