Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
c9362b3d
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,发现更多精彩内容 >>
提交
c9362b3d
编写于
4月 14, 2014
作者:
A
aaron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor - Add CollapsiblePanel
上级
423df055
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
186 addition
and
15 deletion
+186
-15
editor/css/dark.css
editor/css/dark.css
+22
-0
editor/css/light.css
editor/css/light.css
+22
-0
editor/js/Sidebar.Geometry.js
editor/js/Sidebar.Geometry.js
+3
-3
editor/js/Sidebar.Material.js
editor/js/Sidebar.Material.js
+3
-3
editor/js/Sidebar.Object3D.js
editor/js/Sidebar.Object3D.js
+3
-3
editor/js/Sidebar.Renderer.js
editor/js/Sidebar.Renderer.js
+3
-3
editor/js/Sidebar.Scene.js
editor/js/Sidebar.Scene.js
+3
-3
editor/js/libs/ui.js
editor/js/libs/ui.js
+127
-0
未找到文件。
editor/css/dark.css
浏览文件 @
c9362b3d
...
...
@@ -55,6 +55,28 @@ button {
user-select
:
none
;
}
.CollapsiblePanel
.CollapsiblePanelButton
{
float
:
left
;
margin-right
:
4px
;
width
:
0px
;
height
:
0px
;
border
:
6px
solid
transparent
;
}
.CollapsiblePanel.collapsed
.CollapsiblePanelButton
{
margin-top
:
2px
;
border-left-color
:
#bbb
;
}
.CollapsiblePanel
:not
(
.collapsed
)
.CollapsiblePanelButton
{
margin-top
:
6px
;
border-top-color
:
#bbb
;
}
.CollapsiblePanel.collapsed
.CollapsibleContent
{
display
:
none
;
}
.FancySelect
{
background
:
#222
;
border
:
1px
solid
#3C3C3C
;
...
...
editor/css/light.css
浏览文件 @
c9362b3d
...
...
@@ -28,6 +28,28 @@ button {
user-select
:
none
;
}
.CollapsiblePanel
.CollapsiblePanelButton
{
float
:
left
;
margin-right
:
4px
;
width
:
0px
;
height
:
0px
;
border
:
6px
solid
transparent
;
}
.CollapsiblePanel.collapsed
.CollapsiblePanelButton
{
margin-top
:
2px
;
border-left-color
:
#333
;
}
.CollapsiblePanel
:not
(
.collapsed
)
.CollapsiblePanelButton
{
margin-top
:
6px
;
border-top-color
:
#333
;
}
.CollapsiblePanel.collapsed
.CollapsibleContent
{
display
:
none
;
}
.FancySelect
{
background
:
#fff
;
border
:
1px
solid
#ccc
;
...
...
editor/js/Sidebar.Geometry.js
浏览文件 @
c9362b3d
...
...
@@ -2,11 +2,11 @@ Sidebar.Geometry = function ( editor ) {
var
signals
=
editor
.
signals
;
var
container
=
new
UI
.
Panel
();
var
container
=
new
UI
.
Collapsible
Panel
();
container
.
setDisplay
(
'
none
'
);
container
.
add
(
new
UI
.
Text
().
setValue
(
'
GEOMETRY
'
)
);
container
.
add
(
new
UI
.
Break
()
,
new
UI
.
Break
()
);
container
.
add
Static
(
new
UI
.
Text
().
setValue
(
'
GEOMETRY
'
)
);
container
.
add
(
new
UI
.
Break
()
);
// uuid
...
...
editor/js/Sidebar.Material.js
浏览文件 @
c9362b3d
...
...
@@ -20,12 +20,12 @@ Sidebar.Material = function ( editor ) {
};
var
container
=
new
UI
.
Panel
();
var
container
=
new
UI
.
Collapsible
Panel
();
container
.
setDisplay
(
'
none
'
);
container
.
dom
.
classList
.
add
(
'
Material
'
);
container
.
add
(
new
UI
.
Text
().
setValue
(
'
MATERIAL
'
)
);
container
.
add
(
new
UI
.
Break
()
,
new
UI
.
Break
()
);
container
.
add
Static
(
new
UI
.
Text
().
setValue
(
'
MATERIAL
'
)
);
container
.
add
(
new
UI
.
Break
()
);
// uuid
...
...
editor/js/Sidebar.Object3D.js
浏览文件 @
c9362b3d
...
...
@@ -2,12 +2,12 @@ Sidebar.Object3D = function ( editor ) {
var
signals
=
editor
.
signals
;
var
container
=
new
UI
.
Panel
();
var
container
=
new
UI
.
Collapsible
Panel
();
container
.
setDisplay
(
'
none
'
);
var
objectType
=
new
UI
.
Text
().
setTextTransform
(
'
uppercase
'
);
container
.
add
(
objectType
);
container
.
add
(
new
UI
.
Break
()
,
new
UI
.
Break
()
);
container
.
add
Static
(
objectType
);
container
.
add
(
new
UI
.
Break
()
);
// uuid
...
...
editor/js/Sidebar.Renderer.js
浏览文件 @
c9362b3d
...
...
@@ -13,10 +13,10 @@ Sidebar.Renderer = function ( editor ) {
};
var
container
=
new
UI
.
Panel
();
var
container
=
new
UI
.
Collapsible
Panel
();
container
.
add
(
new
UI
.
Text
(
'
RENDERER
'
)
);
container
.
add
(
new
UI
.
Break
()
,
new
UI
.
Break
()
);
container
.
add
Static
(
new
UI
.
Text
(
'
RENDERER
'
)
);
container
.
add
(
new
UI
.
Break
()
);
// class
...
...
editor/js/Sidebar.Scene.js
浏览文件 @
c9362b3d
...
...
@@ -2,10 +2,10 @@ Sidebar.Scene = function ( editor ) {
var
signals
=
editor
.
signals
;
var
container
=
new
UI
.
Panel
();
var
container
=
new
UI
.
Collapsible
Panel
();
container
.
add
(
new
UI
.
Text
(
'
SCENE
'
)
);
container
.
add
(
new
UI
.
Break
()
,
new
UI
.
Break
()
);
container
.
add
Static
(
new
UI
.
Text
(
'
SCENE
'
)
);
container
.
add
(
new
UI
.
Break
()
);
var
outliner
=
new
UI
.
FancySelect
().
setId
(
'
outliner
'
);
outliner
.
onChange
(
function
()
{
...
...
editor/js/libs/ui.js
浏览文件 @
c9362b3d
...
...
@@ -137,6 +137,133 @@ UI.Panel.prototype.clear = function () {
};
// Collapsible Panel
UI
.
CollapsiblePanel
=
function
()
{
UI
.
Panel
.
call
(
this
);
this
.
dom
.
className
=
'
Panel CollapsiblePanel
'
;
this
.
button
=
document
.
createElement
(
'
div
'
);
this
.
button
.
className
=
'
CollapsiblePanelButton
'
;
this
.
dom
.
appendChild
(
this
.
button
);
var
scope
=
this
;
this
.
button
.
addEventListener
(
'
click
'
,
function
(
event
)
{
scope
.
toggle
();
},
false
);
this
.
content
=
document
.
createElement
(
'
div
'
);
this
.
content
.
className
=
'
CollapsibleContent
'
;
this
.
dom
.
appendChild
(
this
.
content
);
this
.
isCollapsed
=
false
;
return
this
;
};
UI
.
CollapsiblePanel
.
prototype
=
Object
.
create
(
UI
.
Panel
.
prototype
);
UI
.
CollapsiblePanel
.
prototype
.
addStatic
=
function
()
{
for
(
var
i
=
0
;
i
<
arguments
.
length
;
i
++
)
{
this
.
dom
.
insertBefore
(
arguments
[
i
].
dom
,
this
.
content
);
}
return
this
;
};
UI
.
CollapsiblePanel
.
prototype
.
removeStatic
=
UI
.
Panel
.
prototype
.
remove
;
UI
.
CollapsiblePanel
.
prototype
.
clearStatic
=
function
()
{
this
.
dom
.
childNodes
.
forEach
(
function
(
child
)
{
if
(
child
!==
this
.
content
)
{
this
.
dom
.
removeChild
(
child
);
}
});
};
UI
.
CollapsiblePanel
.
prototype
.
add
=
function
()
{
for
(
var
i
=
0
;
i
<
arguments
.
length
;
i
++
)
{
this
.
content
.
appendChild
(
arguments
[
i
].
dom
);
}
return
this
;
};
UI
.
CollapsiblePanel
.
prototype
.
remove
=
function
()
{
for
(
var
i
=
0
;
i
<
arguments
.
length
;
i
++
)
{
this
.
content
.
removeChild
(
arguments
[
i
].
dom
);
}
return
this
;
};
UI
.
CollapsiblePanel
.
prototype
.
clear
=
function
()
{
while
(
this
.
content
.
children
.
length
)
{
this
.
content
.
removeChild
(
this
.
content
.
lastChild
);
}
};
UI
.
CollapsiblePanel
.
prototype
.
toggle
=
function
()
{
this
.
setCollapsed
(
!
this
.
isCollapsed
);
};
UI
.
CollapsiblePanel
.
prototype
.
collapse
=
function
()
{
this
.
setCollapsed
(
true
);
};
UI
.
CollapsiblePanel
.
prototype
.
expand
=
function
()
{
this
.
setCollapsed
(
false
);
};
UI
.
CollapsiblePanel
.
prototype
.
setCollapsed
=
function
(
setCollapsed
)
{
if
(
setCollapsed
)
{
this
.
dom
.
classList
.
add
(
'
collapsed
'
);
}
else
{
this
.
dom
.
classList
.
remove
(
'
collapsed
'
);
}
this
.
isCollapsed
=
setCollapsed
;
};
// Text
UI
.
Text
=
function
(
text
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录