-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.android.js
51 lines (43 loc) · 1.53 KB
/
index.android.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* Copyright (c) 2015-present, Viro Media, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import {
ViroSceneNavigator,
} from 'react-viro';
var scenes = {
'360 Photo Tour': require('./js/360PhotoTour/MainScene'),
'Hello World': require('./js/HelloWorld/HelloWorldScene'),
'Human Body': require('./js/HumanBody/MainScene'),
'TV Shopping': require('./js/TVShopping/TVShopping'),
'Viro Media Player': require('./js/ViroMediaPlayer/ViroTheatre'),
}
var ViroCodeSamplesSceneNavigator = React.createClass({
render: function() {
// The 'viroAppProps={{...this.props}}' line below is used to pass
// the initial properties from this base component to the ViroSceneNavigator
// which will allow the scenes to access them.
return (
<ViroSceneNavigator
initialScene={{
scene: scenes['Viro Media Player'],
}}
viroAppProps={{...this.props}}
apiKey="9782BD73-E740-4A78-8495-C4F4F0B01F3F"
/>
);
}
});
AppRegistry.registerComponent('VIPGearVR', () => ViroCodeSamplesSceneNavigator);
// register the component again as ViroSample to enable use with the testbed app
AppRegistry.registerComponent('VIPGearVR', () => ViroCodeSamplesSceneNavigator);