-
Notifications
You must be signed in to change notification settings - Fork 26
/
index.html
117 lines (92 loc) · 6.77 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Paper vs. Processing vs. Raphaël</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="paper.js" type="text/javascript" charset="utf-8"></script>
<script src="processing.js" type="text/javascript"></script>
<script src="raphael-min.js" type="text/javascript" charset="utf-8"></script>
<script src="raphael_circle.js" type="text/javascript"></script>
<script src="raphael_animation.js" type="text/javascript"></script>
<script src="raphael_interaction.js" type="text/javascript"></script>
<script type="text/paperscript" canvas="paperCircle" src="paper_circle.pjs" id="script"></script>
<script type="text/paperscript" canvas="paperAnimation" src="paper_animation.pjs" id="script"></script>
<script type="text/paperscript" canvas="paperInteraction" src="paper_interaction.pjs" id="script"></script>
<link rel="stylesheet" href="index.css" type="text/css" media="screen">
<script type="text/javascript" src="http://use.typekit.com/ran8aft.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-26336682-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript" charset="utf-8">
var main = {
paperAnimationStopped: true,
processingAnimationStopped: true,
raphaelAnimationStopped: true
};
</script>
</head>
<body>
<div id="main">
<div id="headers">
<p style="margin-top: -10px">
<a href="https://www.smashingmagazine.com/2012/02/web-drawing-throwdown-paper-processing-raphael/">Web-Drawing Throwdown: Paper.js Vs. Processing.js Vs. Raphael</a>
</p>
<p style="margin-top: 50px;">
Compare the code for <a href="http://paperjs.org/">Paper</a>, <a href="http://processingjs.org/">Processing</a>, and <a href="http://raphaeljs.com/">Raphaël</a>. We'll start by drawing a simple circle.
</p>
<p style="margin-top: 120px;">
Each framework creates animated drawings. Click the squares to make them spin.
</p>
<p style="margin-top: 160px;">
The frameworks also handle interactions. Click or touch a square to change its color.
</p>
<p style="margin-top: 160px;">
Now we'll put it all together with more complex shapes and create gears. Click the images to watch the gears run.
</p>
</div>
<div id="paper">
<h2><a href="http://paperjs.org/">Paper</a></h2>
<canvas id="paperCircle" class="canvas" width="200" height="200" style="background-color: white;"></canvas>
<a href="https://github.com/zgrossbart/3gears/blob/master/paper_circle.pjs" class="sourceLink">view source</a>
<canvas id="paperAnimation" class="canvas" width="200" height="200" style="background-color: white;"></canvas>
<a href="https://github.com/zgrossbart/3gears/blob/master/paper_animation.pjs" class="sourceLink">view source</a>
<canvas id="paperInteraction" class="canvas" width="200" height="200" style="background-color: white;"></canvas>
<a href="https://github.com/zgrossbart/3gears/blob/master/paper_interaction.pjs" class="sourceLink">view source</a>
<a href="paper_gears.html" id="paperGears" class="canvas"> </a>
</div>
<div id="processing">
<h2><a href="http://processingjs.org/">Processing</a></h2>
<canvas width="200" height="200" class="canvas" data-processing-sources="processing_circle.java"></canvas>
<a href="https://github.com/zgrossbart/3gears/blob/master/processing_circle.java" class="sourceLink">view source</a>
<canvas width="200" height="200" class="canvas" data-processing-sources="processing_animation.java"></canvas>
<a href="https://github.com/zgrossbart/3gears/blob/master/processing_animation.java" class="sourceLink">view source</a>
<canvas width="200" height="200" class="canvas" data-processing-sources="processing_interaction.java"></canvas>
<a href="https://github.com/zgrossbart/3gears/blob/master/processing_interaction.java" class="sourceLink">view source</a>
<a href="processing_gears.html" id="processingGears" class="canvas"> </a>
</div>
<div id="raphael">
<h2><a href="http://raphaeljs.com/">Raphaël</a></h2>
<div id="raphaelCircle" class="canvas"></div>
<a href="https://github.com/zgrossbart/3gears/blob/master/raphael_circle.js" class="sourceLink">view source</a>
<div id="raphaelAnimation" class="canvas"></div>
<a href="https://github.com/zgrossbart/3gears/blob/master/raphael_animation.js" class="sourceLink">view source</a>
<div id="raphaelInteraction" class="canvas"></div>
<a href="https://github.com/zgrossbart/3gears/blob/master/raphael_interaction.js" class="sourceLink">view source</a>
<a href="raphael_gears.html" id="raphaelGears" class="canvas"> </a>
<p style="margin-left: 25px;">
by <a href="http://www.zackgrossbart.com">Zack Grossbart</a>
</p>
</div>
</div>
<a href="https://github.com/zgrossbart/3gears" id="forkme"><img style="position: absolute; top: 0px; right: 0px; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
</body>
</html>