ReactVision / viro

ViroReact: The AR and VR library for React Native 📳💙💛🤍💚
MIT License
1.36k stars 157 forks source link

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

Open genesy opened 2 years ago

genesy commented 2 years ago

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.

robertjcolley commented 8 months ago

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