浏览代码

Docs: Add additional note in WebVR guide

Mugen87 6 年之前
父节点
当前提交
97192f6802
共有 1 个文件被更改,包括 15 次插入7 次删除
  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>
 	<h2>Workflow</h2>
 
 
 	<p>
 	<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.
 		to do is to add the following line of code to your app.
 	</p>
 	</p>
 
 
@@ -32,7 +40,7 @@ document.body.appendChild( WEBVR.createButton( renderer ) );
 	</code>
 	</code>
 
 
 	<p>
 	<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>
 	</p>
 
 
 	<code>
 	<code>
@@ -45,11 +53,11 @@ renderer.vr.enabled = true;
 	</p>
 	</p>
 
 
 	<code>
 	<code>
-function animate() {
+renderer.setAnimationLoop( function () {
 
 
-	renderer.setAnimationLoop( render );
+	renderer.render( scene, camera );
 
 
-}
+} );
 	</code>
 	</code>
 
 
 	<h2>Next Steps</h2>
 	<h2>Next Steps</h2>