Jelajahi Sumber

Tweaked RequestAnimationFrame.js and Detector.js.

Mr.doob 14 tahun lalu
induk
melakukan
339384f209
3 mengubah file dengan 9 tambahan dan 8 penghapusan
  1. 2 1
      README.md
  2. 6 6
      examples/js/Detector.js
  3. 1 1
      examples/js/RequestAnimationFrame.js

+ 2 - 1
README.md

@@ -117,7 +117,8 @@ This code creates a camera, then creates a scene object, adds a bunch of random
 
 		function animate() {
 
-			requestAnimationFrame( animate ); // Include examples/js/RequestAnimationFrame.js for cross-browser compatibility.
+			// Include examples/js/RequestAnimationFrame.js for cross-browser compatibility.
+			requestAnimationFrame( animate );
 			render();
 
 		}

+ 6 - 6
examples/js/Detector.js

@@ -26,12 +26,12 @@ Detector = {
 
 		var html = [
 
-		'Sorry, your browser doesn\'t support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">WebGL</a><br/>',
-		'<br/>',
-		'Please try with',
-		'<a href="http://www.google.com/chrome">Chrome 9+</a> /',
-		'<a href="http://www.mozilla.com/en-US/firefox/all-beta.html">Firefox 4+</a> /',
-		'<a href="http://nightly.webkit.org/">Safari OSX 10.6+</a>'
+			'Sorry, your browser doesn\'t support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">WebGL</a><br/>',
+			'<br/>',
+			'Please try with',
+			'<a href="http://www.google.com/chrome">Chrome 9+</a> /',
+			'<a href="http://www.mozilla.com/en-US/firefox/all-beta.html">Firefox 4+</a> /',
+			'<a href="http://nightly.webkit.org/">Safari 10.6+</a>'
 
 		].join("\n");
 

+ 1 - 1
examples/js/RequestAnimationFrame.js

@@ -1,6 +1,6 @@
 /**
  * Provides requestAnimationFrame in a cross browser way.
- * @author paulirish / http://paulirish.com/
+ * http://paulirish.com/2011/requestanimationframe-for-smart-animating/
  */
 
 if ( !window.requestAnimationFrame ) {