Fixed SplineCurve array bug

This commit is contained in:
zz85
2011-07-16 23:25:14 +08:00
parent 5b59b06a67
commit ae71419f1f
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ THREE.ExtrudeGeometry = function( shape, options ) {
THREE.Geometry.call( this );
var vertices = shape.getPoints();
var vertices = shape.getSpacedPoints();
var reverse = THREE.FontUtils.Triangulate.area( vertices ) > 0 ;
if (reverse) {
//faces = THREE.FontUtils.Triangulate( vertices.reverse(), true );
+1 -1
View File
@@ -111,7 +111,7 @@ THREE.Path.prototype.splineThru = function( pts /*Array of Vector*/ ) {
var y0 = lastargs[ lastargs.length - 1 ];
var npts = [new THREE.Vector2(x0, y0)];
npts= npts.concat(pts.unshift);
npts= npts.concat(pts);
var curve = new THREE.SplineCurve( npts );
this.curves.push( curve );
+1
View File
@@ -43,6 +43,7 @@ THREE.Shape.prototype.getSpacedPoints = function(divisions) {
var pts = [];
for (var i=0; i< divisions;i++) {
pts.push(this.getPoint(i/divisions));
if(!this.getPoint(i/divisions)) throw "DIE";
}
//console.log(pts);
return pts;