未验证 提交 6203ac1e 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #21050 from linbingquan/dev-es6-font

Font: Covert to es6.
import { ShapePath } from './ShapePath.js';
function Font( data ) {
class Font {
this.type = 'Font';
constructor( data ) {
this.data = data;
Object.defineProperty( this, 'isFont', { value: true } );
}
this.type = 'Font';
Object.assign( Font.prototype, {
this.data = data;
isFont: true,
}
generateShapes: function ( text, size = 100 ) {
generateShapes( text, size = 100 ) {
const shapes = [];
const paths = createPaths( text, size, this.data );
......@@ -27,7 +27,7 @@ Object.assign( Font.prototype, {
}
} );
}
function createPaths( text, size, data ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册