Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
84cf9ea0
T
three.js
项目概览
Ablesons
/
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,发现更多精彩内容 >>
提交
84cf9ea0
编写于
10月 06, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5407 from jarvisniu/dev
Fix an encoding error
上级
80ba5702
835f60d8
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
7 addition
and
7 deletion
+7
-7
utils/build/build.py
utils/build/build.py
+7
-7
未找到文件。
utils/build/build.py
浏览文件 @
84cf9ea0
...
...
@@ -42,21 +42,21 @@ def main(argv=None):
sourcemap
=
sourcemapping
=
sourcemapargs
=
''
fd
,
path
=
tempfile
.
mkstemp
()
tmp
=
open
(
path
,
'w'
)
tmp
=
open
(
path
,
'w'
,
encoding
=
"utf-8"
)
sources
=
[]
if
args
.
amd
:
tmp
.
write
(
'( function ( root, factory ) {
\n\n\t
if ( typeof define ===
\'
function
\'
&& define.amd ) {
\n\n\t\t
define( [
\'
exports
\'
], factory );
\n\n\t
} else if ( typeof exports ===
\'
object
\'
) {
\n\n\t\t
factory( exports );
\n\n\t
} else {
\n\n\t\t
factory( root );
\n\n\t
}
\n\n
}( this, function ( exports ) {
\n\n
'
)
for
include
in
args
.
include
:
with
open
(
'includes/'
+
include
+
'.json'
,
'r'
)
as
f
:
with
open
(
'includes/'
+
include
+
'.json'
,
'r'
,
encoding
=
"utf-8"
)
as
f
:
files
=
json
.
load
(
f
)
for
filename
in
files
:
tmp
.
write
(
'// File:'
+
filename
)
tmp
.
write
(
'
\n\n
'
)
filename
=
'../../'
+
filename
sources
.
append
(
filename
)
with
open
(
filename
,
'r'
)
as
f
:
with
open
(
filename
,
'r'
,
encoding
=
"utf-8"
)
as
f
:
if
filename
.
endswith
(
".glsl"
):
tmp
.
write
(
'THREE.ShaderChunk[
\'
'
+
os
.
path
.
splitext
(
os
.
path
.
basename
(
filename
))[
0
]
+
'
\'
] = "'
)
tmp
.
write
(
f
.
read
().
replace
(
'
\n
'
,
'
\\
n'
))
...
...
@@ -79,7 +79,7 @@ def main(argv=None):
else
:
backup
=
''
if
os
.
path
.
exists
(
output
):
with
open
(
output
,
'r'
)
as
f
:
backup
=
f
.
read
()
with
open
(
output
,
'r'
,
encoding
=
"utf-8"
)
as
f
:
backup
=
f
.
read
()
os
.
remove
(
output
)
externs
=
' --externs '
.
join
(
args
.
externs
)
...
...
@@ -90,11 +90,11 @@ def main(argv=None):
# header
if
os
.
path
.
exists
(
output
):
with
open
(
output
,
'r'
)
as
f
:
text
=
f
.
read
()
with
open
(
output
,
'w'
)
as
f
:
f
.
write
(
'// threejs.org/license
\n
'
+
text
+
sourcemapping
)
with
open
(
output
,
'r'
,
encoding
=
"utf-8"
)
as
f
:
text
=
f
.
read
()
with
open
(
output
,
'w'
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
'// threejs.org/license
\n
'
+
text
+
sourcemapping
)
else
:
print
(
"Minification with Closure compiler failed. Check your Java runtime version."
)
with
open
(
output
,
'w'
)
as
f
:
f
.
write
(
backup
)
with
open
(
output
,
'w'
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
backup
)
os
.
close
(
fd
)
os
.
remove
(
path
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录