提交 c583db77 编写于 作者: Z zz85

Cleaning up TextGeometry a little

上级 4c92b9d0
/**
* @author zz85 / http://www.lab4games.net/zz85/blog
*
* TextPath
* TextPath - not sure if there's much use for this class.
only thing it has it .toShapes() which can be removed by refactoring.
*
**/
......@@ -56,13 +57,4 @@ THREE.TextPath.prototype.toShapes = function () {
return shapes;
//console.log(path);
//console.log(fontShapes);
// Either find actions or curves.
//var text3d = new THREE.ExtrudeGeometry( shapes , { amount: 20, bevelEnabled:true, bevelThickness:3 } );
//return text3d;
};
......@@ -142,8 +142,7 @@ THREE.FontUtils = {
var ret = this.extractGlyphPoints( chars[ i ], face, scale, offset, path );
offset += ret.offset;
//characterPts.push( ret.points );
//allPts = allPts.concat( ret.points );
fontPaths.push( ret.path );
}
......@@ -207,8 +206,6 @@ THREE.FontUtils = {
x = outline[ i++ ] * scaleX + offset;
y = outline[ i++ ] * scaleY;
pts.push( new THREE.Vector2( x, y ) );
path.moveTo( x, y );
break;
......@@ -218,7 +215,6 @@ THREE.FontUtils = {
x = outline[ i++ ] * scaleX + offset;
y = outline[ i++ ] * scaleY;
pts.push( new THREE.Vector2( x, y ) );
path.lineTo(x,y);
break;
......@@ -245,8 +241,6 @@ THREE.FontUtils = {
var t = i2 / divisions;
var tx = THREE.Shape.Utils.b2( t, cpx0, cpx1, cpx );
var ty = THREE.Shape.Utils.b2( t, cpy0, cpy1, cpy );
pts.push( new THREE.Vector2( tx, ty ) );
}
}
......@@ -278,7 +272,6 @@ THREE.FontUtils = {
var t = i2 / divisions;
var tx = THREE.Shape.Utils.b3( t, cpx0, cpx1, cpx2, cpx );
var ty = THREE.Shape.Utils.b3( t, cpy0, cpy1, cpy2, cpy );
pts.push( new THREE.Vector2( tx, ty ) );
}
......@@ -293,7 +286,7 @@ THREE.FontUtils = {
return { offset: glyph.ha*scale, points:pts, path:path};
return { offset: glyph.ha*scale, path:path};
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册