// import { 
//     Scene, 
//     PerspectiveCamera, 
//     WebGLRenderer, 
//     Clock,
//     Matrix4,
//     Euler,
//     sRGBEncoding,
//     Math as ThreeMath
//   } from 'three';

//   import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';

//   import { Loader3DTiles } from 'three-loader-3dtiles';
//   import { CameraRig, FreeMovementControls } from 'three-story-controls'

//   import Stats from 'three/examples/jsm/libs/stats.module.js';
//   import StatsWidget from '@probe.gl/stats-widget';

//   const queryParams = new URLSearchParams(document.location.search);

//   const canvasParent = document.querySelector('#canvas-parent');
//   const statsParent = document.querySelector('#stats-widget')

//   const scene = new Scene();
//   const camera = new PerspectiveCamera(
//     35,
//     1,
//     0.01,
//     1000,
//   );

//   const renderer = new WebGLRenderer();
//   renderer.outputEncoding = sRGBEncoding;

//   const clock = new Clock()
//   const rig = new CameraRig(camera, scene)
  
//   let controls = undefined;

//   if (queryParams.get('orbit')) {
//     controls = new OrbitControls( camera, canvasParent);
//     controls.listenToKeyEvents( document.body );
//     camera.position.set(0,200,0);
//     controls.update();
//   } else {
//     controls = new FreeMovementControls(rig, {
//       panDegreeFactor: 2,
//       wheelScaleFactor: 0.01,
//       keyboardScaleFactor: 0.015,
//       keyboardDampFactor: 0
//     });
//     controls.enable();
//   }
  
//   canvasParent.appendChild(renderer.domElement);

//   const threeJsStats = new Stats();
//   threeJsStats.domElement.style.position = 'absolute';
//   threeJsStats.domElement.style.top = '10px';
//   threeJsStats.domElement.style.left = '10px';

//   canvasParent.appendChild( threeJsStats.domElement );

//   let tilesRuntime = undefined;
//   let statsRuntime = undefined;

//   if (queryParams.get('tilesetUrl')) {
//     document.querySelector('#example-desc').style.display = 'none';
//   }
  
//   async function loadTileset() {
//     const result = await Loader3DTiles.load(
//       {
//         url:
//           queryParams.get('tilesetUrl') ??
//          'https://int.nyt.com/data/3dscenes/ONA360/TILESET/0731_FREEMAN_ALLEY_10M_A_36x8K__10K-PN_50P_DB/tileset_tileset.json',
//         renderer: renderer,
//         options: {
//           dracoDecoderPath: 'https://cdn.jsdelivr.net/npm/three@0.137.0/examples/js/libs/draco',
//           basisTranscoderPath: 'https://cdn.jsdelivr.net/npm/three@0.137.0/examples/js/libs/basis',
//           maximumScreenSpaceError: queryParams.get('sse') ?? 48,
//         }
//       }
//     );

//     const {model, runtime} = result;
//     model.rotation.set(-Math.PI / 2, 0, Math.PI / 2);

//     if (!queryParams.get('tilesetUrl')) {
//       model.position.set(-1, 4, -16);
//     }

//     tilesRuntime = runtime;
//     scene.add(model);

//     statsRuntime = new StatsWidget(runtime.getStats(), {container: statsParent });
//     statsParent.style.visibility = 'visible';
//   }

//   function render(t) {
//     const dt = clock.getDelta()
//     controls.update(t);
//     if (tilesRuntime) {
//       tilesRuntime.update(dt, renderer, camera);
//     }
//     if (statsRuntime) {
//       statsRuntime.update();
//     }
//     renderer.render(scene, camera);
//     threeJsStats.update();
//     window.requestAnimationFrame(render);

//   }

//   function onWindowResize() {
//     renderer.setSize(canvasParent.clientWidth, canvasParent.clientHeight);
//     camera.aspect = canvasParent.clientWidth / canvasParent.clientHeight;
//     camera.updateProjectionMatrix();
//   }
  
//   export default class App{
//     constructor(){
//     }

//     start(){
//         loadTileset();
//         onWindowResize();
//         window.addEventListener('resize', onWindowResize);
//         render();
//     }
//   }

//   let app = new App();
//   app.start();

import { mergeScene } from './MergeScene.js';

export default class App{
  constructor(){
    mergeScene.start();
  }
}

let app = new App();

//https://threejs.org/examples/?q=editor#webgl_geometry_spline_editor