Explorar o código

Update Creating-a-scene.html

i had changed "var" to "let", changed again to "const"
aarón montoya-moraga %!s(int64=4) %!d(string=hai) anos
pai
achega
8c9d2706a2
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      docs/manual/en/introduction/Creating-a-scene.html

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

@@ -43,10 +43,10 @@
 		<p>To actually be able to display anything with three.js, we need three things: scene, camera and renderer, so that we can render the scene with camera.</p>
 
 		<code>
-		let scene = new THREE.Scene();
-		let camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
+		const scene = new THREE.Scene();
+		const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
 
-		let renderer = new THREE.WebGLRenderer();
+		const renderer = new THREE.WebGLRenderer();
 		renderer.setSize( window.innerWidth, window.innerHeight );
 		document.body.appendChild( renderer.domElement );
 		</code>