Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
5922b735
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,发现更多精彩内容 >>
提交
5922b735
编写于
3月 15, 2019
作者:
D
Don McCurdy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
JSM: Fix more replacements in strings, and error in GLTFLoader.
上级
8da957ed
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
26 deletion
+27
-26
examples/jsm/exporters/GLTFExporter.js
examples/jsm/exporters/GLTFExporter.js
+13
-13
examples/jsm/exporters/MMDExporter.js
examples/jsm/exporters/MMDExporter.js
+1
-1
examples/jsm/exporters/OBJExporter.js
examples/jsm/exporters/OBJExporter.js
+2
-2
examples/jsm/exporters/PLYExporter.js
examples/jsm/exporters/PLYExporter.js
+1
-1
examples/jsm/loaders/GLTFLoader.js
examples/jsm/loaders/GLTFLoader.js
+2
-2
utils/modularize.js
utils/modularize.js
+8
-7
未找到文件。
examples/jsm/exporters/GLTFExporter.js
浏览文件 @
5922b735
...
...
@@ -405,7 +405,7 @@ GLTFExporter.prototype = {
}
catch
(
error
)
{
console
.
warn
(
'
GLTFExporter: userData of
\'
'
+
object
.
name
+
'
\'
'
+
console
.
warn
(
'
THREE.
GLTFExporter: userData of
\'
'
+
object
.
name
+
'
\'
'
+
'
won
\'
t be serialized because of JSON.stringify error -
'
+
error
.
message
);
}
...
...
@@ -656,7 +656,7 @@ GLTFExporter.prototype = {
}
else
{
throw
new
Error
(
'
GLTFExporter: Unsupported bufferAttribute component type.
'
);
throw
new
Error
(
'
THREE.
GLTFExporter: Unsupported bufferAttribute component type.
'
);
}
...
...
@@ -967,7 +967,7 @@ GLTFExporter.prototype = {
}
else
{
console
.
warn
(
'
GLTFExporter: Ignoring metalnessMap and roughnessMap because they are not the same Texture.
'
);
console
.
warn
(
'
THREE.
GLTFExporter: Ignoring metalnessMap and roughnessMap because they are not the same Texture.
'
);
}
...
...
@@ -1017,7 +1017,7 @@ GLTFExporter.prototype = {
if
(
material
.
normalScale
.
x
!==
material
.
normalScale
.
y
)
{
console
.
warn
(
'
GLTFExporter: Normal scale components are different, ignoring Y and exporting X.
'
);
console
.
warn
(
'
THREE.
GLTFExporter: Normal scale components are different, ignoring Y and exporting X.
'
);
}
...
...
@@ -1174,7 +1174,7 @@ GLTFExporter.prototype = {
if
(
originalNormal
!==
undefined
&&
!
isNormalizedNormalAttribute
(
originalNormal
)
)
{
console
.
warn
(
'
GLTFExporter: Creating normalized normal attribute from the non-normalized one.
'
);
console
.
warn
(
'
THREE.
GLTFExporter: Creating normalized normal attribute from the non-normalized one.
'
);
geometry
.
addAttribute
(
'
normal
'
,
createNormalizedNormalAttribute
(
originalNormal
)
);
...
...
@@ -1333,7 +1333,7 @@ GLTFExporter.prototype = {
if
(
!
forceIndices
&&
geometry
.
index
===
null
&&
isMultiMaterial
)
{
// temporal workaround.
console
.
warn
(
'
GLTFExporter: Creating index for non-indexed multi-material mesh.
'
);
console
.
warn
(
'
THREE.
GLTFExporter: Creating index for non-indexed multi-material mesh.
'
);
forceIndices
=
true
;
}
...
...
@@ -1524,7 +1524,7 @@ GLTFExporter.prototype = {
if
(
!
trackNode
||
!
trackProperty
)
{
console
.
warn
(
'
GLTFExporter: Could not export animation track "%s".
'
,
track
.
name
);
console
.
warn
(
'
THREE.
GLTFExporter: Could not export animation track "%s".
'
,
track
.
name
);
return
null
;
}
...
...
@@ -1667,7 +1667,7 @@ GLTFExporter.prototype = {
if
(
light
.
decay
!==
undefined
&&
light
.
decay
!==
2
)
{
console
.
warn
(
'
GLTFExporter: Light decay may be lost. glTF is physically-based,
'
console
.
warn
(
'
THREE.
GLTFExporter: Light decay may be lost. glTF is physically-based,
'
+
'
and expects light.decay=2.
'
);
}
...
...
@@ -1678,7 +1678,7 @@ GLTFExporter.prototype = {
||
light
.
target
.
position
.
y
!==
0
||
light
.
target
.
position
.
z
!==
-
1
)
)
{
console
.
warn
(
'
GLTFExporter: Light direction may be lost. For best results,
'
console
.
warn
(
'
THREE.
GLTFExporter: Light direction may be lost. For best results,
'
+
'
make light.target a child of the light with position 0,0,-1.
'
);
}
...
...
@@ -1777,7 +1777,7 @@ GLTFExporter.prototype = {
}
else
if
(
object
.
isLight
)
{
console
.
warn
(
'
GLTFExporter: Only directional, point, and spot lights are supported.
'
);
console
.
warn
(
'
THREE.
GLTFExporter: Only directional, point, and spot lights are supported.
'
);
return
null
;
}
...
...
@@ -2163,11 +2163,11 @@ GLTFExporter.Utils = {
// This should never happen, because glTF morph target animations
// affect all targets already.
throw
new
Error
(
'
GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.
'
);
throw
new
Error
(
'
THREE.
GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.
'
);
}
console
.
warn
(
'
GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead.
'
);
console
.
warn
(
'
THREE.
GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead.
'
);
sourceTrack
=
sourceTrack
.
clone
();
sourceTrack
.
setInterpolation
(
InterpolateLinear
);
...
...
@@ -2179,7 +2179,7 @@ GLTFExporter.Utils = {
if
(
targetIndex
===
undefined
)
{
throw
new
Error
(
'
GLTFExporter: Morph target name not found:
'
+
sourceTrackBinding
.
propertyIndex
);
throw
new
Error
(
'
THREE.
GLTFExporter: Morph target name not found:
'
+
sourceTrackBinding
.
propertyIndex
);
}
...
...
examples/jsm/exporters/MMDExporter.js
浏览文件 @
5922b735
...
...
@@ -99,7 +99,7 @@ var MMDExporter = function () {
if
(
skin
.
isSkinnedMesh
!==
true
)
{
console
.
warn
(
'
MMDExporter: parseVpd() requires SkinnedMesh instance.
'
);
console
.
warn
(
'
THREE.
MMDExporter: parseVpd() requires SkinnedMesh instance.
'
);
return
null
;
}
...
...
examples/jsm/exporters/OBJExporter.js
浏览文件 @
5922b735
...
...
@@ -164,7 +164,7 @@ OBJExporter.prototype = {
}
else
{
console
.
warn
(
'
OBJExporter.parseMesh(): geometry type unsupported
'
,
geometry
);
console
.
warn
(
'
THREE.
OBJExporter.parseMesh(): geometry type unsupported
'
,
geometry
);
}
...
...
@@ -240,7 +240,7 @@ OBJExporter.prototype = {
}
else
{
console
.
warn
(
'
OBJExporter.parseLine(): geometry type unsupported
'
,
geometry
);
console
.
warn
(
'
THREE.
OBJExporter.parseLine(): geometry type unsupported
'
,
geometry
);
}
...
...
examples/jsm/exporters/PLYExporter.js
浏览文件 @
5922b735
...
...
@@ -28,7 +28,7 @@ PLYExporter.prototype = {
if
(
onDone
&&
typeof
onDone
===
'
object
'
)
{
console
.
warn
(
'
PLYExporter: The options parameter is now the third argument to the "parse" function. See the documentation for the new API.
'
);
console
.
warn
(
'
THREE.
PLYExporter: The options parameter is now the third argument to the "parse" function. See the documentation for the new API.
'
);
options
=
onDone
;
onDone
=
undefined
;
...
...
examples/jsm/loaders/GLTFLoader.js
浏览文件 @
5922b735
...
...
@@ -44,7 +44,7 @@ import {
Loader
,
LoaderUtils
,
Material
,
Math
,
Math
as
_Math
,
Matrix3
,
Matrix4
,
Mesh
,
...
...
@@ -2793,7 +2793,7 @@ var GLTFLoader = ( function () {
if
(
cameraDef
.
type
===
'
perspective
'
)
{
camera
=
new
PerspectiveCamera
(
Math
.
radToDeg
(
params
.
yfov
),
params
.
aspectRatio
||
1
,
params
.
znear
||
1
,
params
.
zfar
||
2
e6
);
camera
=
new
PerspectiveCamera
(
_
Math
.
radToDeg
(
params
.
yfov
),
params
.
aspectRatio
||
1
,
params
.
znear
||
1
,
params
.
zfar
||
2
e6
);
}
else
if
(
cameraDef
.
type
===
'
orthographic
'
)
{
...
...
utils/modularize.js
浏览文件 @
5922b735
...
...
@@ -82,12 +82,13 @@ function convert( path, ignoreList ) {
// constants
contents
=
contents
.
replace
(
/
THREE
\.([
a-zA-Z0-9
]
+
)
/g
,
function
(
match
,
p1
)
{
contents
=
contents
.
replace
(
/
(\'?)
THREE
\.([
a-zA-Z0-9
]
+
)
/g
,
function
(
match
,
p1
,
p2
)
{
if
(
ignoreList
.
includes
(
p1
)
)
return
match
;
if
(
p1
===
className
)
return
p1
;
if
(
ignoreList
.
includes
(
p2
)
)
return
match
;
if
(
p1
===
'
\'
'
)
return
match
;
// Inside a string
if
(
p2
===
className
)
return
p2
;
if
(
p
1
===
'
Math
'
||
p1
===
'
_Math
'
)
{
if
(
p
2
===
'
Math
'
||
p2
===
'
_Math
'
)
{
dependencies
[
'
_Math
'
]
=
true
;
...
...
@@ -95,11 +96,11 @@ function convert( path, ignoreList ) {
}
dependencies
[
p
1
]
=
true
;
dependencies
[
p
2
]
=
true
;
// console.log( match, p
1
);
// console.log( match, p
2
);
return
`
${
p
1
}
`
;
return
`
${
p
2
}
`
;
}
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录