My favorites
▼
|
Sign in
szsz
Random code snippets
Project Home
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
misc
/
bazgroly.htm
r60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!doctype html>
<title>Bazgroly</title>
<canvas id="pacman" width="500" height="500">
<script>
window.onload = function() {
var canvas = document.getElementById("pacman");
var g = canvas.getContext("2d");
/* pacman */
g.lineWidth = 2;
g.fillStyle = "#ee0";
g.beginPath();
g.moveTo(250,250);
g.arc(250,250, 100, -1,1, true);
g.lineTo(250, 250);
g.fill();
g.stroke();
/* oko */
g.fillStyle = "#fff";
g.beginPath();
g.arc(230,200, 20, 0,2*3.14, false);
g.fill();
/* kulki */
g.fillStyle = "#0b0";
g.beginPath();
g.arc(320,250, 25, 0,2*3.14, false);
g.fill();
g.beginPath();
g.arc(420,250, 25, 0,2*3.14, false);
g.fill();
}
</script>
Show details
Hide details
Change log
r18
by grr...@szsz.pl on Aug 22, 2009
Diff
Eksperiments with canvas
Go to:
/trunk/misc
/trunk/misc/bazgroly.htm
/trunk/rhino/build.xml
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 664 bytes, 35 lines
View raw file
Powered by
Google Project Hosting