Skip to content

Commit 6de76df

Browse files
committed
Add depthTest prop
1 parent 95b2170 commit 6de76df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Text.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const RIGHT = 'right'
3232
* textureData: png font texture date - deafaults to roboto-regular
3333
* anchorVert, anchorHorz: The anchor point of the text object that will be placed at the placement point - defaults to the center
3434
* 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
3536
*/
3637
export const Text = ({
3738
text = '',
@@ -54,6 +55,7 @@ export const Text = ({
5455
anchorHorz = CENTER,
5556
positionVert = 50,
5657
positionHorz = 50,
58+
depthTest = true,
5759
}) => {
5860
// Font Data
5961
const font = useMemo(() => {
@@ -187,6 +189,7 @@ export const Text = ({
187189
/>
188190
<shaderMaterial
189191
attach='material'
192+
depthTest={depthTest}
190193
args={[
191194
{
192195
transparent: true,

0 commit comments

Comments
 (0)