We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Am developing an app for Meta Quest 3 using viro.
Below is the code I tried.
import { ViroARScene, ViroARSceneNavigator, ViroScene, ViroText, ViroTrackingReason, ViroTrackingStateConstants, ViroVRSceneNavigator, } from "@reactvision/react-viro"; import React, { useState } from "react"; import { StyleSheet } from "react-native"; const HelloWorldSceneAR = () => { const [text, setText] = useState("Initializing AR..."); function onInitialized(state: any, reason: ViroTrackingReason) { console.log("onInitialized", state, reason); if (state === ViroTrackingStateConstants.TRACKING_NORMAL) { setText("Hello World!"); } else if (state === ViroTrackingStateConstants.TRACKING_UNAVAILABLE) { // Handle loss of tracking } } return ( <ViroARScene onTrackingUpdated={onInitialized}> <ViroText text={text} scale={[0.5, 0.5, 0.5]} position={[0, 0, -1]} style={styles.helloWorldTextStyle} /> </ViroARScene> ); }; export default () => { return ( <ViroARSceneNavigator autofocus={true} initialScene={{ scene: HelloWorldSceneAR, }} style={styles.f1} /> ); }; var styles = StyleSheet.create({ f1: { flex: 1 }, helloWorldTextStyle: { fontFamily: "Arial", fontSize: 30, color: "#ffffff", textAlignVertical: "center", textAlign: "center", }, });
This is how it looks in android phone
When I run in MQ3
UPDATE 10 Jul 2024 12.31 PM
the on initialized function return as
onInitialized 1 1
state is 1 which means ViroTrackingStateConstants.TRACKING_UNAVAILABLE reaon is 1 which means ViroARTrackingReasonConstants.TRACKING_REASON_NONE
state value one means AR Camera position is not available.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Am developing an app for Meta Quest 3 using viro.
Below is the code I tried.
This is how it looks in android phone
When I run in MQ3
UPDATE 10 Jul 2024 12.31 PM
the on initialized function return as
state is 1 which means ViroTrackingStateConstants.TRACKING_UNAVAILABLE
reaon is 1 which means ViroARTrackingReasonConstants.TRACKING_REASON_NONE
state value one means AR Camera position is not available.
The text was updated successfully, but these errors were encountered: