55 |
Growing circles
56 |
57 |
58 |
59 |
62 |
var interval_1=0;
63 | function startShow()
64 | {
65 | var r = Math.floor(Math.random() * (254)),
66 | g = Math.floor(Math.random() * (254)),
67 | b = Math.floor(Math.random() * (254)),
68 | x = Math.floor(Math.random() * (439)),
69 | y = Math.floor(Math.random() * (554)),
70 | color = "rgba("+r+", "+g+", "+b+", 0.5)",
71 | filled = true,
72 | radius = 1;
73 | jc.circle(x, y, radius, color, filled)
74 | .animate({radius:100, opacity:0}, 1500, function(){
75 | this.del();
76 | });
77 | }
78 |
79 | function onload_1()
80 | {
81 | jc.start(idCanvas, true);
82 | interval_1 = setInterval(startShow, 200);
83 | }
84 |
85 | function start_1(idCanvas)
86 | {
87 | if(interval_1)return;
88 | onload_1();
89 | }
90 |
91 | function stop_1(idCanvas)
92 | {
93 | clearInterval(interval_1);
94 | interval_1 = 0;
95 | jc.clear(idCanvas);
96 | }
97 |
98 |
99 |
100 |
View of example
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
142 |
143 |
144 |
145 |
146 |
147 |