Added option to not show back face of text#38
Added option to not show back face of text#38Danielbook wants to merge 5 commits intoGooTechnologies:masterfrom
Conversation
Added an optional option to textcomponents, option.backface {bool}.
The extrusion of the text is set to 0 if user don't want back facing text
| meshBuilder.addMeshData(meshData, transform); | ||
| } | ||
|
|
||
| if (options.backface) |
| frontFace(); | ||
| else // If the back face shouldn't be visible, set extrusion to 0s | ||
| if (options.backface) { | ||
| frontFace(); |
There was a problem hiding this comment.
Shouldnt it be the backface() that is drawn if options.backface is true?
Also, could you make the default behavior be to draw backface if nothing is specified (to behave like before), by doing options.backface = options.backface !== undefined ? options.backface || true; at the top?
There was a problem hiding this comment.
I agree with @rherlitz. Thank you for the review!
There was a problem hiding this comment.
Thanks for the review, added the options.backface at the top, but when i change that the backface() is to be drawn when option.backface is true, I get the text backwards. The text isn't visible on the other side of the material due to the other face not being drawn.
Updated the functions to draw correct face of glyph mesh
|
The bug was because of the extrusion, fixed now! Should be good to go 👍 |


Added an optional option to textcomponents, option.backface {bool}.
The extrusion of the text is set to 0 if user don't want back facing text