Giter Site home page Giter Site logo

viromedia / viro Goto Github PK

View Code? Open in Web Editor NEW
2.2K 67.0 474.0 1.93 GB

ViroReact: AR and VR using React Native

License: MIT License

JavaScript 45.26% Java 24.72% Ruby 0.63% Objective-C 8.42% Shell 0.76% Objective-C++ 20.09% Starlark 0.12%
vr virtual-reality react-native cross-platform daydream gear-vr cardboard oculus react mobile-vr

viro's People

Contributors

achuvm avatar dam00n avatar dthian avatar hless avatar manbod avatar radvani avatar vikadvani avatar virohalliday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

viro's Issues

Run setup_ide.sh Script

Trying on a setup on Mac

Set up Android Studio with Viro
Run setup_ide.sh Script

-bash: ./setup_ide.sh: No such file or directory

Recent update Bug

Hi, I've seen that you updated your project.

I have couple of problems while launching my project such as "No dimension set for key window"
I don't know what's happening .

And another previous one which said :

var PropTypes = require('react/lib/ReactPropTypes');

Any help would be great.

Thanks

Michael

Preset GrvViewerParams

Hi folks,
First of all, thank you very much @VikAdvani for the help in the last days. We have managed to develop an awesome cardboard experience for both Android and iOS, everybody on the agency are going nuts with crazy ideias 😄 So also, thank you all for providing this amazing platform.

One of our ideias envolves delivering for each end-user a cardboard headset and a link to app on the stores. So we are wondering if its possible to define through Viro a default set of headset params (the same as we would deliver) so the user can skip the QR mapping process. How can we accomplish that? Didn't found anything like these on the docs.

Cheers.

On Fuse Crash when Unmounting Views

Issue: Views with an onFuse callback, that has code to unmount itself, crashes.

For example:

_getImage() {
    if (this.state.showImage) {
      return (
        <ViroImage position={[0, 0, -1]}
          source={{uri: "https://images.sftcdn.net/images/t_optimized,f_auto/p/50d2f4ce-96d1-11e6-8a53-00163ed833e7/3980672443/google-earth-screenshot.jpg"}}
          onFuse={()=>{this.setState({showImage : false})}} />
      );
    } else {
      return;
    }
  }

java.lang.RuntimeException: createContext failed: EGL_BAD_CONTEXT

09-21 17:53:45.852 3615-3720/com.hellovr E/AndroidRuntime: FATAL EXCEPTION: GLThread 31579
                                                           Process: com.hellovr, PID: 3615
                                                           java.lang.RuntimeException: createContext failed: EGL_BAD_CONTEXT
                                                               at com.google.vr.ndk.base.GvrSurfaceView$EglHelper.throwEglException(GvrSurfaceView.java:1226)
                                                               at com.google.vr.ndk.base.GvrSurfaceView$EglHelper.throwEglException(GvrSurfaceView.java:1217)
                                                               at com.google.vr.ndk.base.GvrSurfaceView$EglHelper.start(GvrSurfaceView.java:1051)
                                                               at com.google.vr.ndk.base.GvrSurfaceView$GLThread.guardedRun(GvrSurfaceView.java:1479)
                                                               at com.google.vr.ndk.base.GvrSurfaceView$GLThread.run(GvrSurfaceView.java:1323)

React Viro 1.1.0 on Samsung S8

Quizz

Hello

I was wondering if you think that making a quiz will be easy to do with your plateform ?
Thanks for your help

Special accents

Hi, I'm trying to use ViroText and enter my text between "" but when i'm trying to write "é" or a character like this I have something strange like é .

I save my file in UTF-8 but without success.

Thanks for your help.

Michael

Conditions "if"

Hello ViroTeam,

Do you think that we can setup conditions with your plateform like :

Imagine there are 3 questions with 3 differents answers for each question only one answer is valid per question (Like True/False)

Building something like

IF specific buttons are clicked during the 3 questions THEN we can show the results on another
scene

Do you think it might work, I'm embarrassed to ask you again if you are able to build an exemple for this. If you can't I can understand

Thanks in advance

Michael

Video .mp4 didn't play

Hi,

I have insert a 360 video with .mp4 extension.
I can see the video but she didn't play.(Frozen)

Is there any things to do to autoplay ?

Here is my code :

<Viro360Video
source={require("./res/1.mp4")}
loop={true}
paused={false}
volume={1.0}
timeInSeconds={60} />

Thanks for your help.

Michael

Android OvrRelease build

Okay, I really need some help here.

I've successfully created and installed my "cardboard release" app on my iPhone.

