浏览代码

fix(docs): Update example & link for Detector.js -> WebGL.js

Thomas Knickman 6 年之前
父节点
当前提交
b3f3dd629b
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      docs/manual/en/introduction/WebGL-compatibility-check.html

+ 3 - 3
docs/manual/en/introduction/WebGL-compatibility-check.html

@@ -15,16 +15,16 @@
 		</p>
 		</p>
 
 
 		<p>
 		<p>
-			Add	[link:https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js]
+			Add	[link:https://github.com/mrdoob/three.js/blob/master/examples/js/WebGL.js]
 			to your javascript and run the following before attempting to render anything.
 			to your javascript and run the following before attempting to render anything.
 		</p>
 		</p>
 
 
 <code>
 <code>
-if (Detector.webgl) {
+if (WEBGL.isWebGLAvailable()) {
     // Initiate function or other initializations here
     // Initiate function or other initializations here
     animate();
     animate();
 } else {
 } else {
-    var warning = Detector.getWebGLErrorMessage();
+    var warning = WEBGL.getWebGLErrorMessage();
     document.getElementById('container').appendChild(warning);
     document.getElementById('container').appendChild(warning);
 }
 }
 </code>
 </code>