index.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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: 11px;
  12. background-color: #000;
  13. margin: 0px;
  14. }
  15. canvas {
  16. display: block;
  17. }
  18. </style>
  19. </head>
  20. <body ontouchstart="">
  21. <script type="module">
  22. import * as THREE from './js/three.module.js';
  23. import { APP } from './js/app.js';
  24. window.THREE = THREE; // Used by APP Scripts.
  25. var loader = new THREE.FileLoader();
  26. loader.load( 'app.json', function ( text ) {
  27. var player = new APP.Player();
  28. player.load( JSON.parse( text ) );
  29. player.setSize( window.innerWidth, window.innerHeight );
  30. player.play();
  31. document.body.appendChild( player.dom );
  32. window.addEventListener( 'resize', function () {
  33. player.setSize( window.innerWidth, window.innerHeight );
  34. } );
  35. } );
  36. /* edit button */
  37. </script>
  38. </body>
  39. </html>