Getting it over to Android for the GearVR is a whole other story. So, when I run from the testbed app or I just run a debug app on my Android - everything works (more or less - the 360videos never load but I'm chalking that up the network). I do have an oculus signature at android/app/src/assets

So I've tried building a release and signing in through Android Studio. Everything seems to install okay - but it crashes on launch. So I ran adb logcat and saw that as soon as it crashes and I'm seeing:

E/AndroidRuntime: FATAL EXCEPTION: mqt_js Process: com.virosample.ovr, PID: 27935 java.lang.RuntimeException: com.facebook.react.devsupport.JSException: Could not get BatchedBridge, make sure your bundle is packaged correctly at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:24) at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:158) at com.facebook.react.cxxbridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:431) at com.facebook.react.cxxbridge.CatalystInstanceImpl.access$400(CatalystInstanceImpl.java:51) at com.facebook.react.cxxbridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:447) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:33) at android.os.Looper.loop(Looper.java:207) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) at java.lang.Thread.run(Thread.java:818) Caused by: com.facebook.react.devsupport.JSException: Could not get BatchedBridge, make sure your bundle is packaged correctly at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) at android.os.Looper.loop(Looper.java:207)  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)  at java.lang.Thread.run(Thread.java:818)  Caused by: com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)  at android.os.Handler.handleCallback(Handler.java:815)  at android.os.Handler.dispatchMessage(Handler.java:104)  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)  at android.os.Looper.loop(Looper.java:207)  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)  at java.lang.Thread.run(Thread.java:818)  04-20 13:49:27.441 874-915/? E/MultiWindowProxy: getServiceInstance failed! 04-20 13:49:32.647 239-455/? E/MAL-Daemon: ( rds_ru_3gpp_status_ind, 1421) [RDS-E][RU][EVENT_RU_DM_3GPP_STATUS_IND] Invalid u43gpp_status:0x6 04-20 13:49:35.629 252-1145/? E/Drm: Failed to find drm plugin 04-20 13:49:35.669 252-1145/? E/Drm: Failed to find drm plugin

So a quick Google regarding BatchedBridge not being found - I see people saying that I need to run react-native start (which worked okay okay) and then run cd android && ./gradlew assembleRelease - this gets me as far as this bit of code:

`:app:bundleOvrReleaseJsAndAssets
Loading dependency graph, done.
Warning: The transform cache was reset.

'node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets/[email protected]' could not be found, because 'node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets' is not a subdirectory of any of the roots ('/Users/ashtonl/Development/ViroSample')

:app:bundleOvrReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:bundleOvrReleaseJsAndAssets'.

Process 'command 'node'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 55.071 secs`

Now I'm pretty much stuck here. I dunno what else I should try. Help!

undefined is not an object (evaluating 'nativeVersion.major')

Was trying to run the sample app as per the instructions on your website. I haven't changed anything in it, just downloaded it and ran it.

I'm running iOS 11.0.1 on an iPhone 6.

This is the stack trace:

undefined is not an object (evaluating 'nativeVersion.major')

<unknown>
    index.ios.bundle?platform=ios&dev=true:13908:55
loadModuleImplementation
    index.ios.bundle?platform=ios&dev=true:121:12
guardedLoadModule
    index.ios.bundle?platform=ios&dev=true:78:45
global code
    index.ios.bundle?platform=ios&dev=true:67839:9

[Question] - What component is similar to SCNVector3?

Hi @achuvm,

I'm wondering whether there is something like the SCNVector3 I can use with the Viro lib?

I build a simple app in XCode using this function to calculate the length of two selected points on a plane:

func calculateDistance(from: SCNVector3, to: SCNVector3) -> Float {
  let x = from.x - to.x
  let y = from.y - to.y
  let z = from.z - to.z
  return sqrtf( (x * x) + (y * y) + (z * z))
}

Is that possible with the Viro library?

Scene click coordinates on cardboard

I'm looking to capture the click/tap coordinates on 360 degree scene image because I want the user to be able to position and build 2D or 3D objects on the fly. The scene has an onClick function (_onClick(source)) but there are no coordinates. The onTouch looked like it had potential but it's not supported on Cardboard. Is there a way to capture the cardboard click position on the scene? It looks like I could get the value from the onTouch event if I used a different system like Daydream.

[Question] - ViroSurface onlick data

Hi @achuvm,

Thank you for your help so far. I'm learning more an more about the library and I love it.

I have a question regarding the data I'm receiving when I click on the ViroSurface. Here the video

When I click on a grid intersection I almost get the same data that looks like X,Y,Z coordinates. What do these numbers actually represent?

Thanks,
Tom

Building on Huwaei Honor - Launching on iPhone 6s

Hello, I'm building my experience with my Huawei Honor 8 Pro which has a bigger screen resolution than the iphone 6.

I build my app for iOS and launch it but when I put it in my cardboard it's very blurred do you know why it hasn't been transformed properly for the iphone ?

I'm on iOS 10.3.3 and on my Xcode project I have about 120 warning regarding deprecated method, are you able to update your xcode project for the latest version of IOS ?

Thanks for your help

Michael

[Question] - rawFeaturePoints

Hi there,

Is there a way to display the raw feature point clouds as described here

The reason why these points might be useful is when ViroARPlaneSelector can NOT detect a ViroARPlane because the internal method to detect a plane from the amount of points might have a certain threshold. It would be great to loop over these points to lower the threshold for plane detection.

[Question] - Plane stay visible after selection

Hi @achuvm,

