Skip to content

Commit

Permalink
Use normalize() in test
Browse files Browse the repository at this point in the history
  • Loading branch information
davepagurek committed Dec 18, 2024
1 parent e91e894 commit 7bbbdec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/unit/visual/cases/webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,15 @@ visualSuite('WebGL', function() {
'/unit/assets/Inconsolata-Bold.ttf'
);
p5.textSize(20);
p5.textAlign(p5.CENTER, p5.TOP);
const geom = font.textToModel('p5*js', 0, 0, {
sampleFactor: 2
});
geom.normalize();
p5.background(255);
p5.normalMaterial();
p5.rotateX(p5.PI*0.1);
p5.rotateY(p5.PI*0.1);
p5.scale(50/200);
p5.model(geom);
screenshot();
});
Expand All @@ -518,15 +519,16 @@ visualSuite('WebGL', function() {
'/unit/assets/Inconsolata-Bold.ttf'
);
p5.textSize(20);
p5.textAlign(p5.CENTER, p5.TOP);
const geom = font.textToModel('p5*js', 0, 0, {
extrude: 10,
sampleFactor: 2
});
geom.normalize();
p5.background(255);
p5.normalMaterial();
p5.rotateX(p5.PI*0.1);
p5.rotateY(p5.PI*0.1);
p5.scale(50/200);
p5.model(geom);
screenshot();
});
Expand Down
Binary file modified test/unit/visual/screenshots/WebGL/textToModel/Extruded/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/unit/visual/screenshots/WebGL/textToModel/Flat/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7bbbdec

Please sign in to comment.