Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
c53e323d
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
c53e323d
编写于
6月 16, 2021
作者:
M
Mr.doob
提交者:
GitHub
6月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor: Removed export precision setting (#22002)
上级
382190a7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
4 addition
and
36 deletion
+4
-36
editor/js/Config.js
editor/js/Config.js
+0
-1
editor/js/Menubar.File.js
editor/js/Menubar.File.js
+4
-14
editor/js/Sidebar.Settings.js
editor/js/Sidebar.Settings.js
+0
-18
editor/js/Strings.js
editor/js/Strings.js
+0
-3
未找到文件。
editor/js/Config.js
浏览文件 @
c53e323d
...
@@ -4,7 +4,6 @@ function Config() {
...
@@ -4,7 +4,6 @@ function Config() {
var
storage
=
{
var
storage
=
{
'
language
'
:
'
en
'
,
'
language
'
:
'
en
'
,
'
exportPrecision
'
:
6
,
'
autosave
'
:
true
,
'
autosave
'
:
true
,
...
...
editor/js/Menubar.File.js
浏览文件 @
c53e323d
...
@@ -6,16 +6,6 @@ import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
...
@@ -6,16 +6,6 @@ import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
function
MenubarFile
(
editor
)
{
function
MenubarFile
(
editor
)
{
function
parseNumber
(
key
,
value
)
{
var
precision
=
config
.
getKey
(
'
exportPrecision
'
);
return
typeof
value
===
'
number
'
?
parseFloat
(
value
.
toFixed
(
precision
)
)
:
value
;
}
//
var
config
=
editor
.
config
;
var
config
=
editor
.
config
;
var
strings
=
editor
.
strings
;
var
strings
=
editor
.
strings
;
...
@@ -111,7 +101,7 @@ function MenubarFile( editor ) {
...
@@ -111,7 +101,7 @@ function MenubarFile( editor ) {
try
{
try
{
output
=
JSON
.
stringify
(
output
,
parseNumber
,
'
\t
'
);
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -145,7 +135,7 @@ function MenubarFile( editor ) {
...
@@ -145,7 +135,7 @@ function MenubarFile( editor ) {
try
{
try
{
output
=
JSON
.
stringify
(
output
,
parseNumber
,
'
\t
'
);
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -170,7 +160,7 @@ function MenubarFile( editor ) {
...
@@ -170,7 +160,7 @@ function MenubarFile( editor ) {
try
{
try
{
output
=
JSON
.
stringify
(
output
,
parseNumber
,
'
\t
'
);
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -424,7 +414,7 @@ function MenubarFile( editor ) {
...
@@ -424,7 +414,7 @@ function MenubarFile( editor ) {
output
.
metadata
.
type
=
'
App
'
;
output
.
metadata
.
type
=
'
App
'
;
delete
output
.
history
;
delete
output
.
history
;
output
=
JSON
.
stringify
(
output
,
parseNumber
,
'
\t
'
);
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
toZip
[
'
app.json
'
]
=
strToU8
(
output
);
toZip
[
'
app.json
'
]
=
strToU8
(
output
);
...
...
editor/js/Sidebar.Settings.js
浏览文件 @
c53e323d
...
@@ -47,24 +47,6 @@ function SidebarSettings( editor ) {
...
@@ -47,24 +47,6 @@ function SidebarSettings( editor ) {
settings
.
add
(
languageRow
);
settings
.
add
(
languageRow
);
// export precision
var
exportPrecisionRow
=
new
UIRow
();
var
exportPrecision
=
new
UIInteger
(
config
.
getKey
(
'
exportPrecision
'
)
).
setRange
(
2
,
Infinity
);
exportPrecision
.
onChange
(
function
()
{
var
value
=
this
.
getValue
();
editor
.
config
.
setKey
(
'
exportPrecision
'
,
value
);
}
);
exportPrecisionRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/settings/exportPrecision
'
)
).
setWidth
(
'
90px
'
)
);
exportPrecisionRow
.
add
(
exportPrecision
);
settings
.
add
(
exportPrecisionRow
);
//
//
container
.
add
(
new
SidebarSettingsViewport
(
editor
)
);
container
.
add
(
new
SidebarSettingsViewport
(
editor
)
);
...
...
editor/js/Strings.js
浏览文件 @
c53e323d
...
@@ -311,7 +311,6 @@ function Strings( config ) {
...
@@ -311,7 +311,6 @@ function Strings( config ) {
'
sidebar/settings
'
:
'
Settings
'
,
'
sidebar/settings
'
:
'
Settings
'
,
'
sidebar/settings/language
'
:
'
Language
'
,
'
sidebar/settings/language
'
:
'
Language
'
,
'
sidebar/settings/exportPrecision
'
:
'
Export Precision
'
,
'
sidebar/settings/shortcuts
'
:
'
Shortcuts
'
,
'
sidebar/settings/shortcuts
'
:
'
Shortcuts
'
,
'
sidebar/settings/shortcuts/translate
'
:
'
Translate
'
,
'
sidebar/settings/shortcuts/translate
'
:
'
Translate
'
,
...
@@ -646,7 +645,6 @@ function Strings( config ) {
...
@@ -646,7 +645,6 @@ function Strings( config ) {
'
sidebar/settings
'
:
'
Paramètres
'
,
'
sidebar/settings
'
:
'
Paramètres
'
,
'
sidebar/settings/language
'
:
'
Langue
'
,
'
sidebar/settings/language
'
:
'
Langue
'
,
'
sidebar/settings/exportPrecision
'
:
'
Précision à l
\'
exportation
'
,
'
sidebar/settings/shortcuts
'
:
'
Shortcuts
'
,
'
sidebar/settings/shortcuts
'
:
'
Shortcuts
'
,
'
sidebar/settings/shortcuts/translate
'
:
'
Position
'
,
'
sidebar/settings/shortcuts/translate
'
:
'
Position
'
,
...
@@ -981,7 +979,6 @@ function Strings( config ) {
...
@@ -981,7 +979,6 @@ function Strings( config ) {
'
sidebar/settings
'
:
'
设置
'
,
'
sidebar/settings
'
:
'
设置
'
,
'
sidebar/settings/language
'
:
'
语言
'
,
'
sidebar/settings/language
'
:
'
语言
'
,
'
sidebar/settings/exportPrecision
'
:
'
输出精度
'
,
'
sidebar/settings/shortcuts
'
:
'
快捷键
'
,
'
sidebar/settings/shortcuts
'
:
'
快捷键
'
,
'
sidebar/settings/shortcuts/translate
'
:
'
移动
'
,
'
sidebar/settings/shortcuts/translate
'
:
'
移动
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录