-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclient.js
More file actions
39 lines (33 loc) · 1.03 KB
/
client.js
File metadata and controls
39 lines (33 loc) · 1.03 KB
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
// This file contains the boilerplate to execute your React app.
// If you want to modify your application's content, start in "index.js"
import {Location, ReactInstance, Surface} from 'react-360-web';
import ConexionModule from './ConexionModule';
const photosPanel = new Surface(700, 600, Surface.SurfaceShape.Cylinder);
function init(bundle, parent, options = {}) {
const r360 = new ReactInstance(bundle, parent, {
// Add custom options here
fullScreen: true,
nativeModules: [
ctx => new ConexionModule(ctx),
],
...options,
});
r360.renderToLocation(
r360.createRoot('Marks'),
r360.getDefaultLocation(),
);
const sup = r360.getDefaultSurface();
sup.setShape(Surface.SurfaceShape.Flat);
sup.resize(200, 90);
sup.setAngle(0, -0.4);
r360.renderToSurface(
r360.createRoot('Ediphy360', { /* initial props */ }),
sup
);
r360.renderToSurface(
r360.createRoot('Proyector'),
photosPanel,
);
r360.compositor.setBackground('./static_assets/360_world.jpg');
}
window.React360 = {init};