Browse Source

Made canvas interactive particles rendering in Firefox more consistent with Chrome.

It seems lineWidth defaults are different in Chrome and Firefox.

Still there are some clearing artefacts in Firefox :/
alteredq 14 years ago
parent
commit
eecf9d0bc6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      examples/canvas_interactive_particles.html

+ 2 - 1
examples/canvas_interactive_particles.html

@@ -37,6 +37,7 @@
 
 
 			var programStroke = function ( context ) {
 			var programStroke = function ( context ) {
 
 
+				context.lineWidth = 0.05;
 				context.beginPath();
 				context.beginPath();
 				context.arc( 0, 0, 1, 0, PI2, true );
 				context.arc( 0, 0, 1, 0, PI2, true );
 				context.closePath();
 				context.closePath();
@@ -84,7 +85,7 @@
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 
-				container.appendChild(renderer.domElement);
+				container.appendChild( renderer.domElement );
 
 
 				stats = new Stats();
 				stats = new Stats();
 				stats.domElement.style.position = 'absolute';
 				stats.domElement.style.position = 'absolute';