File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 2121 </ script >
2222
2323 < script type ="module ">
24- import { CalibrationInput } from './calibration-editor/calibration-editor.js'
24+ import { CalibrationInput } from './calibration-editor/calibration-editor.js' ;
2525
2626 function onCalibrationInput ( editor , calibration ) {
2727 editor . parentNode . removeChild ( editor ) ;
Original file line number Diff line number Diff line change 2424
2525 import * as THREE from 'three' ;
2626 import * as MRC from 'reality-mixer' ;
27+ import { CalibrationInput } from './calibration-editor/calibration-editor.js' ;
2728
2829 import { BoxLineGeometry } from '../node_modules/three/examples/jsm/geometries/BoxLineGeometry.js' ;
2930 import { VRButton } from '../node_modules/three/examples/jsm/webxr/VRButton.js' ;
4445
4546 const clock = new THREE . Clock ( ) ;
4647
47- init ( ) ;
48- animate ( ) ;
48+ // Mixed Reality Calibration Input
4949
50- function init ( ) {
50+ function onCalibrationInput ( editor , calibration ) {
51+ editor . parentNode . removeChild ( editor ) ;
52+ console . log ( calibration ) ;
53+
54+ init ( calibration ) ;
55+ animate ( ) ;
56+ }
57+
58+ const calibrationInput = CalibrationInput ( onCalibrationInput ) ;
59+
60+ document . body . appendChild ( calibrationInput ) ;
61+
62+ //
63+
64+ function init ( calibration ) {
5165
5266 scene = new THREE . Scene ( ) ;
5367 scene . background = new THREE . Color ( 0x505050 ) ;
89103
90104 // Mixed Reality Capture
91105
92- const cameraCalibration = new MRC . CameraCalibration ( ) ;
93- const chromaKey = new MRC . ChromaKey ( ) ;
94- const delayInFrames = 5 ;
95- const calibration = new MRC . Calibration ( cameraCalibration , chromaKey , delayInFrames ) ;
96-
97106 mixedRealityCapture = new MRC . MixedRealityCapture ( calibration ) ;
98107
99108 //
You can’t perform that action at this time.
0 commit comments