mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-03 08:43:50 -04:00
Switch from Gradient#type to separate LinearGradient / RadialGradient classes.
But remain backward compatible through direct calls to Gradient constructor.
This commit is contained in:
parent
3f5d0a6925
commit
58fad6ed72
11 changed files with 58 additions and 42 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 Gradient([ 'yellow', 'red', 'black'], 'radial');
|
||||
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