ReactVision / viro

ViroReact: The AR and VR library for React Native πŸ“³πŸ’™πŸ’›πŸ€πŸ’š

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extrusionDepth in ViroText renders wrong when it located inside of ViroFlexView

illlama opened this issue Β· comments

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: What Android OS version (7.0, 8.0, etc.) or iOS version (11.0, 11.2) is your device running on? 17
  3. Version: ^2.23.0 / ^0.72.5
  4. Device(s): What device(s) are you are seeing the issue on (i.e. iPhone X, Samsung Note 8, etc) iPhone14Pro

Description

When the ViroText is located inside of ViroFlexView, 3D text runs wierd.

<ViroFlexView
      onDrag={(positionValue) => handlePositionState(positionValue)}
      onPinch={(pinchState, scaleFactor) => handleScaleState(pinchState, scaleFactor)}
      position={positionState}
      rotation={rotation}
      height={6}
      width={7}
      scale={[scaleState, scaleState, scaleState]}
    >
        <ViroText
          text={restoreNewLinesAndTabs(text)}
          materials={[`${colorName}Main`, `${colorName}Main`, `${colorName}Sub`]}
          style={{
            flex: 1,
            fontFamily: fontFamily,
            fontSize: 70,
            fontWeight: '700',
            textAlign: 'center'
          }}
          extrusionDepth={7}
        />
  </ViroFlexView>

if I remove ViroFlexView, it renders fine.
But I should use ViroText twice inside of a view.
Do you know why this issue occurs?

Reproducible Demo

IMG_8973

Let us know how to reproduce the issue. Include a code sample, screen capture, video recording. The more information you provide, the better we can support you.