JoanaChicau
1 year ago
4 changed files with 44 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.js"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/addons/p5.sound.min.js"></script> |
|||
<link rel="stylesheet" type="text/css" href="style.css"> |
|||
<meta charset="utf-8" /> |
|||
|
|||
</head> |
|||
<body> |
|||
<main> |
|||
</main> |
|||
<script src="sketch.js"></script> |
|||
</body> |
|||
</html> |
File diff suppressed because one or more lines are too long
@ -0,0 +1,19 @@ |
|||
function setup() { |
|||
resizeCanvas(windowWidth,windowHeight) |
|||
} |
|||
|
|||
function draw() { |
|||
noStroke() |
|||
fill (25, 25, 255, 100) // RGB + opacity
|
|||
myCircle() |
|||
textSize(40) |
|||
text('hello ٩(˘◡˘)۶ world', 10, height/2) // x y
|
|||
} |
|||
|
|||
// RANDOM
|
|||
function myCircle(){ |
|||
circle(random(width), random(height), random(50)) |
|||
fr = 6; |
|||
frameRate(fr); |
|||
describe('A blue circle moving randomly on a white canvas'); |
|||
} |
@ -0,0 +1,7 @@ |
|||
html, body { |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
canvas { |
|||
display: block; |
|||
} |
Loading…
Reference in new issue