Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
63fe51ab
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,发现更多精彩内容 >>
提交
63fe51ab
编写于
11月 25, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor: Added settings tab. Moved theme code.
上级
5562b096
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
62 addition
and
85 deletion
+62
-85
editor/index.html
editor/index.html
+2
-2
editor/js/Menubar.View.js
editor/js/Menubar.View.js
+0
-81
editor/js/Menubar.js
editor/js/Menubar.js
+0
-1
editor/js/Sidebar.Settings.js
editor/js/Sidebar.Settings.js
+47
-0
editor/js/Sidebar.js
editor/js/Sidebar.js
+13
-1
未找到文件。
editor/index.html
浏览文件 @
63fe51ab
...
...
@@ -95,13 +95,13 @@
<script
src=
"js/Menubar.Edit.js"
></script>
<script
src=
"js/Menubar.Add.js"
></script>
<script
src=
"js/Menubar.Play.js"
></script>
<script
src=
"js/Menubar.View.js"
></script>
<script
src=
"js/Menubar.Examples.js"
></script>
<script
src=
"js/Menubar.Help.js"
></script>
<script
src=
"js/Menubar.Status.js"
></script>
<script
src=
"js/Sidebar.js"
></script>
<script
src=
"js/Sidebar.Project.js"
></script>
<script
src=
"js/Sidebar.Scene.js"
></script>
<script
src=
"js/Sidebar.Project.js"
></script>
<script
src=
"js/Sidebar.Settings.js"
></script>
<script
src=
"js/Sidebar.Properties.js"
></script>
<script
src=
"js/Sidebar.Object.js"
></script>
<script
src=
"js/Sidebar.Geometry.js"
></script>
...
...
editor/js/Menubar.View.js
已删除
100644 → 0
浏览文件 @
5562b096
/**
* @author mrdoob / http://mrdoob.com/
*/
Menubar
.
View
=
function
(
editor
)
{
var
container
=
new
UI
.
Panel
();
container
.
setClass
(
'
menu
'
);
var
title
=
new
UI
.
Panel
();
title
.
setClass
(
'
title
'
);
title
.
setTextContent
(
'
View
'
);
container
.
add
(
title
);
var
options
=
new
UI
.
Panel
();
options
.
setClass
(
'
options
'
);
container
.
add
(
options
);
// Light theme
var
option
=
new
UI
.
Row
();
option
.
setClass
(
'
option
'
);
option
.
setTextContent
(
'
Light theme
'
);
option
.
onClick
(
function
()
{
editor
.
setTheme
(
'
css/light.css
'
);
editor
.
config
.
setKey
(
'
theme
'
,
'
css/light.css
'
);
}
);
options
.
add
(
option
);
// Dark theme
var
option
=
new
UI
.
Row
();
option
.
setClass
(
'
option
'
);
option
.
setTextContent
(
'
Dark theme
'
);
option
.
onClick
(
function
()
{
editor
.
setTheme
(
'
css/dark.css
'
);
editor
.
config
.
setKey
(
'
theme
'
,
'
css/dark.css
'
);
}
);
options
.
add
(
option
);
//
options
.
add
(
new
UI
.
HorizontalRule
()
);
// fullscreen
var
option
=
new
UI
.
Row
();
option
.
setClass
(
'
option
'
);
option
.
setTextContent
(
'
Fullscreen
'
);
option
.
onClick
(
function
()
{
var
element
=
document
.
body
;
if
(
element
.
requestFullscreen
)
{
element
.
requestFullscreen
();
}
else
if
(
element
.
mozRequestFullScreen
)
{
element
.
mozRequestFullScreen
();
}
else
if
(
element
.
webkitRequestFullscreen
)
{
element
.
webkitRequestFullscreen
();
}
else
if
(
element
.
msRequestFullscreen
)
{
element
.
msRequestFullscreen
();
}
}
);
options
.
add
(
option
);
return
container
;
};
editor/js/Menubar.js
浏览文件 @
63fe51ab
...
...
@@ -12,7 +12,6 @@ var Menubar = function ( editor ) {
container
.
add
(
new
Menubar
.
Add
(
editor
)
);
container
.
add
(
new
Menubar
.
Play
(
editor
)
);
container
.
add
(
new
Menubar
.
Examples
(
editor
)
);
container
.
add
(
new
Menubar
.
View
(
editor
)
);
container
.
add
(
new
Menubar
.
Help
(
editor
)
);
container
.
add
(
new
Menubar
.
Status
(
editor
)
);
...
...
editor/js/Sidebar.Settings.js
0 → 100644
浏览文件 @
63fe51ab
/**
* @author mrdoob / http://mrdoob.com/
*/
Sidebar
.
Settings
=
function
(
editor
)
{
var
config
=
editor
.
config
;
var
signals
=
editor
.
signals
;
var
container
=
new
UI
.
Panel
();
container
.
setBorderTop
(
'
0
'
);
container
.
setPaddingTop
(
'
20px
'
);
// class
var
options
=
{
'
css/light.css
'
:
'
light
'
,
'
css/dark.css
'
:
'
dark
'
};
var
themeRow
=
new
UI
.
Row
();
var
theme
=
new
UI
.
Select
().
setWidth
(
'
150px
'
);
theme
.
setOptions
(
options
);
if
(
config
.
getKey
(
'
theme
'
)
!==
undefined
)
{
theme
.
setValue
(
config
.
getKey
(
'
theme
'
)
);
}
theme
.
onChange
(
function
()
{
var
value
=
this
.
getValue
();
editor
.
setTheme
(
value
);
editor
.
config
.
setKey
(
'
theme
'
,
value
);
}
);
themeRow
.
add
(
new
UI
.
Text
(
'
Theme
'
).
setWidth
(
'
90px
'
)
);
themeRow
.
add
(
theme
);
container
.
add
(
themeRow
);
return
container
;
};
editor/js/Sidebar.js
浏览文件 @
63fe51ab
...
...
@@ -11,10 +11,11 @@ var Sidebar = function ( editor ) {
var
sceneTab
=
new
UI
.
Text
(
'
SCENE
'
).
onClick
(
onClick
);
var
projectTab
=
new
UI
.
Text
(
'
PROJECT
'
).
onClick
(
onClick
);
var
settingsTab
=
new
UI
.
Text
(
'
SETTINGS
'
).
onClick
(
onClick
);
var
tabs
=
new
UI
.
Div
();
tabs
.
setId
(
'
tabs
'
);
tabs
.
add
(
sceneTab
,
projectTab
);
tabs
.
add
(
sceneTab
,
projectTab
,
settingsTab
);
container
.
add
(
tabs
);
function
onClick
(
event
)
{
...
...
@@ -39,15 +40,22 @@ var Sidebar = function ( editor ) {
);
container
.
add
(
project
);
var
settings
=
new
UI
.
Span
().
add
(
new
Sidebar
.
Settings
(
editor
)
);
container
.
add
(
settings
);
//
function
select
(
section
)
{
sceneTab
.
setClass
(
''
);
projectTab
.
setClass
(
''
);
settingsTab
.
setClass
(
''
);
scene
.
setDisplay
(
'
none
'
);
project
.
setDisplay
(
'
none
'
);
settings
.
setDisplay
(
'
none
'
);
switch
(
section
)
{
case
'
SCENE
'
:
...
...
@@ -58,6 +66,10 @@ var Sidebar = function ( editor ) {
projectTab
.
setClass
(
'
selected
'
);
project
.
setDisplay
(
''
);
break
;
case
'
SETTINGS
'
:
settingsTab
.
setClass
(
'
selected
'
);
settings
.
setDisplay
(
''
);
break
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录