Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
593102b1
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,发现更多精彩内容 >>
提交
593102b1
编写于
10月 11, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor: Prettier Shadow panel.
上级
14b7e324
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
34 addition
and
10 deletion
+34
-10
editor/js/Sidebar.Object3D.js
editor/js/Sidebar.Object3D.js
+16
-10
editor/js/libs/ui.js
editor/js/libs/ui.js
+18
-0
未找到文件。
editor/js/Sidebar.Object3D.js
浏览文件 @
593102b1
...
@@ -247,21 +247,27 @@ Sidebar.Object3D = function ( editor ) {
...
@@ -247,21 +247,27 @@ Sidebar.Object3D = function ( editor ) {
// shadow
// shadow
var
objectCastShadowRow
=
new
UI
.
Panel
();
var
objectShadowRow
=
new
UI
.
Panel
();
objectShadowRow
.
add
(
new
UI
.
Text
(
'
Shadow
'
).
setWidth
(
'
90px
'
)
);
var
objectCastShadowSpan
=
new
UI
.
Span
();
var
objectCastShadow
=
new
UI
.
Checkbox
().
onChange
(
update
);
var
objectCastShadow
=
new
UI
.
Checkbox
().
onChange
(
update
);
objectCastShadow
Row
.
add
(
new
UI
.
Text
(
'
Cast Shadow
'
).
setWidth
(
'
90px
'
)
);
objectCastShadow
Span
.
add
(
objectCastShadow
);
objectCastShadow
Row
.
add
(
objectCastShadow
);
objectCastShadow
Span
.
add
(
new
UI
.
Text
(
'
cast
'
).
setMarginRight
(
'
10px
'
)
);
container
.
add
(
objectCastShadowRow
);
objectShadowRow
.
add
(
objectCastShadowSpan
);
var
objectReceiveShadow
Row
=
new
UI
.
Panel
();
var
objectReceiveShadow
Span
=
new
UI
.
Span
();
var
objectReceiveShadow
=
new
UI
.
Checkbox
().
onChange
(
update
);
var
objectReceiveShadow
=
new
UI
.
Checkbox
().
onChange
(
update
);
objectReceiveShadowRow
.
add
(
new
UI
.
Text
(
'
Receive Shad
'
).
setWidth
(
'
90px
'
)
);
objectReceiveShadowSpan
.
add
(
objectReceiveShadow
);
objectReceiveShadowRow
.
add
(
objectReceiveShadow
);
objectReceiveShadowSpan
.
add
(
new
UI
.
Text
(
'
receive
'
)
);
objectShadowRow
.
add
(
objectReceiveShadowSpan
);
container
.
add
(
object
Receive
ShadowRow
);
container
.
add
(
objectShadowRow
);
// visible
// visible
...
@@ -493,8 +499,8 @@ Sidebar.Object3D = function ( editor ) {
...
@@ -493,8 +499,8 @@ Sidebar.Object3D = function ( editor ) {
'
angle
'
:
objectAngleRow
,
'
angle
'
:
objectAngleRow
,
'
exponent
'
:
objectExponentRow
,
'
exponent
'
:
objectExponentRow
,
'
decay
'
:
objectDecayRow
,
'
decay
'
:
objectDecayRow
,
'
castShadow
'
:
object
Cast
ShadowRow
,
'
castShadow
'
:
objectShadowRow
,
'
receiveShadow
'
:
objectReceiveShadow
Row
'
receiveShadow
'
:
objectReceiveShadow
Span
};
};
for
(
var
property
in
properties
)
{
for
(
var
property
in
properties
)
{
...
...
editor/js/libs/ui.js
浏览文件 @
593102b1
...
@@ -90,6 +90,8 @@ UI.Element.prototype = {
...
@@ -90,6 +90,8 @@ UI.Element.prototype = {
}
}
return
this
;
},
},
setDisabled
:
function
(
value
)
{
setDisabled
:
function
(
value
)
{
...
@@ -123,6 +125,7 @@ properties.forEach( function ( property ) {
...
@@ -123,6 +125,7 @@ properties.forEach( function ( property ) {
UI
.
Element
.
prototype
[
method
]
=
function
()
{
UI
.
Element
.
prototype
[
method
]
=
function
()
{
this
.
setStyle
(
property
,
arguments
);
this
.
setStyle
(
property
,
arguments
);
return
this
;
return
this
;
};
};
...
@@ -147,6 +150,21 @@ events.forEach( function ( event ) {
...
@@ -147,6 +150,21 @@ events.forEach( function ( event ) {
}
);
}
);
// Span
UI
.
Span
=
function
()
{
UI
.
Element
.
call
(
this
);
this
.
dom
=
document
.
createElement
(
'
span
'
);
return
this
;
};
UI
.
Span
.
prototype
=
Object
.
create
(
UI
.
Element
.
prototype
);
UI
.
Span
.
prototype
.
constructor
=
UI
.
Span
;
// Panel
// Panel
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录