Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
ff75ac8a
T
three.js
项目概览
车家大少爷
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ff75ac8a
编写于
12月 27, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
4e4cc802
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
789 addition
and
765 deletion
+789
-765
build/three.js
build/three.js
+112
-100
build/three.min.js
build/three.min.js
+565
-565
build/three.module.js
build/three.module.js
+112
-100
未找到文件。
build/three.js
浏览文件 @
ff75ac8a
...
...
@@ -27525,9 +27525,10 @@
//
var holeIndex = contour.length;
holes.forEach( removeDupEndPts );
for ( i = 0; i < holes.length; i ++ ) {
for (
var
i = 0; i < holes.length; i ++ ) {
holeIndices.push( holeIndex );
holeIndex += holes[ i ].length;
...
...
@@ -37997,155 +37998,151 @@
generateShapes: function ( text, size, divisions ) {
function createPaths( text ) {
var chars = String( text ).split( '' );
var scale = size / data.resolution;
var line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale;
var offsetX = 0, offsetY = 0;
var paths = [];
if ( size === undefined ) size = 100;
if ( divisions === undefined ) divisions = 4;
for ( var i = 0; i < chars.length; i ++ ) {
var shapes = [];
var paths = createPaths( text, size, divisions, this.data );
var char = chars[ i ];
for ( var p = 0, pl = paths.length; p < pl; p ++ ) {
if ( char === '\n' ) {
Array.prototype.push.apply( shapes, paths[ p ].toShapes() );
offsetX = 0;
offsetY -= line_height;
}
} else {
return shapes;
var ret = createPath( char, scale, offsetX, offsetY );
offsetX += ret.offsetX;
paths.push( ret.path );
}
}
} );
}
function createPaths( text, size, divisions, data ) {
return paths;
var chars = String( text ).split( '' );
var scale = size / data.resolution;
var line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale;
}
var paths = [];
function createPath( c, scale, offsetX, offsetY ) {
var offsetX = 0, offsetY = 0;
var glyph = data.glyphs[ c ] || data.glyphs[ '?' ];
for ( var i = 0; i < chars.length; i ++ ) {
if ( ! glyph ) return
;
var char = chars[ i ]
;
var path = new ShapePath();
if ( char === '\n' ) {
var pts = []
;
var x, y, cpx, cpy, cpx0, cpy0, cpx1, cpy1, cpx2, cpy2, laste
;
offsetX = 0
;
offsetY -= line_height
;
if ( glyph.o )
{
} else
{
var outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) );
var ret = createPath( char, divisions, scale, offsetX, offsetY, data );
offsetX += ret.offsetX;
paths.push( ret.path );
for ( var i = 0, l = outline.length; i < l; ) {
}
var action = outline[ i ++ ];
}
switch ( action ) {
return paths;
case 'm': // moveTo
}
x = outline[ i ++ ] * scale + offsetX;
y = outline[ i ++ ] * scale + offsetY;
function createPath( char, divisions, scale, offsetX, offsetY, data ) {
path.moveTo( x, y )
;
var glyph = data.glyphs[ char ] || data.glyphs[ '?' ]
;
break
;
if ( ! glyph ) return
;
case 'l': // lineTo
var path = new ShapePath();
x = outline[ i ++ ] * scale + offsetX
;
y = outline[ i ++ ] * scale + offsetY
;
var pts = []
;
var x, y, cpx, cpy, cpx0, cpy0, cpx1, cpy1, cpx2, cpy2, laste
;
path.lineTo( x, y );
if ( glyph.o ) {
break
;
var outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) )
;
case 'q': // quadraticCurveTo
for ( var i = 0, l = outline.length; i < l; ) {
cpx = outline[ i ++ ] * scale + offsetX;
cpy = outline[ i ++ ] * scale + offsetY;
cpx1 = outline[ i ++ ] * scale + offsetX;
cpy1 = outline[ i ++ ] * scale + offsetY;
var action = outline[ i ++ ];
path.quadraticCurveTo( cpx1, cpy1, cpx, cpy );
switch ( action ) {
laste = pts[ pts.length - 1 ];
case 'm': // moveTo
if ( laste ) {
x = outline[ i ++ ] * scale + offsetX;
y = outline[ i ++ ] * scale + offsetY;
cpx0 = laste.x;
cpy0 = laste.y;
path.moveTo( x, y );
break;
}
case 'l': // lineTo
break;
x = outline[ i ++ ] * scale + offsetX;
y = outline[ i ++ ] * scale + offsetY;
case 'b': // bezierCurveTo
path.lineTo( x, y );
cpx = outline[ i ++ ] * scale + offsetX;
cpy = outline[ i ++ ] * scale + offsetY;
cpx1 = outline[ i ++ ] * scale + offsetX;
cpy1 = outline[ i ++ ] * scale + offsetY;
cpx2 = outline[ i ++ ] * scale + offsetX;
cpy2 = outline[ i ++ ] * scale + offsetY;
break;
path.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy );
case 'q': // quadraticCurveTo
laste = pts[ pts.length - 1 ];
cpx = outline[ i ++ ] * scale + offsetX;
cpy = outline[ i ++ ] * scale + offsetY;
cpx1 = outline[ i ++ ] * scale + offsetX;
cpy1 = outline[ i ++ ] * scale + offsetY;
if ( laste ) {
path.quadraticCurveTo( cpx1, cpy1, cpx, cpy );
cpx0 = laste.x;
cpy0 = laste.y;
laste = pts[ pts.length - 1 ];
if ( laste ) {
}
cpx0 = laste.x;
cpy0 = laste.y;
break;
}
}
break;
}
case 'b': // bezierCurveTo
return { offsetX: glyph.ha * scale, path: path };
cpx = outline[ i ++ ] * scale + offsetX;
cpy = outline[ i ++ ] * scale + offsetY;
cpx1 = outline[ i ++ ] * scale + offsetX;
cpy1 = outline[ i ++ ] * scale + offsetY;
cpx2 = outline[ i ++ ] * scale + offsetX;
cpy2 = outline[ i ++ ] * scale + offsetY;
}
path.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy );
//
laste = pts[ pts.length - 1 ];
if ( size === undefined ) size = 100;
if ( divisions === undefined ) divisions = 4;
if ( laste ) {
var data = this.data;
cpx0 = laste.x;
cpy0 = laste.y;
var paths = createPaths( text );
var shapes = [];
for ( var p = 0, pl = paths.length; p < pl; p ++ ) {
}
Array.prototype.push.apply( shapes, paths[ p ].toShapes() )
;
break
;
}
}
return shapes;
}
}
} );
return { offsetX: glyph.ha * scale, path: path };
}
/**
* @author mrdoob / http://mrdoob.com/
...
...
@@ -39232,6 +39229,9 @@
* @author tschw
*/
// Characters [].:/ are reserved for track binding syntax.
var RESERVED_CHARS_RE = '\\[\\]\\.:\\/';
function Composite( targetGroup, path, optionalParsedPath ) {
var parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path );
...
...
@@ -39333,35 +39333,47 @@
* @param {string} name Node name to be sanitized.
* @return {string}
*/
sanitizeNodeName:
function ( name
) {
sanitizeNodeName:
( function (
) {
return name.replace( /\s/g, '_' ).replace( /[^\w-]/g, '
' );
var reservedRe = new RegExp( '[' + RESERVED_CHARS_RE + ']', 'g
' );
},
return function sanitizeNodeName ( name ) {
return name.replace( /\s/g, '_' ).replace( reservedRe, '' );
};
}() ),
parseTrackName: function () {
// Attempts to allow node names from any language. ES5's `\w` regexp matches
// only latin characters, and the unicode \p{L} is not yet supported. So
// instead, we exclude reserved characters and match everything else.
var wordChar = '[^' + RESERVED_CHARS_RE + ']';
var wordCharOrDot = '[^' + RESERVED_CHARS_RE.replace( '\\.', '' ) + ']';
// Parent directories, delimited by '/' or ':'. Currently unused, but must
// be matched to parse the rest of the track name.
var directoryRe = /((?:
[\w-]+[\/:])*)/
;
var directoryRe = /((?:
WC+[\/:])*)/.source.replace( 'WC', wordChar )
;
// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.
var nodeRe = /(
[\w-\.]+)?/
;
var nodeRe = /(
WCOD+)?/.source.replace( 'WCOD', wordCharOrDot )
;
// Object on target node, and accessor.
Name may contain only wor
d
// Object on target node, and accessor.
May not contain reserve
d
// characters. Accessor may contain any character except closing bracket.
var objectRe = /(?:\.(
[\w-]+)(?:\[(.+)\])?)?/
;
var objectRe = /(?:\.(
WC+)(?:\[(.+)\])?)?/.source.replace( 'WC', wordChar )
;
// Property and accessor. May
contain only wor
d characters. Accessor may
// Property and accessor. May
not contain reserve
d characters. Accessor may
// contain any non-bracket characters.
var propertyRe = /\.(
[\w-]+)(?:\[(.+)\])?/
;
var propertyRe = /\.(
WC+)(?:\[(.+)\])?/.source.replace( 'WC', wordChar )
;
var trackRe = new RegExp( ''
+ '^'
+ directoryRe
.source
+ nodeRe
.source
+ objectRe
.source
+ propertyRe
.source
+ directoryRe
+ nodeRe
+ objectRe
+ propertyRe
+ '$'
);
build/three.min.js
浏览文件 @
ff75ac8a
此差异已折叠。
点击以展开。
build/three.module.js
浏览文件 @
ff75ac8a
...
...
@@ -27519,9 +27519,10 @@ var ShapeUtils = {
//
var holeIndex = contour.length;
holes.forEach( removeDupEndPts );
for ( i = 0; i < holes.length; i ++ ) {
for (
var
i = 0; i < holes.length; i ++ ) {
holeIndices.push( holeIndex );
holeIndex += holes[ i ].length;
...
...
@@ -37991,155 +37992,151 @@ Object.assign( Font.prototype, {
generateShapes: function ( text, size, divisions ) {
function createPaths( text ) {
var chars = String( text ).split( '' );
var scale = size / data.resolution;
var line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale;
var offsetX = 0, offsetY = 0;
var paths = [];
if ( size === undefined ) size = 100;
if ( divisions === undefined ) divisions = 4;
for ( var i = 0; i < chars.length; i ++ ) {
var shapes = [];
var paths = createPaths( text, size, divisions, this.data );
var char = chars[ i ];
for ( var p = 0, pl = paths.length; p < pl; p ++ ) {
if ( char === '\n' ) {
Array.prototype.push.apply( shapes, paths[ p ].toShapes() );
offsetX = 0;
offsetY -= line_height;
}
} else {
return shapes;
var ret = createPath( char, scale, offsetX, offsetY );
offsetX += ret.offsetX;
paths.push( ret.path );
}
}
} );
}
function createPaths( text, size, divisions, data ) {
return paths;
var chars = String( text ).split( '' );
var scale = size / data.resolution;
var line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale;
}
var paths = [];
function createPath( c, scale, offsetX, offsetY ) {
var offsetX = 0, offsetY = 0;
var glyph = data.glyphs[ c ] || data.glyphs[ '?' ];
for ( var i = 0; i < chars.length; i ++ ) {
if ( ! glyph ) return
;
var char = chars[ i ]
;
var path = new ShapePath();
if ( char === '\n' ) {
var pts = []
;
var x, y, cpx, cpy, cpx0, cpy0, cpx1, cpy1, cpx2, cpy2, laste
;
offsetX = 0
;
offsetY -= line_height
;
if ( glyph.o )
{
} else
{
var outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) );
var ret = createPath( char, divisions, scale, offsetX, offsetY, data );
offsetX += ret.offsetX;
paths.push( ret.path );
for ( var i = 0, l = outline.length; i < l; ) {
}
var action = outline[ i ++ ];
}
switch ( action ) {
return paths;
case 'm': // moveTo
}
x = outline[ i ++ ] * scale + offsetX;
y = outline[ i ++ ] * scale + offsetY;
function createPath( char, divisions, scale, offsetX, offsetY, data ) {
path.moveTo( x, y )
;
var glyph = data.glyphs[ char ] || data.glyphs[ '?' ]
;
break
;
if ( ! glyph ) return
;
case 'l': // lineTo
var path = new ShapePath();
x = outline[ i ++ ] * scale + offsetX
;
y = outline[ i ++ ] * scale + offsetY
;
var pts = []
;
var x, y, cpx, cpy, cpx0, cpy0, cpx1, cpy1, cpx2, cpy2, laste
;
path.lineTo( x, y );
if ( glyph.o ) {
break
;
var outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) )
;
case 'q': // quadraticCurveTo
for ( var i = 0, l = outline.length; i < l; ) {
cpx = outline[ i ++ ] * scale + offsetX;
cpy = outline[ i ++ ] * scale + offsetY;
cpx1 = outline[ i ++ ] * scale + offsetX;
cpy1 = outline[ i ++ ] * scale + offsetY;
var action = outline[ i ++ ];
path.quadraticCurveTo( cpx1, cpy1, cpx, cpy );
switch ( action ) {
laste = pts[ pts.length - 1 ];
case 'm': // moveTo
if ( laste ) {
x = outline[ i ++ ] * scale + offsetX;
y = outline[ i ++ ] * scale + offsetY;
cpx0 = laste.x;
cpy0 = laste.y;
path.moveTo( x, y );
break;
}
case 'l': // lineTo
break;
x = outline[ i ++ ] * scale + offsetX;
y = outline[ i ++ ] * scale + offsetY;
case 'b': // bezierCurveTo
path.lineTo( x, y );
cpx = outline[ i ++ ] * scale + offsetX;
cpy = outline[ i ++ ] * scale + offsetY;
cpx1 = outline[ i ++ ] * scale + offsetX;
cpy1 = outline[ i ++ ] * scale + offsetY;
cpx2 = outline[ i ++ ] * scale + offsetX;
cpy2 = outline[ i ++ ] * scale + offsetY;
break;
path.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy );
case 'q': // quadraticCurveTo
laste = pts[ pts.length - 1 ];
cpx = outline[ i ++ ] * scale + offsetX;
cpy = outline[ i ++ ] * scale + offsetY;
cpx1 = outline[ i ++ ] * scale + offsetX;
cpy1 = outline[ i ++ ] * scale + offsetY;
if ( laste ) {
path.quadraticCurveTo( cpx1, cpy1, cpx, cpy );
cpx0 = laste.x;
cpy0 = laste.y;
laste = pts[ pts.length - 1 ];
if ( laste ) {
}
cpx0 = laste.x;
cpy0 = laste.y;
break;
}
}
break;
}
case 'b': // bezierCurveTo
return { offsetX: glyph.ha * scale, path: path };
cpx = outline[ i ++ ] * scale + offsetX;
cpy = outline[ i ++ ] * scale + offsetY;
cpx1 = outline[ i ++ ] * scale + offsetX;
cpy1 = outline[ i ++ ] * scale + offsetY;
cpx2 = outline[ i ++ ] * scale + offsetX;
cpy2 = outline[ i ++ ] * scale + offsetY;
}
path.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy );
//
laste = pts[ pts.length - 1 ];
if ( size === undefined ) size = 100;
if ( divisions === undefined ) divisions = 4;
if ( laste ) {
var data = this.data;
cpx0 = laste.x;
cpy0 = laste.y;
var paths = createPaths( text );
var shapes = [];
for ( var p = 0, pl = paths.length; p < pl; p ++ ) {
}
Array.prototype.push.apply( shapes, paths[ p ].toShapes() )
;
break
;
}
}
return shapes;
}
}
} );
return { offsetX: glyph.ha * scale, path: path };
}
/**
* @author mrdoob / http://mrdoob.com/
...
...
@@ -39226,6 +39223,9 @@ Object.assign( PropertyMixer.prototype, {
* @author tschw
*/
// Characters [].:/ are reserved for track binding syntax.
var RESERVED_CHARS_RE = '\\[\\]\\.:\\/';
function Composite( targetGroup, path, optionalParsedPath ) {
var parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path );
...
...
@@ -39327,35 +39327,47 @@ Object.assign( PropertyBinding, {
* @param {string} name Node name to be sanitized.
* @return {string}
*/
sanitizeNodeName:
function ( name
) {
sanitizeNodeName:
( function (
) {
return name.replace( /\s/g, '_' ).replace( /[^\w-]/g, '
' );
var reservedRe = new RegExp( '[' + RESERVED_CHARS_RE + ']', 'g
' );
},
return function sanitizeNodeName ( name ) {
return name.replace( /\s/g, '_' ).replace( reservedRe, '' );
};
}() ),
parseTrackName: function () {
// Attempts to allow node names from any language. ES5's `\w` regexp matches
// only latin characters, and the unicode \p{L} is not yet supported. So
// instead, we exclude reserved characters and match everything else.
var wordChar = '[^' + RESERVED_CHARS_RE + ']';
var wordCharOrDot = '[^' + RESERVED_CHARS_RE.replace( '\\.', '' ) + ']';
// Parent directories, delimited by '/' or ':'. Currently unused, but must
// be matched to parse the rest of the track name.
var directoryRe = /((?:
[\w-]+[\/:])*)/
;
var directoryRe = /((?:
WC+[\/:])*)/.source.replace( 'WC', wordChar )
;
// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.
var nodeRe = /(
[\w-\.]+)?/
;
var nodeRe = /(
WCOD+)?/.source.replace( 'WCOD', wordCharOrDot )
;
// Object on target node, and accessor.
Name may contain only wor
d
// Object on target node, and accessor.
May not contain reserve
d
// characters. Accessor may contain any character except closing bracket.
var objectRe = /(?:\.(
[\w-]+)(?:\[(.+)\])?)?/
;
var objectRe = /(?:\.(
WC+)(?:\[(.+)\])?)?/.source.replace( 'WC', wordChar )
;
// Property and accessor. May
contain only wor
d characters. Accessor may
// Property and accessor. May
not contain reserve
d characters. Accessor may
// contain any non-bracket characters.
var propertyRe = /\.(
[\w-]+)(?:\[(.+)\])?/
;
var propertyRe = /\.(
WC+)(?:\[(.+)\])?/.source.replace( 'WC', wordChar )
;
var trackRe = new RegExp( ''
+ '^'
+ directoryRe
.source
+ nodeRe
.source
+ objectRe
.source
+ propertyRe
.source
+ directoryRe
+ nodeRe
+ objectRe
+ propertyRe
+ '$'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录