Fetching contributors…
Cannot retrieve contributors at this time
43 lines (39 sloc) 1.64 KB
<!DOCTYPE html>
<title>using Processing.js with Amber Smalltalk</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="Stefan Krecher" />
<link rel="stylesheet" type="text/css" href='css/style.css' />
<link type="image/x-icon" rel="shortcut icon" href="/favicon.ico"/>
<link href='' rel='stylesheet' type='text/css'>
<script type='text/javascript' src='../../js/amber.js'></script>
<script type='text/javascript' src='../../js/lib/showdown.js'></script>
<script type="text/javascript" src="processing-1.4.1.js"></script>
A Clock made with <a href="">Processing.js</a> and Amber
<p>Examine the <button onClick="smalltalk.Browser._openOn_(smalltalk.ProcessingClock)"> ProcessingClock class</button></p>
<p><canvas id="canvas1" width="200" height="200"></canvas></p>
<script id="script1" type="text/javascript">
// Simple way to attach js code to the canvas is by using a function
function sketchProc(processing) {
// Override draw function, by default it will be called 60 times per second
processing.draw = function() {};
var canvas = document.getElementById("canvas1");
// attaching the sketchProc function to the canvas
var p = new Processing(canvas, sketchProc);
<script type='text/javascript'> loadAmber(
files: ['Processing-Examples.js'],
prefix: 'examples/processing/js',
packages: [ 'Processing-Examples' ],
ready: function() {