提交 ae71419f 编写于 作者: Z zz85

Fixed SplineCurve array bug

上级 5b59b06a
......@@ -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 );
......
......@@ -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 );
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册