index.html 875 字节
Newer Older
M
r74  
Mr.doob 已提交
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
<!DOCTYPE html>
<html lang="en">
	<head>
		<title>three.js</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<style>
		body {
			background-color: #000;
			margin: 0px;
			overflow: hidden;
		}
		</style>
	</head>
	<body ontouchstart="">
		<script src="js/three.min.js"></script>
		<script src="js/app.js"></script>
		<script>

			var loader = new THREE.XHRLoader();
			loader.load( 'app.json', function ( text ) {

				var player = new APP.Player();
				player.load( JSON.parse( text ) );
				player.setSize( window.innerWidth, window.innerHeight );
				player.play();

				document.body.appendChild( player.dom );

				window.addEventListener( 'resize', function () {
					player.setSize( window.innerWidth, window.innerHeight );
				} );

			} );

		</script>
	</body>
M
Mr.doob 已提交
38
</html>