Skip to content

Commit

Permalink
][..><..][
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaudry committed Oct 4, 2024
1 parent d955805 commit 138bbba
Show file tree
Hide file tree
Showing 1,763 changed files with 105 additions and 434 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions keynote-programming24/demo3-1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
var w, h
var cnv
var x, y
var xoff, yoff
var step, stepx, stepy

function setup() {
w = windowWidth
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)
}




Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<head>
<meta charset="UTF-8">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tone/15.1.3/Tone.js"></script>
<script src=" https://cdn.jsdelivr.net/npm/[email protected]/build/CCapture.all.min.js "></script>
<script src=" https://cdn.jsdelivr.net/npm/[email protected]/browser.min.js "></script>
<script src=" https://cdn.jsdelivr.net/npm/[email protected]/index.min.js "></script>
<style>
body {
padding: 0;
Expand Down Expand Up @@ -48,9 +50,18 @@
<div class="credits">
</div>

<script src="proze2art001.js"></script>
<script src="http://unpkg.com/tone"></script>
<script>

var capturer = new CCapture ({
format: 'gif',
workersPath: 'output/',
framerate: 60,
verbose: true
})

</script>

<script src="demo3.js"></script>
</body>

</html>
56 changes: 56 additions & 0 deletions keynote-programming24/demo3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
var w, h
var cnv
var x, y
var xoff, yoff
var step, stepx, stepy

function setup() {
w = windowWidth
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() {
if (frameCount === 1) {
capturer.start()
}

background(0, 0, 0)
ikeda(w * 0.25, h * 0.5)
for (y = 0; y < h; y += 0.05 * h) {
ikeda(w * 0.75, y)
}

if (frameCount < 60) {
capturer.capture(canvas)
} else if (frameCount === 60) {
capturer.save()
capturer.stop()
}
}



function ikeda(cx, cy) {
var cx, cy, xoff, yoff, ikedawidth, ikedaheight
xoff = w * 0.25
yoff = h * random(0.001,0.03)
ikedawidth = 2 * xoff
ikedaheight = 2 * yoff
fill(0, 0, 100)
if (random() < 0.1) { fill(0, 0, 0) }
rect(cx - xoff, cy - yoff, ikedawidth, ikedaheight)
}

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 138bbba

Please sign in to comment.