Bladeren bron

Removed unneded context.closePath() call.

Mr.doob 12 jaren geleden
bovenliggende
commit
c0d5da52e1

+ 0 - 1
examples/canvas_interactive_cubes.html

@@ -79,7 +79,6 @@
 
 						context.beginPath();
 						context.arc( 0, 0, 1, 0, PI2, true );
-						context.closePath();
 						context.fill();
 
 					}

+ 0 - 2
examples/canvas_interactive_particles.html

@@ -30,7 +30,6 @@
 
 				context.beginPath();
 				context.arc( 0, 0, 1, 0, PI2, true );
-				context.closePath();
 				context.fill();
 
 			}
@@ -40,7 +39,6 @@
 				context.lineWidth = 0.05;
 				context.beginPath();
 				context.arc( 0, 0, 1, 0, PI2, true );
-				context.closePath();
 				context.stroke();
 
 			}

+ 0 - 1
examples/canvas_lines.html

@@ -63,7 +63,6 @@
 
 						context.beginPath();
 						context.arc( 0, 0, 1, 0, PI2, true );
-						context.closePath();
 						context.fill();
 
 					}

+ 0 - 1
examples/canvas_lines_sphere.html

@@ -66,7 +66,6 @@
 
 						context.beginPath();
 						context.arc( 0, 0, 1, 0, PI2, true );
-						context.closePath();
 						context.fill();
 
 					}

+ 0 - 1
examples/canvas_materials.html

@@ -112,7 +112,6 @@
 
 					context.beginPath();
 					context.arc( 0, 0, 1, 0, PI2, true );
-					context.closePath();
 					context.fill();
 
 				}

+ 0 - 1
examples/canvas_materials_video.html

@@ -129,7 +129,6 @@
 
 						context.beginPath();
 						context.arc( 0, 0, 1, 0, PI2, true );
-						context.closePath();
 						context.fill();
 
 					}

+ 0 - 1
examples/canvas_particles_random.html

@@ -49,7 +49,6 @@
 
 					context.beginPath();
 					context.arc( 0, 0, 1, 0, PI2, true );
-					context.closePath();
 					context.fill();
 
 				}

+ 0 - 2
examples/canvas_particles_shapes.html

@@ -138,7 +138,6 @@
 					context.lineWidth = 0.05;
 					context.beginPath();
 					context.arc( 0, 0, 1, 0, Math.PI*2, true );
-					context.closePath();
 					context.stroke();
 
 					context.globalAlpha = 0.2;
@@ -161,7 +160,6 @@
 					context.bezierCurveTo( x + 6.0, y + 7.7, x + 8.0, y + 5.5, x + 8.0, y + 3.5 );
 					context.bezierCurveTo( x + 8.0, y + 3.5, x + 8.0, y, x + 5.0, y );
 					context.bezierCurveTo( x + 3.5, y, x + 2.5, y + 2.5, x + 2.5, y + 2.5 );
-					context.closePath();
 					context.fill();
 					context.lineWidth = 0.5; //0.05
 					context.stroke();

+ 0 - 56
examples/webgl_geometry_subdivision.html

@@ -247,62 +247,6 @@
 				var mesh = new THREE.Mesh( geometry, material )
 				group.add( mesh );
 
-				var debugNewPoints = false;
-				var debugOldPoints = false;
-
-				// Debug new Points
-
-				if (debugNewPoints) {
-					var PI2 = Math.PI * 2;
-					var program = function ( context ) {
-
-						context.beginPath();
-						context.arc( 0, 0, 1, 0, PI2, true );
-						context.closePath();
-						context.fill();
-
-					}
-
-					for ( var i = 0; i < smooth.vertices.length; i++ ) {
-
-						particle = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: Math.random() * 0x808008 + 0x808080, program: program } ) );
-						particle.position = smooth.vertices[ i ];
-						var pos = smooth.vertices.position
-						particle.scale.x = particle.scale.y = 5;
-						group.add( particle );
-					}
-
-				}
-
-
-				//Debug original points
-
-				if (debugOldPoints) {
-
-					var drawText = function(i) {
-
-						return function ( context ) {
-
-							context.beginPath();
-							context.scale(0.1,-0.1);
-
-							context.fillText(i, 0,0);
-
-						};
-
-					}
-
-					for ( var i = 0; i < geometry.vertices.length; i++ ) {
-
-						particle = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: Math.random() * 0x808008 + 0x808080, program: drawText(i) } ) );
-						particle.position = smooth.vertices[ i ];
-						var pos = geometry.vertices.position
-						particle.scale.x = particle.scale.y = 30;
-						group.add( particle );
-					}
-				}
-
-
 				var meshmaterials = [
 					new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, vertexColors: THREE.VertexColors } ),
 					new THREE.MeshBasicMaterial( { color: 0x405040, wireframe: true, opacity: 0.8, transparent: true } )

+ 0 - 1
examples/webgl_materials_grass.html

@@ -88,7 +88,6 @@
 					context.fillStyle = 'rgba(0,' + Math.floor( Math.random() * 64 + 32 ) + ',16,1)';
 					context.beginPath();
 					context.arc( Math.random() * canvas.width, Math.random() * canvas.height, Math.random() * 1 + 0.5, 0, Math.PI * 2, true );
-					context.closePath();
 					context.fill();
 
 				}

+ 0 - 2
examples/webgl_particles_shapes.html

@@ -305,11 +305,9 @@
 					// context.bezierCurveTo( x + 6.0, y + 7.7, x + 8.0, y + 5.5, x + 8.0, y + 3.5 );
 					// context.bezierCurveTo( x + 8.0, y + 3.5, x + 8.0, y, x + 5.0, y );
 					// context.bezierCurveTo( x + 3.5, y, x + 2.5, y + 2.5, x + 2.5, y + 2.5 );
-					// context.closePath();
 
 					context.beginPath();
 					context.arc( 64, 64, 60, 0, Math.PI * 2, false) ;
-					context.closePath();
 
 					context.lineWidth = 0.5; //0.05
 					context.stroke();