I have refactored the ViroARPlaneSelector for my own project to display different materials for the Plane, which works beautifully.

I can't figure out how to keep the plane visible after I select it. Right now the plane gets swapped with a ViroNode and hence disappears.

What I'm trying to do is to display the Plane. A user can click 3 times on the plane to place 3 objects. These objects should ONLY be draggable within that surface.

Sorry for all the questions but the examples provided here are too basic to understand how the library works and I want to reduce time during trial & error. I hope you understand.

Cheers,
Tom

Reticule passing through the ViroImage

Hi, i'm experiencing something strange recently.

I have a background 360 photos and I put a ViroImage on it, When I click on this image it goes to the next scene BUT when the reticule is on it appears through the image and it's like squint.

Do you have any help on this ?

Thanks

Is there any maximum size for the 360pictures ?

Hi when i'm trying to upload a 360 pictures it show me an error in the terminal.
It seems that it check the width and height in the index.js located here : ViroSample/node_modules/image-size/lib/index.js

Is there any modification to do on that file ?

Thanks for your help

It doesn't work on samsung j7 prime and samsung j2 phones

09-30 01:27:23.227 8867-8978/com.virosample E/AndroidRuntime: FATAL EXCEPTION: GLThread 288
Process: com.virosample, PID: 8867
java.lang.IllegalArgumentException: eglChooseConfig failed
at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:853)
at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

[Question] - Plane styling

First of all, well done with the lib. The docs are very comprehensive.

I have a question regarding the ViroARPlaneSelector. Is there a way to style (assign color, opacity or image overlay) the ViroARPlane?

Thank you in advance.

Cheers,
Tom

Close or go-back button

Hi guys, thanks for the great tool. I am investigating an issue - I don't see a close or go-back button in VR mode(( Maybe there is a way to create a custom button which will close VR mode and land user back to the 2d menu?

Billboarded Element's bounding box do not accurate reflect element.

There seems to be an issue with the hit test triggering events when the user looks at objects at certain camera rotations. For example from the video below, you can see that the onFuse event on an object sometimes does not trigger, even the user is hovering right on top of it.

ezgif-1-2bfbaa4217

The root cause is mainly that the bounding box of billboarded elements are not correctly computed at certain angles - this causes the box to "Shrink" there by resulting in click misses.

Any Theater Project sample available ?

Hello once again lol.

I can see on your website than you offer 3 sample of your projects.

I would like to know if by any chance you are able to share your theater project ?

Thanks in advance

Michael

Offline Application ?

Hi I have try to install the app from Xcode.
Everything went smooth but I have a question do we always need an internet connection to use the app once installed on iOS devices for exemple ?

Thanks for the answer.

How do I enable non-VR or mono mode?

I would like to view my app full screen when I am not using a headset. How do I get the non-VR mode like you have in the Viro Media App (tapping "No" when the "Do you have a VR headset?" screen appears)

ViroARPlaneSelector questions.

I am trying out the tutorial on AR on my iPad Pro (model number: mlmn2ll/a). The iPad has iOS 11.0.1 and ARKit apps like IKEA Place works fine on it. But I am unable to get the component ViroARPlaneSelector to appear consistently in the testbed on Viro Media's app.

  1. Are iPads supported?

  2. Is there a debug/feedback loop that will let us know whether the framework has detected plane(s) in the scene?

[Question] Running App without any display

Shows
Warning: Native Component for "VRSceneNavigator" does not exist
Warning: Native Component fro "VRTARScene" does not exist
Warning: Native Component fro "VRTText" does not exist

What are the supported devices in android?

Video goes black after a few seconds playing

Right, so a was able to replace the image from the sample to a 360 video that a have.
The surprise is that the video plays nice for a few seconds, but then it goes black, the sound still on, the UI too (the gear icon and the line in the middle), but the video stops showing up.
Any ideias?

Running the Cardboard mode on a S7.

Thanks.

Not compatible with Daydream.

Hi just to let you know that your application is not fully compatible with the Google PIXEL and Daydream Headset.

I have seen a pop up to tell me that's incompatible.

That's just for feedback if you want to update your app :)

Cheers

Gear VR Remote ? Compatibility

Hello I was wondering if it's compatible with the remote of the Gear VR Headset ?

I already try with the Daydream and work properly but note with the Gear

Thanks

Michael

ViroSpinner w/Viro360Video

With the 360Video, there are only a few callbacks. I really wanna use the ViroSpinner, to showing that the video is loading when changing scenes but there's not a callback method that seems to be very useful. For instance, the Viro360Image has callbacks for onLoadStart and onLoadHide. Unless there's another way you'd suggest hiding the Spinner once the video begins to play?

Thanks!

Issues "Fetching JS Bundle"

Hi, I'm experienceing couple of problems recently .

I launched the npm start command from root directory.
I'm launching my app on the phone, enter the ip adress of my computer and check that both are on the same network.

The terminal say : "Loading dependency graph, done"
My phone has a black screen and say "Fetching JS Bundle"

I didn't have error message

I already try to restart with --no-caches.

Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.