-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
44 lines (38 loc) · 966 Bytes
/
main.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
import Framework, { scene } from 'froobit';
import { images } from './src/client/assets/images';
import { config } from './src/client/lib/config';
import { startReactFrontend } from './src/app';
import { Layers } from './src/client/lib/layers';
import CaptureBackgroundController from './src/client/controller/CaptureBackgroundController';
import ReplacementController from './src/client/controller/ReplacementController';
import './src/style/style.scss';
// Entry point
const assets = {
images,
};
const {
viewport,
containerId,
} = config;
const ARStage = {
name: 'ARStage',
runFirst: true,
controllers: [
CaptureBackgroundController,
ReplacementController,
],
};
const options = {
assets,
autoLoad: true,
containerId,
scene: scene(viewport.width, viewport.height),
loading: {
text: 'Loading...',
},
fullscreen: true,
landscape: true,
layers: Layers,
};
const arApp = Framework.with([ ARStage ], options);
startReactFrontend({ arApp });