提交 c0d5da52 编写于 作者: M Mr.doob

Removed unneded context.closePath() call.

上级 754e2812
......@@ -79,7 +79,6 @@
context.beginPath();
context.arc( 0, 0, 1, 0, PI2, true );
context.closePath();
context.fill();
}
......
......@@ -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();
}
......
......@@ -63,7 +63,6 @@
context.beginPath();
context.arc( 0, 0, 1, 0, PI2, true );
context.closePath();
context.fill();
}
......
......@@ -66,7 +66,6 @@
context.beginPath();
context.arc( 0, 0, 1, 0, PI2, true );
context.closePath();
context.fill();
}
......
......@@ -112,7 +112,6 @@
context.beginPath();
context.arc( 0, 0, 1, 0, PI2, true );
context.closePath();
context.fill();
}
......
......@@ -129,7 +129,6 @@
context.beginPath();
context.arc( 0, 0, 1, 0, PI2, true );
context.closePath();
context.fill();
}
......
......@@ -49,7 +49,6 @@
context.beginPath();
context.arc( 0, 0, 1, 0, PI2, true );
context.closePath();
context.fill();
}
......
......@@ -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();
......
......@@ -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 } )
......
......@@ -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();
}
......
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册