├── .watchmanconfig ├── .babelrc ├── .gitignore ├── static_assets └── chess-world.jpg ├── .flowconfig ├── __tests__ └── client.js ├── vr ├── client.js └── index.html ├── rn-cli.config.js ├── package.json └── index.vr.js /.watchmanconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *~ 3 | *.log 4 | *.js.meta 5 | node_modules/ 6 | build/ 7 | -------------------------------------------------------------------------------- /static_assets/chess-world.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sitepoint-editors/GDVR_REACTVR_SITEPOINT_GALLERY/HEAD/static_assets/chess-world.jpg -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*/node_modules/.* 3 | 4 | [include] 5 | 6 | [libs] 7 | 8 | [options] 9 | emoji=true 10 | module.system=haste 11 | -------------------------------------------------------------------------------- /__tests__/client.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import 'react-vr'; 3 | import React from 'react'; 4 | import Index from '../index.vr.js'; 5 | 6 | // Note: test renderer must be required after react-native. 7 | import renderer from 'react-test-renderer'; 8 | 9 | it('renders correctly', () => { 10 | const tree = renderer.create( 11 | 12 | ); 13 | }); 14 | -------------------------------------------------------------------------------- /vr/client.js: -------------------------------------------------------------------------------- 1 | // Auto-generated content. 2 | // This file contains the boilerplate to set up your React app. 3 | // If you want to modify your application, start in "index.vr.js" 4 | 5 | // Auto-generated content. 6 | import {VRInstance} from 'react-vr-web'; 7 | 8 | function init(bundle, parent, options) { 9 | const vr = new VRInstance(bundle, 'GDVR_REACTVR_SITEPOINT_GALLERY', parent, { 10 | // Add custom options here 11 | ...options, 12 | }); 13 | vr.render = function() { 14 | // Any custom behavior you want to perform on each frame goes here 15 | }; 16 | // Begin the animation loop 17 | vr.start(); 18 | return vr; 19 | } 20 | 21 | window.ReactVR = {init}; 22 | -------------------------------------------------------------------------------- /rn-cli.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var path = require('path'); 4 | var blacklist = require('./node_modules/react-native/packager/blacklist'); 5 | 6 | var config = { 7 | getProjectRoots() { 8 | return getRoots(); 9 | }, 10 | 11 | getBlacklistRE() { 12 | return blacklist([ 13 | ]); 14 | }, 15 | 16 | getAssetExts() { 17 | return ['obj', 'mtl']; 18 | }, 19 | 20 | getPlatforms() { 21 | return ['vr']; 22 | }, 23 | 24 | getProvidesModuleNodeModules() { 25 | return ['react-native', 'react-vr']; 26 | }, 27 | }; 28 | 29 | function getRoots() { 30 | var root = process.env.REACT_NATIVE_APP_ROOT; 31 | if (root) { 32 | return [path.resolve(root)]; 33 | } 34 | return [path.resolve(__dirname)]; 35 | } 36 | 37 | module.exports = config; -------------------------------------------------------------------------------- /vr/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | GDVR_REACTVR_SITEPOINT_GALLERY 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "GDVR_REACTVR_SITEPOINT_GALLERY", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node -e \"console.log('open browser at http:/localhost:8081/vr/\\n\\n');\" && node node_modules/react-native/local-cli/cli.js start", 7 | "bundle": "node node_modules/react-vr/scripts/bundle.js", 8 | "open": "node -e \"require('xopen')('http://localhost:8081/vr/')\"", 9 | "test": "jest" 10 | }, 11 | "dependencies": { 12 | "ovrui": "~1.0.0", 13 | "react": "~15.4.1", 14 | "react-native": "~0.42.0", 15 | "three": "^0.80.1", 16 | "react-vr": "~1.0.0", 17 | "react-vr-web": "~1.0.0" 18 | }, 19 | "devDependencies": { 20 | "babel-jest": "^19.0.0", 21 | "babel-preset-react-native": "^1.9.1", 22 | "jest": "^19.0.2", 23 | "react-test-renderer": "~15.4.1", 24 | "xopen": "1.0.0" 25 | }, 26 | "jest": { 27 | "preset": "react-vr" 28 | } 29 | } -------------------------------------------------------------------------------- /index.vr.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | AppRegistry, 4 | asset, 5 | StyleSheet, 6 | Pano, 7 | Text, 8 | View, 9 | } from 'react-vr'; 10 | 11 | export default class GDVR_REACTVR_SITEPOINT_GALLERY extends React.Component { 12 | render() { 13 | return ( 14 | 15 | 16 | 28 | hello 29 | 30 | 31 | ); 32 | } 33 | }; 34 | 35 | AppRegistry.registerComponent('GDVR_REACTVR_SITEPOINT_GALLERY', () => GDVR_REACTVR_SITEPOINT_GALLERY); 36 | --------------------------------------------------------------------------------