-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
165 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js"></script> | ||
<style> | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
</style> | ||
<style type="text/css"> | ||
.credits { | ||
position: absolute; | ||
text-align: left; | ||
bottom: 8px; | ||
width: 100%; | ||
color: #FFFFFF; | ||
font-family: monospace; | ||
margin-left: 12px; | ||
font-size: 14px | ||
} | ||
</style> | ||
<style type="text/css"> | ||
.sourcecode { | ||
position: absolute; | ||
text-align: left; | ||
bottom: 38px; | ||
width: 100%; | ||
color: #FFFFFF; | ||
font-family: monospace; | ||
margin-left: 12px; | ||
font-size: 10px | ||
} | ||
</style> | ||
|
||
</head> | ||
|
||
<body style="background-color:#000000;"> | ||
|
||
<div class="sourcecode"> | ||
<pre id="fileDisplayArea"></pre> | ||
</div> | ||
|
||
<div class="credits"> | ||
</div> | ||
|
||
<script> | ||
// credits:<br>@al.my.re; p5.js | ||
|
||
window.onload = function () { | ||
var fileDisplayArea = document.getElementById('fileDisplayArea'); | ||
fetch("frenchcodemo.js") | ||
.then((res) => res.text()) | ||
.then((text) => { | ||
// fileDisplayArea.innerText = text; | ||
}) | ||
.catch((e) => console.error(e)); | ||
} | ||
|
||
</script> | ||
|
||
<script src="cegepdemo.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
var w, h | ||
var cnv | ||
var x, y | ||
var xoff, yoff | ||
var step, stepx, stepy | ||
|
||
function setup() { | ||
w = windowHeight | ||
h = windowHeight | ||
cnv = createCanvas(w, h); | ||
centerCanvas(); | ||
colorMode(HSB, 360, 100, 100, 250); | ||
noFill(); | ||
background(0, 0, 0) | ||
} | ||
|
||
function centerCanvas() { | ||
var x = (windowWidth - w) / 2; | ||
var y = (windowHeight - h) / 2; | ||
cnv.position(x, y); | ||
} | ||
|
||
function draw() { | ||
background(0, 0, 0) | ||
ikeda() | ||
} | ||
|
||
var cy = 0 | ||
|
||
function ikeda() { | ||
fill(0, 0, 100) | ||
var cx = w / 2 | ||
var freq = 0.5 | ||
var speed = 2 | ||
console.log("rect" + cy) | ||
if (cy < h) { | ||
if (random() < freq) { | ||
|
||
rect(cx - (100 + frameCount * speed), cy - 50, 200 + 2 * frameCount * speed, 100) | ||
} | ||
cy += random(speed) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
<style> | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
margin: 0; | ||
} | ||
</style> | ||
<style type="text/css"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters