Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: c2d800d766
Fetching contributors…

Cannot retrieve contributors at this time

118 lines (92 sloc) 6.935 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Paper vs. Processing vs. Rapha&euml;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="http://coding.smashingmagazine.com/2012/02/22/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&euml;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&euml;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>
Jump to Line
Something went wrong with that request. Please try again.