Skip to content

Commit fd02fe4

Browse files
committed
Load images before creating canvas
1 parent 6fc9e8d commit fd02fe4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/unit/visual/cases/shapes.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,8 @@ visualSuite('Shape drawing', function() {
207207
});
208208

209209
visualTest('Texture coordinates', async function(p5, screenshot) {
210-
setup(p5);
211210
const tex = await p5.loadImage('/unit/assets/cat.jpg');
212-
211+
setup(p5);
213212
p5.texture(tex);
214213
p5.beginShape(p5.QUAD_STRIP);
215214
p5.vertex(10, 10, 0, 0, 0);
@@ -222,9 +221,8 @@ visualSuite('Shape drawing', function() {
222221
});
223222

224223
visualTest('Normalized texture coordinates', async function(p5, screenshot) {
225-
setup(p5);
226224
const tex = await p5.loadImage('/unit/assets/cat.jpg');
227-
225+
setup(p5);
228226
p5.texture(tex);
229227
p5.textureMode(p5.NORMAL);
230228
p5.beginShape(p5.QUAD_STRIP);

0 commit comments

Comments
 (0)