Merge branch 'main' of ssh://git.xpub.nl:2501/XPUB/SI20
commit
46a44b2f98
@ -0,0 +1 @@
|
||||
rituals_archive will go here
|
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<script src="p5.min.js" ></script>
|
||||
<script>
|
||||
console.log("hey there");
|
||||
function preload(){
|
||||
img=loadImage('wheel.png')
|
||||
}
|
||||
function setup() {
|
||||
createCanvas(windowWidth, windowHeight);
|
||||
button = createButton("spin the wheel!");
|
||||
button.position(windowWidth/2-250, windowHeight/2);
|
||||
button.mousePressed(spin);
|
||||
}
|
||||
|
||||
var spinning = 1;
|
||||
var currentSpinning = 0;
|
||||
function spin(){
|
||||
spinning = 1800 + random(0,500);
|
||||
currentSpinning = 0;
|
||||
}
|
||||
|
||||
function card(){
|
||||
rect(0, 0, 55, 55);
|
||||
console.log("hey pop up here");
|
||||
}
|
||||
function draw() {
|
||||
background(220);
|
||||
imageMode(CENTER);
|
||||
angleMode(DEGREES);
|
||||
translate (windowWidth/2, windowHeight/2);
|
||||
rotate(currentSpinning);
|
||||
image (img,0,0,200,200);
|
||||
currentSpinning = currentSpinning+10;
|
||||
if (currentSpinning > spinning){
|
||||
currentSpinning = spinning;
|
||||
card();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
</body>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue