|
@@ -114,12 +114,16 @@
|
|
// lines
|
|
// lines
|
|
|
|
|
|
shape.autoClose = true;
|
|
shape.autoClose = true;
|
|
- var points = shape.createPointsGeometry();
|
|
|
|
- var spacedPoints = shape.createSpacedPointsGeometry( 50 );
|
|
|
|
|
|
+
|
|
|
|
+ var points = shape.getPoints();
|
|
|
|
+ var spacedPoints = shape.getSpacedPoints( 50 );
|
|
|
|
+
|
|
|
|
+ var geometryPoints = new THREE.BufferGeometry().setFromPoints( points );
|
|
|
|
+ var geometrySpacedPoints = new THREE.BufferGeometry().setFromPoints( spacedPoints );
|
|
|
|
|
|
// solid line
|
|
// solid line
|
|
|
|
|
|
- var line = new THREE.Line( points, new THREE.LineBasicMaterial( { color: color, linewidth: 3 } ) );
|
|
|
|
|
|
+ var line = new THREE.Line( geometryPoints, new THREE.LineBasicMaterial( { color: color, linewidth: 3 } ) );
|
|
line.position.set( x, y, z - 25 );
|
|
line.position.set( x, y, z - 25 );
|
|
line.rotation.set( rx, ry, rz );
|
|
line.rotation.set( rx, ry, rz );
|
|
line.scale.set( s, s, s );
|
|
line.scale.set( s, s, s );
|
|
@@ -127,7 +131,7 @@
|
|
|
|
|
|
// line from equidistance sampled points
|
|
// line from equidistance sampled points
|
|
|
|
|
|
- var line = new THREE.Line( spacedPoints, new THREE.LineBasicMaterial( { color: color, linewidth: 3 } ) );
|
|
|
|
|
|
+ var line = new THREE.Line( geometrySpacedPoints, new THREE.LineBasicMaterial( { color: color, linewidth: 3 } ) );
|
|
line.position.set( x, y, z + 25 );
|
|
line.position.set( x, y, z + 25 );
|
|
line.rotation.set( rx, ry, rz );
|
|
line.rotation.set( rx, ry, rz );
|
|
line.scale.set( s, s, s );
|
|
line.scale.set( s, s, s );
|
|
@@ -135,7 +139,7 @@
|
|
|
|
|
|
// vertices from real points
|
|
// vertices from real points
|
|
|
|
|
|
- var particles = new THREE.Points( points, new THREE.PointsMaterial( { color: color, size: 4 } ) );
|
|
|
|
|
|
+ var particles = new THREE.Points( geometryPoints, new THREE.PointsMaterial( { color: color, size: 4 } ) );
|
|
particles.position.set( x, y, z + 75 );
|
|
particles.position.set( x, y, z + 75 );
|
|
particles.rotation.set( rx, ry, rz );
|
|
particles.rotation.set( rx, ry, rz );
|
|
particles.scale.set( s, s, s );
|
|
particles.scale.set( s, s, s );
|
|
@@ -143,7 +147,7 @@
|
|
|
|
|
|
// equidistance sampled points
|
|
// equidistance sampled points
|
|
|
|
|
|
- var particles = new THREE.Points( spacedPoints, new THREE.PointsMaterial( { color: color, size: 4 } ) );
|
|
|
|
|
|
+ var particles = new THREE.Points( geometrySpacedPoints, new THREE.PointsMaterial( { color: color, size: 4 } ) );
|
|
particles.position.set( x, y, z + 125 );
|
|
particles.position.set( x, y, z + 125 );
|
|
particles.rotation.set( rx, ry, rz );
|
|
particles.rotation.set( rx, ry, rz );
|
|
particles.scale.set( s, s, s );
|
|
particles.scale.set( s, s, s );
|