LoginSignup
5
5

More than 5 years have passed since last update.

webエンジニアがViroReactでAR/VRアプリ入門!

Last updated at Posted at 2019-02-11

ViroReactとは?

ViroReact is a developer platform for rapidly building AR/VR applications using React Native. Use a single code base for your AR and VR apps.

環境構築

まぁnpmとかyarnはみんな入ってるとして...

brewでwatchman, yarnでreact-native-cliとreact-viro-cliを入れる

$brew install watchman
$yarn global add react-native-cli
$yarn global add react-viro-cli

実機テストできるアプリをダウンロードしておきましょう

ViroReactでAPI_KEYをゲッチュしておきましょう

新規プロジェクト作成

とりあえずinit

$react-viro init ViroSample --verbose
$cd ViroSample
$yarn install

App.jsの25行目らへんに先程げっとしたAPI_KEYを書く

App.js
/*
 TODO: Insert your API key below
 */
var sharedProps = {
  apiKey:"API_KEY_HERE",
}

アプリ起動

$yarn start

アプリが動くURLが出てくるので、それをViroMediaのアプリにコピペします

http://xxxxxx.ngrok.io

さっきのURLをアプリ上に貼ると

Image from iOS (1).png

無事にハローワールドできました!

Image from iOS (2).png

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5