Project-bestanden van TI - Game Controller gekopieerd
This commit is contained in:
0
web/.gitkeep
Normal file
0
web/.gitkeep
Normal file
18
web/game.js
Normal file
18
web/game.js
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
// the function setup() is called once when the page is loaded
|
||||
function setup(){
|
||||
// create a canvas element and append it to the body
|
||||
createCanvas(800, 600);
|
||||
|
||||
// disable the outline of shapes
|
||||
noStroke();
|
||||
}
|
||||
|
||||
// the function draw() is called every frame
|
||||
function draw(){
|
||||
// clear the background with a transparent black color
|
||||
background(0,0,0,10);
|
||||
|
||||
// draw a circle at the mouse position
|
||||
circle(mouseX, mouseY, 50);
|
||||
}
|
16
web/index.html
Normal file
16
web/index.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Open Dag Game</title>
|
||||
|
||||
<!-- support p5-->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/addons/p5.sound.min.js"></script>
|
||||
<script src="game.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user