瀏覽代碼

Docs: Probably better to encourage including the lib locally instead.

Mr.doob 12 年之前
父節點
當前提交
642abfe8f0
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      docs/manual/introduction/Creating-a-scene.html

+ 4 - 3
docs/manual/introduction/Creating-a-scene.html

@@ -121,7 +121,7 @@
 				<style>canvas { width: 100%; height: 100% }</style>
 			</head>
 			<body>
-				<script src="https://rawgithub.com/mrdoob/three.js/master/build/three.js"></script>
+				<script src="three.min.js"></script>
 				<script>
 					var scene = new THREE.Scene();
 					var camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000);
@@ -137,14 +137,15 @@
 
 					camera.position.z = 5;
 
-					function render() {
+					var render = function () {
 						requestAnimationFrame(render);
 
 						cube.rotation.x += 0.1;
 						cube.rotation.y += 0.1;
 
 						renderer.render(scene, camera);
-					}
+					};
+
 					render();
 				</script>
 			</body>