Skip to content

Commit dbe9c93

Browse files
committed
Move credit below hero text, fix Loading Images to use local asset
1 parent 7dc6b77 commit dbe9c93

3 files changed

Lines changed: 8 additions & 21 deletions

File tree

assets/examples_js/Basics/web/Loading_Images/Loading_Images.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,12 @@ function preload() {
66

77
function setup() {
88
createCanvas(640, 360);
9+
noLoop();
910
}
1011

1112
function draw() {
1213
background(0);
13-
if (img && img.width > 0) {
14-
let h = img.height * (640 / img.width); // scale to fit width
15-
for (let i = 0; i < 5; i++) {
16-
image(img, 0, h * i, 640, h);
17-
}
18-
} else {
19-
fill(255);
20-
textAlign(CENTER);
21-
textSize(14);
22-
text('Loading...', width/2, height/2);
14+
for (let i = 0; i < 5; i++) {
15+
image(img, 0, img.height * i);
2316
}
2417
}

examples/loading-images.html

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,13 @@ <h1>Loading Images</h1>
7373
7474
function setup() {
7575
createCanvas(640, 360);
76+
noLoop();
7677
}
7778
7879
function draw() {
7980
background(0);
80-
if (img && img.width > 0) {
81-
let h = img.height * (640 / img.width); // scale to fit width
82-
for (let i = 0; i < 5; i++) {
83-
image(img, 0, h * i, 640, h);
84-
}
85-
} else {
86-
fill(255);
87-
textAlign(CENTER);
88-
textSize(14);
89-
text('Loading...', width/2, height/2);
81+
for (let i = 0; i < 5; i++) {
82+
image(img, 0, img.height * i);
9083
}
9184
}<\/script></body></html>`);doc.close();})();</script>
9285
<div class="code-block">

index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
<div class="left">
144144
<h1>C++ Mode for<br><span class="proc">Processing</span></h1>
145145
<p>Explore the <a href="/reference">reference</a> for the full API.</p>
146+
<p style="margin-top:1rem;font-size:0.85rem;color:#aaa;">Independently developed by Jose Llamas</p>
146147
</div>
147148
<div class="right">
148149
<img src="assets/cpp-logo.png" alt="Processing for C++">
@@ -173,7 +174,7 @@ <h2>Examples</h2>
173174
</div>
174175
</div>
175176

176-
<footer><p>Processing for C++</p><p style="margin-top:0.5rem;font-size:12px;color:#bbb;">Independently developed by Jose Llamas</p></footer>
177+
<footer><p>Processing for C++</p></footer>
177178

178179
<script>
179180
new p5(function(p) {

0 commit comments

Comments
 (0)