diff awesome_js/robert.js @ 40:1ac1409ea68c laserkard

[svn r41] implemented dynamic text.
author rlm
date Mon, 25 Jan 2010 03:42:08 -0500
parents 7742910e0479
children ef8615de8a9c
line wrap: on
line diff
     1.1 --- a/awesome_js/robert.js	Sun Jan 24 15:06:22 2010 -0500
     1.2 +++ b/awesome_js/robert.js	Mon Jan 25 03:42:08 2010 -0500
     1.3 @@ -1,18 +1,9 @@
     1.4  
     1.5  
     1.6 -var robert = (function process()
     1.7 -{
     1.8 -// Creates canvas 320 × 200 at 10, 50
     1.9 -var paper = Raphael(10, 50, 320, 200);
    1.10 +window.Robert = (function () {
    1.11  
    1.12 -// Creates circle at x = 50, y = 40, with radius 10
    1.13 -var circle = paper.circle(50, 40, 10);
    1.14 -// Sets the fill attribute of the circle to red (#f00)
    1.15 -circle.attr("fill", "#f00");
    1.16  
    1.17 -// Sets the stroke attribute of the circle to white
    1.18 -circle.attr("stroke", "#fff");
    1.19 +var separator = /[, ]+/,
    1.20 +        elements = /^(circle|rect|path|ellipse|text|image)$/,
    1.21  
    1.22 -}
    1.23 -)
    1.24 -
    1.25 +Paper = function () {},