mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-13 13:40:58 -04:00
Allow direct passing of color arguments to gradient constructors as well as arrays.
This commit is contained in:
parent
58fad6ed72
commit
5afa1b1688
6 changed files with 13 additions and 12 deletions
examples/JSON
|
@ -7,7 +7,7 @@
|
|||
<script type="text/javascript" src="../../dist/paper.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas1">
|
||||
var path = new Path.Circle(view.center, view.bounds.height * 0.4);
|
||||
var gradient = new RadialGradient([ 'yellow', 'red', 'black']);
|
||||
var gradient = new RadialGradient('yellow', 'red', 'black');
|
||||
var from = path.position;
|
||||
var to = path.bounds.rightCenter;
|
||||
var gradientColor = new GradientColor(gradient, from, to);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue