-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbouncing-ball.html
More file actions
33 lines (33 loc) · 902 Bytes
/
Copy pathbouncing-ball.html
File metadata and controls
33 lines (33 loc) · 902 Bytes
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
<!DOCTYPE html>
<html>
<head>
<script
src="./bouncing-ball.js"
type="module"
language="javascript"
></script>
<link rel="stylesheet" type="text/css" href="./bouncing-ball.css" />
<meta charset="utf-8" />
</head>
<body class="background_container">
<div>
<canvas id="bouncingball" width="1300" height="500"></canvas></div>
<!-- <div>
<input type="text" id="radius"/>
<input type="text" id="e"/>
</div> -->
<div style="display: flex;
flex-direction: row;
justify-content: center;">
<button onclick="drawBall(bouncingball)">Create Ball</button>
<button id="moveBall" onclick="moveBall(bouncingball)">Move Ball</button>
</div>
<div>
<h3 id="bounce">0</h3>
<h3 id="y">0</h3>
<h3 id="dy">0</h3>
<h3 id="x">0</h3>
<h3 id="dx">0</h3>
</div>
</body>
</html>