File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export const RIGHT = 'right'
32
32
* textureData: png font texture date - deafaults to roboto-regular
33
33
* anchorVert, anchorHorz: The anchor point of the text object that will be placed at the placement point - defaults to the center
34
34
* positionVert, positionHorz: Percentage of viewport between the anchor and the top/left - defaults to the center of the viewport
35
+ * depthTest: Turn on/off render depth testinting - defaults to true
35
36
*/
36
37
export const Text = ( {
37
38
text = '' ,
@@ -54,6 +55,7 @@ export const Text = ({
54
55
anchorHorz = CENTER ,
55
56
positionVert = 50 ,
56
57
positionHorz = 50 ,
58
+ depthTest = true ,
57
59
} ) => {
58
60
// Font Data
59
61
const font = useMemo ( ( ) => {
@@ -187,6 +189,7 @@ export const Text = ({
187
189
/>
188
190
< shaderMaterial
189
191
attach = 'material'
192
+ depthTest = { depthTest }
190
193
args = { [
191
194
{
192
195
transparent : true ,
You can’t perform that action at this time.
0 commit comments