magic4
This commit is contained in:
34
static/Magic4/paperjs-v0.12.15/examples/JSON/Gradients.html
Normal file
34
static/Magic4/paperjs-v0.12.15/examples/JSON/Gradients.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Gradients</title>
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<script type="text/javascript" src="../../dist/paper-full.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas1">
|
||||
var path = new Path.Circle({
|
||||
center: view.center,
|
||||
radius: view.bounds.height * 0.4
|
||||
});
|
||||
path.fillColor = {
|
||||
stops: ['yellow', 'red', 'black'],
|
||||
radial: true,
|
||||
origin: path.position,
|
||||
destination: path.bounds.rightCenter
|
||||
}
|
||||
|
||||
var symbol = new SymbolDefinition(path);
|
||||
symbol.place(view.center);
|
||||
|
||||
window._json = project.exportJSON();
|
||||
console.log(window._json);
|
||||
</script>
|
||||
<script type="text/paperscript" canvas="canvas2">
|
||||
project.importJSON(window._json);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="canvas1" width="500" height="500"></canvas>
|
||||
<canvas id="canvas2" width="500" height="500"></canvas>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user