| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 | 
							- <!DOCTYPE html> 
 
- <html> 
 
-   <head> 
 
-     <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='http://fonts.googleapis.com/css?family=Istok+Web' rel='stylesheet' type='text/css'> 
 
- 	<script type="text/javascript" src="../bower_components/amber/support/requirejs/require.min.js"></script>
 
-     <script type='text/javascript' src='../bower_components/amber/support/amber.js'></script>
 
-     <script type='text/javascript' src='showdown/showdown.js'></script>
 
- 	<script type="text/javascript" src="processing-1.4.1.js"></script>
 
-   </head> 
 
-   <body> 
 
- 	A Clock made with <a href="http://processingjs.org">Processing.js</a> and <a href="http://amber-lang.net/">Amber</a>
 
- 	<p>Examine the <button onClick="buttonClick()"> ProcessingClock class</button></p> 
 
- 	<p><canvas id="canvas1" width="200" height="200"></canvas></p>
 
- 	<script id="script1" type="text/javascript">
 
- 		var buttonClick;
 
- 		// 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);
 
- 		require.config({
 
- 			paths: {
 
- 				'amber_examples_processing': 'js',
 
- 				'amber_examples_processing/_source': 'st'
 
- 			}
 
- 		});
 
- 		require(['amber/devel','amber_examples_processing/Processing-Examples'],function(smalltalk){
 
- 			smalltalk.defaultAmdNamespace = 'amber_examples_processing';
 
- 			smalltalk.initialize();
 
- 			buttonClick = function() {
 
- 				smalltalk.Browser._openOn_(smalltalk.ProcessingClock);
 
- 			};
 
- 			smalltalk.ProcessingClock._init();
 
- 		});
 
- 	</script>
 
- 	   	
 
-   </body> 
 
- </html> 
 
 
  |