ReactVision / viro

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

Viro3DSceneNavigator issue #134

Open Pablo4Coding opened 2 years ago

Pablo4Coding commented 2 years ago

Requirements:

Please go through this checklist before opening a new issue

Environment

  1. Development OS: MacOS M1 and Visual Studio Code
  2. Device OS & Version: iOS version 15.4.1
  3. Version: ViroReact version 2.23.0, React Native version 0.68.0
  4. Device(s): iPhone 11

Description

Viro3DSceneNavigator with a ViroScene to render a simple Text in 3D is not working.

Screen component:

      <Viro3DSceneNavigator initialScene={{ scene: MyScene }} />

MyScene component:

import { ViroScene, ViroText } from '@viro-community/react-viro';
import React from 'react';

const MyScene = () => {
  return (
    <ViroScene>
      <ViroText text="Text B" position={[0, -0.1, -1]} />
    </ViroScene>
  );
};

export default MyScene;

My editor is showing the following error:

image

Type '() => Element' is missing the following properties from type 'ViroScene': _onPlatformUpdate, _onCameraTransformUpdate, findCollisionsWithRayAsync, findCollisionsWithShapeAsync, and 31 more.ts(2740)
Viro3DSceneNavigator.d.ts(37, 9): The expected type comes from property 'scene' which is declared here on type '{ scene: ViroScene; }'

And when trying to access the view, I get the following error: IMG_661F843F33BC-1

 ERROR  TypeError: undefined is not an object (evaluating 'delete this.sceneNavigator.viroAppProps.rootTag')

In another part of the application, I am successfully using a ViroARSceneNavigator with a ViroARScene and it's working as a charm.

Any help would be much appreciated it!

yasheshcygbit commented 2 years ago

Hi @Pablo4Coding , did you get this working? I am facing the same issue with Viro3DSceneNavigator. If this didn't work, did you find a way to just load a 3D Object with a solid background(no AR/VR stuff)?

thangld322 commented 1 year ago

@yasheshcygbit did you find a solution for no AR/VR stuff? Thanks

genesy commented 1 year ago

still an issue..