|
@@ -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 } )
|