Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
ab48a759
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,体验更适合开发者的 AI 搜索 >>
提交
ab48a759
编写于
2月 07, 2020
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor: Project panel clean up.
上级
5b59c56f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
52 addition
and
51 deletion
+52
-51
editor/js/Sidebar.Project.js
editor/js/Sidebar.Project.js
+48
-45
editor/js/Strings.js
editor/js/Strings.js
+4
-6
未找到文件。
editor/js/Sidebar.Project.js
浏览文件 @
ab48a759
...
...
@@ -56,62 +56,62 @@ var SidebarProject = function ( editor ) {
// Renderer
var
rendererPropertiesRow1
=
new
UIRow
();
rendererPropertiesRow1
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/project/renderer
'
)
).
setWidth
(
'
90px
'
)
);
var
rendererPanel
=
new
UIPanel
();
container
.
add
(
rendererPanel
);
var
headerRow
=
new
UIRow
();
headerRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/project/renderer
'
).
toUpperCase
()
)
);
rendererPanel
.
add
(
headerRow
);
// Renderer / Antialias
var
rendererAntialias
=
new
UIBoolean
(
config
.
getKey
(
'
project/renderer/antialias
'
),
strings
.
getKey
(
'
sidebar/project/antialias
'
)
).
onChange
(
function
()
{
var
antialiasRow
=
new
UIRow
();
var
antialiasBoolean
=
new
UIBoolean
(
config
.
getKey
(
'
project/renderer/antialias
'
)
).
onChange
(
function
()
{
config
.
setKey
(
'
project/renderer/antialias
'
,
this
.
getValue
()
);
updateRenderer
();
}
);
rendererPropertiesRow1
.
add
(
rendererAntialias
);
antialiasRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/project/antialias
'
)
).
setWidth
(
'
90px
'
)
);
antialiasRow
.
add
(
antialiasBoolean
);
rendererPanel
.
add
(
antialiasRow
);
// Renderer / Shadows
var
rendererShadows
=
new
UIBoolean
(
config
.
getKey
(
'
project/renderer/shadows
'
),
strings
.
getKey
(
'
sidebar/project/shadows
'
)
).
onChange
(
function
()
{
var
shadowsRow
=
new
UIRow
();
var
shadowsBoolean
=
new
UIBoolean
(
config
.
getKey
(
'
project/renderer/shadows
'
)
).
onChange
(
function
()
{
config
.
setKey
(
'
project/renderer/shadows
'
,
this
.
getValue
()
);
updateRenderer
();
}
);
rendererPropertiesRow1
.
add
(
rendererShadows
);
projectsettings
.
add
(
rendererPropertiesRow1
);
shadowsRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/project/shadows
'
)
).
setWidth
(
'
90px
'
)
);
shadowsRow
.
add
(
shadowsBoolean
);
// Renderer / Physically Correct lights
rendererPanel
.
add
(
shadowsRow
);
var
rendererPropertiesRow2
=
new
UIRow
();
// Renderer / Physically Correct lights
var
rendererPhysicallyCorrectLights
=
new
UIBoolean
(
config
.
getKey
(
'
project/renderer/physicallyCorrectLights
'
),
strings
.
getKey
(
'
sidebar/project/physicallyCorrectLights
'
)
).
onChange
(
function
()
{
var
physicallyCorrectLightsRow
=
new
UIRow
();
var
physicallyCorrectLightsBoolean
=
new
UIBoolean
(
config
.
getKey
(
'
project/renderer/physicallyCorrectLights
'
)
).
onChange
(
function
()
{
config
.
setKey
(
'
project/renderer/physicallyCorrectLights
'
,
this
.
getValue
()
);
updateRenderer
();
}
);
rendererPhysicallyCorrectLights
.
setMarginLeft
(
'
90px
'
);
rendererPropertiesRow2
.
add
(
rendererPhysicallyCorrectLights
);
projectsettings
.
add
(
rendererPropertiesRow2
);
// Tonemapping
physicallyCorrectLightsRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/project/physicallyCorrectLights
'
)
).
setWidth
(
'
90px
'
)
);
physicallyCorrectLightsRow
.
add
(
physicallyCorrectLightsBoolean
);
var
tonemapping
=
new
UIPanel
(
);
rendererPanel
.
add
(
physicallyCorrectLightsRow
);
//
Tonemapping / Header
//
Renderer / Tonemapping
var
headerRow
=
new
UIRow
();
headerRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/project/toneMapping
'
).
toUpperCase
()
)
);
tonemapping
.
add
(
headerRow
);
// Tonemapping / Type
var
toneMappingTypeRow
=
new
UIRow
();
var
rendererToneMappingTypeLabel
=
new
UIText
(
strings
.
getKey
(
'
sidebar/project/toneMappingType
'
)
).
setWidth
(
'
90px
'
);
var
rendererToneMappingTypeSelect
=
new
UISelect
().
setOptions
(
{
var
toneMappingRow
=
new
UIRow
();
var
toneMappingSelect
=
new
UISelect
().
setOptions
(
{
0
:
'
None
'
,
1
:
'
Linear
'
,
2
:
'
Reinhard
'
,
...
...
@@ -124,47 +124,50 @@ var SidebarProject = function ( editor ) {
updateRenderer
();
}
);
rendererToneMappingTypeSelect
.
setValue
(
config
.
getKey
(
'
project/renderer/toneMapping
'
)
);
toneMappingTypeRow
.
add
(
rendererToneMappingTypeLabel
,
rendererToneMappingTypeSelect
);
tonemapping
.
add
(
toneMappingTypeRow
);
toneMappingSelect
.
setValue
(
config
.
getKey
(
'
project/renderer/toneMapping
'
)
);
toneMappingRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/project/toneMapping
'
)
).
setWidth
(
'
90px
'
)
);
toneMappingRow
.
add
(
toneMappingSelect
);
rendererPanel
.
add
(
toneMappingRow
);
// Tonemapping / Exposure
var
toneMappingExposureRow
=
new
UIRow
();
var
rendererToneMappingExposureLabel
=
new
UIText
(
strings
.
getKey
(
'
sidebar/project/toneMappingExposure
'
)
).
setWidth
(
'
90px
'
);
var
rendererToneMappingExposure
=
new
UINumber
(
config
.
getKey
(
'
project/renderer/toneMappingExposure
'
)
).
setRange
(
0
,
10
).
onChange
(
function
()
{
var
toneMappingExposure
=
new
UINumber
(
config
.
getKey
(
'
project/renderer/toneMappingExposure
'
)
).
setRange
(
0
,
10
).
onChange
(
function
()
{
config
.
setKey
(
'
project/renderer/toneMappingExposure
'
,
this
.
getValue
()
);
updateTonemapping
();
}
);
toneMappingExposureRow
.
add
(
rendererToneMappingExposureLabel
,
rendererToneMappingExposure
);
tonemapping
.
add
(
toneMappingExposureRow
);
toneMappingExposureRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/project/toneMappingExposure
'
)
).
setWidth
(
'
90px
'
)
);
toneMappingExposureRow
.
add
(
toneMappingExposure
);
rendererPanel
.
add
(
toneMappingExposureRow
);
// Tonemapping / White Point
var
toneMappingWhitePointRow
=
new
UIRow
();
var
rendererToneMappingWhitePointLabel
=
new
UIText
(
strings
.
getKey
(
'
sidebar/project/toneMappingWhitePoint
'
)
).
setWidth
(
'
90px
'
);
var
rendererToneMappingWhitePoint
=
new
UINumber
(
config
.
getKey
(
'
project/renderer/toneMappingWhitePoint
'
)
).
setRange
(
0
,
10
).
onChange
(
function
()
{
var
toneMappingWhitePoint
=
new
UINumber
(
config
.
getKey
(
'
project/renderer/toneMappingWhitePoint
'
)
).
setRange
(
0
,
10
).
onChange
(
function
()
{
config
.
setKey
(
'
project/renderer/toneMappingWhitePoint
'
,
this
.
getValue
()
);
updateTonemapping
();
}
);
toneMappingWhitePointRow
.
add
(
rendererToneMappingWhitePointLabel
,
rendererToneMappingWhitePoint
);
tonemapping
.
add
(
toneMappingWhitePointRow
);
container
.
add
(
tonemapping
);
toneMappingWhitePointRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/project/toneMappingWhitePoint
'
)
).
setWidth
(
'
90px
'
)
);
toneMappingWhitePointRow
.
add
(
toneMappingWhitePoint
);
rendererPanel
.
add
(
toneMappingWhitePointRow
);
//
function
updateRenderer
()
{
createRenderer
(
rendererAntialias
.
getValue
(),
rendererShadows
.
getValue
(),
rendererToneMappingType
Select
.
getValue
(),
rendererPhysicallyCorrectLights
.
getValue
()
antialiasBoolean
.
getValue
(),
shadowsBoolean
.
getValue
(),
toneMapping
Select
.
getValue
(),
physicallyCorrectLightsBoolean
.
getValue
()
);
}
...
...
@@ -201,8 +204,8 @@ var SidebarProject = function ( editor ) {
function
updateTonemapping
()
{
currentRenderer
.
toneMappingExposure
=
rendererT
oneMappingExposure
.
getValue
();
currentRenderer
.
toneMappingWhitePoint
=
rendererT
oneMappingWhitePoint
.
getValue
();
currentRenderer
.
toneMappingExposure
=
t
oneMappingExposure
.
getValue
();
currentRenderer
.
toneMappingWhitePoint
=
t
oneMappingWhitePoint
.
getValue
();
signals
.
rendererUpdated
.
dispatch
();
...
...
editor/js/Strings.js
浏览文件 @
ab48a759
...
...
@@ -285,11 +285,10 @@ var Strings = function ( config ) {
'
sidebar/project/editable
'
:
'
Editable
'
,
'
sidebar/project/vr
'
:
'
VR
'
,
'
sidebar/project/renderer
'
:
'
Renderer
'
,
'
sidebar/project/antialias
'
:
'
antialias
'
,
'
sidebar/project/shadows
'
:
'
shadows
'
,
'
sidebar/project/physicallyCorrectLights
'
:
'
physically correct lights
'
,
'
sidebar/project/toneMapping
'
:
'
Tone Mapping
'
,
'
sidebar/project/toneMappingType
'
:
'
Type
'
,
'
sidebar/project/antialias
'
:
'
Antialias
'
,
'
sidebar/project/shadows
'
:
'
Shadows
'
,
'
sidebar/project/physicallyCorrectLights
'
:
'
Physically correct lights
'
,
'
sidebar/project/toneMapping
'
:
'
Tone mapping
'
,
'
sidebar/project/toneMappingExposure
'
:
'
Exposure
'
,
'
sidebar/project/toneMappingWhitePoint
'
:
'
White Point
'
,
'
sidebar/project/materials
'
:
'
Materials
'
,
...
...
@@ -576,7 +575,6 @@ var Strings = function ( config ) {
'
sidebar/project/shadows
'
:
'
阴影
'
,
'
sidebar/project/physicallyCorrectLights
'
:
'
物理光照
'
,
'
sidebar/project/toneMapping
'
:
'
色调映射
'
,
'
sidebar/project/toneMappingType
'
:
'
类型
'
,
'
sidebar/project/toneMappingExposure
'
:
'
曝光
'
,
'
sidebar/project/toneMappingWhitePoint
'
:
'
白点
'
,
'
sidebar/project/materials
'
:
'
材质
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录