Explorar o código

Docs: Add additional note in WebVR guide

Mugen87 %!s(int64=6) %!d(string=hai) anos
pai
achega
97192f6802
Modificáronse 1 ficheiros con 15 adicións e 7 borrados
  1. 15 7
      docs/manual/en/introduction/How-to-create-VR-content.html

+ 15 - 7
docs/manual/en/introduction/How-to-create-VR-content.html

@@ -21,9 +21,17 @@
 	<h2>Workflow</h2>
 
 	<p>
-		You have to include [link:https://github.com/mrdoob/three.js/blob/master/examples/js/vr/WebVR.js WebVR.js]
-		into your project. *WEBVR.createButton()* does two important things: First, it creates a button which indicates
-		VR compatibility. Second, it initiates a VR session if the user activates the button. The only thing you have
+		First, you have to include [link:https://github.com/mrdoob/three.js/blob/master/examples/js/vr/WebVR.js WebVR.js]
+		into your project.
+	</p>
+
+	<code>
+&lt;script src="/path/to/WebVR.js"&gt;&lt;/script&gt;
+	</code>
+
+	<p>
+		*WEBVR.createButton()* does two important things: It creates a button which indicates
+		VR compatibility. Besides, it initiates a VR session if the user activates the button. The only thing you have
 		to do is to add the following line of code to your app.
 	</p>
 
@@ -32,7 +40,7 @@ document.body.appendChild( WEBVR.createButton( renderer ) );
 	</code>
 
 	<p>
-		Next, you have to tell your instance of *WebGLRenderer* to enable VR rendering:
+		Next, you have to tell your instance of *WebGLRenderer* to enable VR rendering.
 	</p>
 
 	<code>
@@ -45,11 +53,11 @@ renderer.vr.enabled = true;
 	</p>
 
 	<code>
-function animate() {
+renderer.setAnimationLoop( function () {
 
-	renderer.setAnimationLoop( render );
+	renderer.render( scene, camera );
 
-}
+} );
 	</code>
 
 	<h2>Next Steps</h2>