Przeglądaj źródła

reduce default particle count for IE and Edge

aardgoose 8 lat temu
rodzic
commit
11b9d7d8ca
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      examples/webgl_gpgpu_protoplanet.html

+ 5 - 1
examples/webgl_gpgpu_protoplanet.html

@@ -266,11 +266,15 @@
 
 			if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
 
+			var isIE = /Trident/i.test( navigator.userAgent );
+			var isEdge = /Edge/i.test( navigator.userAgent );
+
 			var hash = document.location.hash.substr( 1 );
+
 			if ( hash ) hash = parseInt( hash, 0 );
 
 			// Texture width for simulation (each texel is a debris particle)
-			var WIDTH = hash || 64;
+			var WIDTH = hash || ( isIE || isEdge ) ? 4 : 64;
 
 			var container, stats;
 			var camera, scene, renderer, geometry, controls;