Discussions
blank screen
how to get ViroARSceneNavigator api key
Posted by [email protected] 12 months ago
How to model dynamically generated scenes and swapping between them
Hello community, I am having trouble when using dynamically generated scenes.
So in my project I generate ViroARScenes dynamically, i.e. I request some configuration JSON from an external API that defines how my scene should look like. For example, my Scene component would look something like:
```
function parseComponents(config) {
// Returns a list of AR objects.
// In my case, for example, a list of ViroARImageMarkers.
return [];
}
function Scene({config}) {
const arComponents = parseComponents(config);
return (
<ViroARScene>
{arComponents}
</ViroARScene>
);
}
function ARViewer({globalAppState}) {
return <ViroARSceneNavigator
initialScene={{scene: Scene}}
viroAppProps={{globalAppState}}
/>
}
```
This initially works perfectly fine, the trackers are set and the objects are displayed correctly. The problem arises when I want to replace this scene with a new one.
Lets say one of this AR objects has defined an `onClick` event function in which I change some state which leads to a new configuration to be passed on to my `Scene`. I would want this action to replace the current scene configuration with the new one, for example, replace the current ViroARImageMarkers with different ones. Clearing the objects that were rendered before. Like changing scenes, except here I don't have 2 distinct scene components because they are generated dynamically.
To attempt this, I am doing something like the following:
```
<ViroARImageMarker
target={"target"}
>
<ViroAmbientLight color="#ffffff"/>
<Viro3DObject onClick={onClick} {...modelProps} />
</ViroARImageMarker>
```
where:
```
function onClick() {
...
setGlobalAppState(newGlobalAppState);
navigator.replace({scene: Scene}); // Yes, the same Scene component.
}
```
Did anyone ever work with scenes that had to be generated dynamically? Does anyone have any suggestions or alternatives on how to model this type of functionality? Thanks in advance.
Posted by Juan Baustista Abdon about 1 year ago
Non-AR/VR example
Hello everyone!
I want to use Viro to load a 3D model from file and view it on my app but I can't find any example for it.
All examples I found are for AR/VR app.
Are there any examples for non-AR/VR app? Thanks.
Posted by [email protected] about 1 year ago
why i can not find this viro media in apple store in Australia
I want to use this app for AR function, but i can not find this viro media in apple store in Australia. I want to know how to solve this problem
Posted by Melo Geng about 1 year ago
ViroVideo is not working
When I try to use ViroVideo, it crashes my android app. I tried using Viro360Video, but it is also not working. Any help is much appreciated.
Posted by Priya over 1 year ago
viro ar crashing my AR app
My android app is getting crashed while getting back of AR camera. Please help me i am in very trouble.
can u tell me how to destroy the ViroNavigatorScreen.
Posted by divyang bargali over 1 year ago
When will next update of viro coming?
Hey, Viro Team this library is just awesome but many things are not stable yet. And the library uses whole class components and we are waiting for the next good update. Are we really planning to give future updates or whatever is available is final?
We are really waiting please post an update and viromedia.com is also down please let us know.
Posted by Mayuresh Patil over 1 year ago
Not able to upload IOS app on TestFlight
I am using viro react-native and for run this project i have to disable the Bitcode in Build option of Xcode
if i am trying to upload app on TestFlight with Bitcode disabled it shows me uploaded on Archive panel but it does not show in test flight
Posted by Sunil over 1 year ago
Body tracking with ARKit
Hello,
I am aware that ARkit in unity supports body tracking while ARcore does not. Am I able to use the ARkit body tracking functionality in React Native?
Posted by Lachlan Stewart over 1 year ago
Detect Real-world objects
Hi,
How can we detect real-world objects and label them as the image given in this link (https://developers.google.com/ar/develop/machine-learning). Please let me know if there is any way to achieve this.
Posted by Anusha over 1 year ago