ReactVision / viro

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ViroFlexView renders differently on ARPlane vs when it's manually positioned

genesy opened this issue Β· comments

Reproducible Demo

      <ViroARPlaneSelector minHeight={0.1} minWidth={0.1} alignment="Vertical">
        <ViroFlexView
          height={1}
          width={1}
          rotation={[-90, 0, 0]}
        >
          <ViroFlexView
            style={{backgroundColor: 'red', flex: 0.5}}></ViroFlexView>
          <ViroFlexView
            style={{backgroundColor: 'green', flex: 0.5}}></ViroFlexView>
        </ViroFlexView>
      </ViroARPlaneSelector>

vs

        <ViroFlexView
          height={1}
          width={1}
          position={[0, 0, -3]}>
          <ViroFlexView
            style={{backgroundColor: 'red', flex: 0.5}}></ViroFlexView>
          <ViroFlexView
            style={{backgroundColor: 'green', flex: 0.5}}></ViroFlexView>
        </ViroFlexView>

The first one will show only green square
The second one will show correctly half red half green.

@genesy Which version of Viro were you using? React Native? MacOS/Windows? iOS/Android?