adding variable geometr
This commit is contained in:
parent
8a25f795af
commit
53f2bf9c5b
109651
command-line/js/p5.js
Normal file
109651
command-line/js/p5.js
Normal file
File diff suppressed because one or more lines are too long
46
command-line/js/variable-geometry-cover.js
Normal file
46
command-line/js/variable-geometry-cover.js
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/* --- Variable Geometry 1 (cover) --- */
|
||||||
|
|
||||||
|
/*Inspired by David Reinfurt's work - Multi*/
|
||||||
|
var moving_size = 50;
|
||||||
|
var static_size = 20;
|
||||||
|
|
||||||
|
function setup() {
|
||||||
|
var c = createCanvas(600, 600);
|
||||||
|
c.parent('variable-geometry');
|
||||||
|
frameRate(15);
|
||||||
|
}
|
||||||
|
|
||||||
|
function draw() {
|
||||||
|
//background
|
||||||
|
//background(random(230, 240));
|
||||||
|
|
||||||
|
//left
|
||||||
|
noStroke()
|
||||||
|
fill(0);
|
||||||
|
rect(97, 169, 79, 12);
|
||||||
|
|
||||||
|
//right
|
||||||
|
rect(365, 184, 20, 15);
|
||||||
|
fill(20, 20, 120);
|
||||||
|
|
||||||
|
beginShape();
|
||||||
|
vertex(365, 199);
|
||||||
|
vertex(385, 199);
|
||||||
|
vertex(372, 216);
|
||||||
|
vertex(358, 216);
|
||||||
|
endShape(CLOSE);
|
||||||
|
|
||||||
|
//bottom
|
||||||
|
noFill();
|
||||||
|
stroke(130);
|
||||||
|
strokeWeight(2);
|
||||||
|
ellipse(255, 350, static_size, static_size);
|
||||||
|
|
||||||
|
//mouse interactions
|
||||||
|
//stroke(180);
|
||||||
|
//ellipse(mouseX, mouseY, moving_size, moving_size);
|
||||||
|
|
||||||
|
//if (mouseIsPressed) {
|
||||||
|
// static_size = floor(random(5, 20));
|
||||||
|
//}
|
||||||
|
}
|
@ -6,7 +6,9 @@
|
|||||||
<script src="./js/paged.polyfill.js" type="text/javascript"></script>
|
<script src="./js/paged.polyfill.js" type="text/javascript"></script>
|
||||||
<link href="./css/interface.css" rel="stylesheet" type="text/css">
|
<link href="./css/interface.css" rel="stylesheet" type="text/css">
|
||||||
<link href="./css/print.css" rel="stylesheet" type="text/css" media="print">
|
<link href="./css/print.css" rel="stylesheet" type="text/css" media="print">
|
||||||
<!-- <script src="https://gitlab.com/aesthetic-programming/book/-/raw/master/public/p5_SampleCode/libraries/p5.js"></script> -->
|
<script src="./js/p5.js"></script>
|
||||||
|
<script src="./js/variable-geometry-cover.js"></script>
|
||||||
|
<!-- <script src="./js/variable-geometry-inside.js"></script> -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
|
BIN
web-interface/static/fonts/Bitter-Bold.ttf
Normal file
BIN
web-interface/static/fonts/Bitter-Bold.ttf
Normal file
Binary file not shown.
BIN
web-interface/static/fonts/Bitter-BoldItalic.ttf
Normal file
BIN
web-interface/static/fonts/Bitter-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
web-interface/static/fonts/Bitter-ExtraBold.ttf
Normal file
BIN
web-interface/static/fonts/Bitter-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
web-interface/static/fonts/Bitter-ExtraBoldItalic.ttf
Normal file
BIN
web-interface/static/fonts/Bitter-ExtraBoldItalic.ttf
Normal file
Binary file not shown.
BIN
web-interface/static/fonts/Bitter-MediumItalic.ttf
Normal file
BIN
web-interface/static/fonts/Bitter-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
web-interface/static/fonts/Bitter-SemiBoldItalic.ttf
Normal file
BIN
web-interface/static/fonts/Bitter-SemiBoldItalic.ttf
Normal file
Binary file not shown.
109651
web-interface/static/js/p5.js
Normal file
109651
web-interface/static/js/p5.js
Normal file
File diff suppressed because one or more lines are too long
46
web-interface/static/js/variable-geometry-cover.js
Normal file
46
web-interface/static/js/variable-geometry-cover.js
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/* --- Variable Geometry 1 (cover) --- */
|
||||||
|
|
||||||
|
/*Inspired by David Reinfurt's work - Multi*/
|
||||||
|
var moving_size = 50;
|
||||||
|
var static_size = 20;
|
||||||
|
|
||||||
|
function setup() {
|
||||||
|
var c = createCanvas(600, 600);
|
||||||
|
c.parent('variable-geometry');
|
||||||
|
frameRate(15);
|
||||||
|
}
|
||||||
|
|
||||||
|
function draw() {
|
||||||
|
//background
|
||||||
|
//background(random(230, 240));
|
||||||
|
|
||||||
|
//left
|
||||||
|
noStroke()
|
||||||
|
fill(0);
|
||||||
|
rect(97, 169, 79, 12);
|
||||||
|
|
||||||
|
//right
|
||||||
|
rect(365, 184, 20, 15);
|
||||||
|
fill(20, 20, 120);
|
||||||
|
|
||||||
|
beginShape();
|
||||||
|
vertex(365, 199);
|
||||||
|
vertex(385, 199);
|
||||||
|
vertex(372, 216);
|
||||||
|
vertex(358, 216);
|
||||||
|
endShape(CLOSE);
|
||||||
|
|
||||||
|
//bottom
|
||||||
|
noFill();
|
||||||
|
stroke(130);
|
||||||
|
strokeWeight(2);
|
||||||
|
ellipse(255, 350, static_size, static_size);
|
||||||
|
|
||||||
|
//mouse interactions
|
||||||
|
//stroke(180);
|
||||||
|
//ellipse(mouseX, mouseY, moving_size, moving_size);
|
||||||
|
|
||||||
|
//if (mouseIsPressed) {
|
||||||
|
// static_size = floor(random(5, 20));
|
||||||
|
//}
|
||||||
|
}
|
@ -6,6 +6,8 @@
|
|||||||
<script src="./static/js/paged.polyfill.js" type="text/javascript"></script>
|
<script src="./static/js/paged.polyfill.js" type="text/javascript"></script>
|
||||||
<link href="./static/css/interface.css" rel="stylesheet" type="text/css">
|
<link href="./static/css/interface.css" rel="stylesheet" type="text/css">
|
||||||
<link href="./static/css/print.css" rel="stylesheet" type="text/css" media="print">
|
<link href="./static/css/print.css" rel="stylesheet" type="text/css" media="print">
|
||||||
|
<script src="./js/p5.js"></script>
|
||||||
|
<script src="./js/variable-geometry-cover.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
|
Loading…
Reference in New Issue
Block a user