Skip to content

Commit be11ca5

Browse files
committed
lib updates
1 parent 7686392 commit be11ca5

File tree

7 files changed

+27
-1
lines changed

7 files changed

+27
-1
lines changed
9.5 KB
Loading
29.1 KB
Loading

src/assets/img/libraries/shape5.png

4.59 KB
Loading
43 KB
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
<!-- saved from url=(0043)http://www.qianqian-ye.com/p5js-superwoman/ -->
3+
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4+
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
5+
<script language="javascript" type="text/javascript" src="sketch.js"></script>
6+
<style> body {padding: 0; margin: 0;} canvas { opacity: 0.8 }</style>
7+
</head>
8+
9+
<body></body>
10+
</html>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
let img;
2+
let offset = 0;
3+
let easing = 0.05;
4+
5+
function setup() {
6+
createCanvas(1000,1000);
7+
img = loadImage('assets/bg.jpg'); // Load an image into the program
8+
}
9+
10+
function draw() {
11+
image(img, 0, 0); // Display at full opacity
12+
let dx = mouseX - img.width / 2 - offset;
13+
offset += dx * easing;
14+
tint(255, 127); // Display at half opacity
15+
image(img, offset, 0);
16+
}

src/templates/pages/libraries/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ slug: libraries/
6666
<img src="{{assets}}/img/libraries/p5.ble.png"></a>
6767
<a class="nounderline" href="https://itpnyu.github.io/p5ble-website/"><h4>p5.ble</h4></a>
6868
</div>
69-
<p>{{#i18n "p5.ble"}}{{/i18n}}<a target='_blank' href='http://1023.io'>Yining Shi</a>.</p>
69+
<p>{{#i18n "p5.ble"}}{{/i18n}}<a target='_blank' href='http://1023.io'>Yining Shi</a>, <a target='_blank' href='http://www.jingwen-zhu.com/'>Jingwen Zhu</a>, <a target='_blank' href='https://tigoe.com/'>Tom Igoe</a>.</p>
7070
</div>
7171

7272
<div class="spacer"></div>

0 commit comments

Comments
 (0)