HTML and CSS Reference
In-Depth Information
You can easily alter the location and size of the circle path by altering the
radius
,
centerX
,
and
centerY
properties of the circle path object.
Example 5-9
shows the code for
CH5EX9.html
.
Figure 5-13. Moving an object in a circle
Example 5-9. Moving in a circle
<!doctype html>
<html
<html lang=
"en"
>
<head>
<head>
<meta
<meta charset=
"UTF-8"
>
<title>
<title>
CH5EX9: Moving In A Circle
</title>
</title>
<
script src
=
"modernizr.js"
><
/script>
<
script type
=
"text/javascript"
>
window
.
addEventListener
(
'load'
,
eventWindowLoaded
,
false
false
);
function
function
eventWindowLoaded
() {
canvasApp
();
}
function
function
canvasSupport
() {
return
return
Modernizr
.
canvas
;
}