index.html 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title><!-- title --></title>
  5. <meta charset="utf-8">
  6. <meta name="generator" content="Three.js Editor">
  7. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  8. <style>
  9. body {
  10. font-family: sans-serif;
  11. font-size: 13px;
  12. background-color: #000;
  13. margin: 0px;
  14. overflow: hidden;
  15. }
  16. </style>
  17. </head>
  18. <body ontouchstart="">
  19. <script type="module">
  20. import * as THREE from './js/three.module.js';
  21. import { APP } from './js/app.js';
  22. var loader = new THREE.FileLoader();
  23. loader.load( 'app.json', function ( text ) {
  24. var player = new APP.Player( THREE );
  25. player.load( JSON.parse( text ) );
  26. player.setSize( window.innerWidth, window.innerHeight );
  27. player.play();
  28. document.body.appendChild( player.dom );
  29. window.addEventListener( 'resize', function () {
  30. player.setSize( window.innerWidth, window.innerHeight );
  31. } );
  32. } );
  33. /* edit button */
  34. </script>
  35. </body>
  36. </html>