Skip to content

Commit 5e557e5

Browse files
committed
Fix textToModel face normals for extruded text
1 parent fc8ca8a commit 5e557e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/type/p5.Font.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ export class Font {
591591
if (extrude !== 0) {
592592
geom.computeNormals();
593593
for (const face of geom.faces) {
594-
if (face.every(idx => geom.vertices[idx].z <= -extrude * 0.5 + 0.1)) {
594+
if (face.every(idx => geom.vertices[idx].z <= -extrude * 0.5 + 0.1 || geom.vertices[idx].z >= extrude * 0.5 - 0.1)) {
595595
for (const idx of face) geom.vertexNormals[idx].set(0, 0, -1);
596596
face.reverse();
597597
}

0 commit comments

Comments
 (0)