@@ -300,7 +300,7 @@ We'll draw it to the canvas in `draw()`. `imageMode(CENTER)` lets us position th
300300 image(
301301 bgImg,
302302 0, 0, width, height, // Destination size
303- 0, 0, bgImg.width, bgImg.height, //Src size
303+ 0, 0, bgImg.width, bgImg.height, // Source
304304 COVER // Fill the area without distortion
305305 );
306306
@@ -369,7 +369,7 @@ In WebGL mode, if you want to treat 3D content like a flat 2D image, you can fla
369369 image(
370370 bgImg,
371371 0, 0, width, height, // Destination size
372- 0, 0, bgImg.width, bgImg.height, //src size
372+ 0, 0, bgImg.width, bgImg.height, // Source
373373 COVER // Fill the area without distortion
374374 );
375375
@@ -443,7 +443,7 @@ At this point, the text starts clipping through the background image. We can rep
443443 image(
444444 bgImg,
445445 0, 0, width, height, // Destination size
446- 0, 0, bgImg.width, bgImg.height, //Src size
446+ 0, 0, bgImg.width, bgImg.height, // Source
447447 COVER // Fill the area without distortion
448448 );
449449
@@ -525,7 +525,7 @@ To start with, let's remove the stroke on it with `noStroke()`. Then, we'll turn
525525 image(
526526 bgImg,
527527 0, 0, width, height, // Destination size
528- 0, 0, bgImg.width, bgImg.height, //Src size
528+ 0, 0, bgImg.width, bgImg.height, // Source
529529 COVER // Fill the area without distortion
530530 );
531531
@@ -752,7 +752,7 @@ Here's how it looks in context:
752752 image(
753753 bgImg,
754754 0, 0, width, height, // Destination size
755- 0, 0, bgImg.width, bgImg.height, //Src size
755+ 0, 0, bgImg.width, bgImg.height, // Source
756756 COVER // Fill the area without distortion
757757 );
758758
@@ -864,7 +864,7 @@ If your paper texture image is darkening the resulting image too much, we can dr
864864 image(
865865 bgImg,
866866 0, 0, width, height, // Destination size
867- 0, 0, bgImg.width, bgImg.height, //Src size
867+ 0, 0, bgImg.width, bgImg.height, // Source
868868 COVER // Fill the area without distortion
869869 );
870870
@@ -1025,7 +1025,7 @@ function draw() {
10251025 image(
10261026 bgImg,
10271027 0, 0, width, height, // Destination size
1028- 0, 0, bgImg.width, bgImg.height, //Src size
1028+ 0, 0, bgImg.width, bgImg.height, // Source
10291029 COVER // Fill the area without distortion
10301030 );
10311031
@@ -1068,7 +1068,7 @@ function draw() {
10681068 image(
10691069 paperImg,
10701070 0, 0, width, height, // Destination size
1071- 0, 0, paperImg.width, paperImg.height, //Src size
1071+ 0, 0, paperImg.width, paperImg.height, // Source
10721072 COVER // Fill the area without distortion
10731073 );
10741074 pop();
@@ -1205,7 +1205,7 @@ We can use that same `easeOutElastic` to animate a `scale()` that we apply befor
12051205 image(
12061206 bgImg,
12071207 0, 0, width, height, // Destination size
1208- 0, 0, bgImg.width, bgImg.height, //Src size
1208+ 0, 0, bgImg.width, bgImg.height, // Source
12091209 COVER // Fill the area without distortion
12101210 );
12111211
@@ -1406,7 +1406,7 @@ Try experimenting with different offsets to see what kind of effect you get! I'v
14061406 image(
14071407 bgImg,
14081408 0, 0, width, height, // Destination size
1409- 0, 0, bgImg.width, bgImg.height, //Src size
1409+ 0, 0, bgImg.width, bgImg.height, // Source
14101410 COVER // Fill the area without distortion
14111411 );
14121412
@@ -1527,7 +1527,10 @@ letters.forEach((letter, i) => {
15271527 // Base progress off of the stored letter
15281528 // start time
15291529 // /////////////////////////////////////////
1530- let progress = map (millis (), letterStartTimes[i], letterStartTimes[i] + 2000 , 0 , 1 , true );
1530+ let progress = map (millis (),
1531+ letterStartTimes[i],
1532+ letterStartTimes[i] + 2000 ,
1533+ 0 , 1 , true );
15311534 progress = easeOutElastic (progress);
15321535 push ();
15331536 scale (progress);
@@ -1617,7 +1620,7 @@ Try wiggling your mouse over the letters!
16171620 image(
16181621 bgImg,
16191622 0, 0, width, height, // Destination size
1620- 0, 0, bgImg.width, bgImg.height, //Src size
1623+ 0, 0, bgImg.width, bgImg.height, // Source
16211624 COVER // Fill the area without distortion
16221625 );
16231626
0 commit comments