Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
7dd2849c
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,发现更多精彩内容 >>
提交
7dd2849c
编写于
10月 15, 2015
作者:
D
Daniel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed duplicate editor.select()-calls
CmdAddObject and CmdRemoveObject now handle the selection
上级
b3924894
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
1 addition
and
33 deletion
+1
-33
editor/index.html
editor/index.html
+0
-1
editor/js/CmdRemoveObject.js
editor/js/CmdRemoveObject.js
+1
-0
editor/js/Loader.js
editor/js/Loader.js
+0
-14
editor/js/Menubar.Add.js
editor/js/Menubar.Add.js
+0
-16
editor/js/Menubar.Edit.js
editor/js/Menubar.Edit.js
+0
-2
未找到文件。
editor/index.html
浏览文件 @
7dd2849c
...
...
@@ -295,7 +295,6 @@
var
parent
=
object
.
parent
;
if
(
parent
!==
null
)
editor
.
execute
(
new
CmdRemoveObject
(
object
)
);
editor
.
select
(
parent
);
break
;
...
...
editor/js/CmdRemoveObject.js
浏览文件 @
7dd2849c
...
...
@@ -37,6 +37,7 @@ CmdRemoveObject.prototype = {
}
);
this
.
parent
.
remove
(
this
.
object
);
this
.
editor
.
select
(
this
.
parent
);
this
.
editor
.
signals
.
objectRemoved
.
dispatch
(
this
.
object
);
this
.
editor
.
signals
.
sceneGraphChanged
.
dispatch
();
...
...
editor/js/Loader.js
浏览文件 @
7dd2849c
...
...
@@ -25,7 +25,6 @@ var Loader = function ( editor ) {
var
amfobject
=
loader
.
parse
(
event
.
target
.
result
);
editor
.
execute
(
new
CmdAddObject
(
amfobject
)
);
editor
.
select
(
amfobject
);
},
false
);
reader
.
readAsArrayBuffer
(
file
);
...
...
@@ -82,7 +81,6 @@ var Loader = function ( editor ) {
mesh
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
},
false
);
reader
.
readAsText
(
file
);
...
...
@@ -111,7 +109,6 @@ var Loader = function ( editor ) {
mesh
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
...
...
@@ -133,7 +130,6 @@ var Loader = function ( editor ) {
collada
.
scene
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
collada
.
scene
)
);
editor
.
select
(
collada
.
scene
);
},
false
);
reader
.
readAsText
(
file
);
...
...
@@ -209,7 +205,6 @@ var Loader = function ( editor ) {
collada
.
scene
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
collada
.
scene
)
);
editor
.
select
(
collada
.
scene
);
},
false
);
reader
.
readAsArrayBuffer
(
file
);
...
...
@@ -234,7 +229,6 @@ var Loader = function ( editor ) {
mesh
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
},
false
);
reader
.
readAsArrayBuffer
(
file
);
...
...
@@ -252,7 +246,6 @@ var Loader = function ( editor ) {
object
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
object
)
);
editor
.
select
(
object
);
},
false
);
reader
.
readAsText
(
file
);
...
...
@@ -276,7 +269,6 @@ var Loader = function ( editor ) {
mesh
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
},
false
);
reader
.
readAsText
(
file
);
...
...
@@ -300,7 +292,6 @@ var Loader = function ( editor ) {
mesh
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
},
false
);
...
...
@@ -330,7 +321,6 @@ var Loader = function ( editor ) {
var mesh = new THREE.Mesh( geometry, material );
editor.execute( new CmdAddObject( mesh ) );
editor.select( mesh );
}, false );
reader.readAsBinaryString( file );
...
...
@@ -355,7 +345,6 @@ var Loader = function ( editor ) {
mesh
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
},
false
);
reader
.
readAsText
(
file
);
...
...
@@ -416,7 +405,6 @@ var Loader = function ( editor ) {
var
mesh
=
new
THREE
.
Mesh
(
result
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
else
if
(
data
.
metadata
.
type
.
toLowerCase
()
===
'
geometry
'
)
{
...
...
@@ -464,7 +452,6 @@ var Loader = function ( editor ) {
mesh
.
name
=
filename
;
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
else
if
(
data
.
metadata
.
type
.
toLowerCase
()
===
'
object
'
)
{
...
...
@@ -480,7 +467,6 @@ var Loader = function ( editor ) {
}
else
{
editor
.
execute
(
new
CmdAddObject
(
result
)
);
editor
.
select
(
result
);
}
...
...
editor/js/Menubar.Add.js
浏览文件 @
7dd2849c
...
...
@@ -41,7 +41,6 @@ Menubar.Add = function ( editor ) {
mesh
.
name
=
'
Group
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
options
.
add
(
option
);
...
...
@@ -69,7 +68,6 @@ Menubar.Add = function ( editor ) {
mesh
.
name
=
'
Plane
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
options
.
add
(
option
);
...
...
@@ -94,7 +92,6 @@ Menubar.Add = function ( editor ) {
mesh
.
name
=
'
Box
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
options
.
add
(
option
);
...
...
@@ -114,7 +111,6 @@ Menubar.Add = function ( editor ) {
mesh
.
name
=
'
Circle
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
options
.
add
(
option
);
...
...
@@ -138,7 +134,6 @@ Menubar.Add = function ( editor ) {
mesh
.
name
=
'
Cylinder
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
options
.
add
(
option
);
...
...
@@ -163,7 +158,6 @@ Menubar.Add = function ( editor ) {
mesh
.
name
=
'
Sphere
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
options
.
add
(
option
);
...
...
@@ -183,7 +177,6 @@ Menubar.Add = function ( editor ) {
mesh
.
name
=
'
Icosahedron
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
options
.
add
(
option
);
...
...
@@ -206,7 +199,6 @@ Menubar.Add = function ( editor ) {
mesh
.
name
=
'
Torus
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
options
.
add
(
option
);
...
...
@@ -231,7 +223,6 @@ Menubar.Add = function ( editor ) {
mesh
.
name
=
'
TorusKnot
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
mesh
)
);
editor
.
select
(
mesh
);
}
);
options
.
add
(
option
);
...
...
@@ -277,7 +268,6 @@ Menubar.Add = function ( editor ) {
sprite
.
name
=
'
Sprite
'
+
(
++
meshCount
);
editor
.
execute
(
new
CmdAddObject
(
sprite
)
);
editor
.
select
(
sprite
);
}
);
options
.
add
(
option
);
...
...
@@ -301,7 +291,6 @@ Menubar.Add = function ( editor ) {
light
.
name
=
'
PointLight
'
+
(
++
lightCount
);
editor
.
execute
(
new
CmdAddObject
(
light
)
);
editor
.
select
(
light
);
}
);
options
.
add
(
option
);
...
...
@@ -326,7 +315,6 @@ Menubar.Add = function ( editor ) {
light
.
position
.
set
(
0.5
,
1
,
0.75
).
multiplyScalar
(
200
);
editor
.
execute
(
new
CmdAddObject
(
light
)
);
editor
.
select
(
light
);
}
);
options
.
add
(
option
);
...
...
@@ -348,7 +336,6 @@ Menubar.Add = function ( editor ) {
light
.
position
.
set
(
0.5
,
1
,
0.75
).
multiplyScalar
(
200
);
editor
.
execute
(
new
CmdAddObject
(
light
)
);
editor
.
select
(
light
);
}
);
options
.
add
(
option
);
...
...
@@ -370,7 +357,6 @@ Menubar.Add = function ( editor ) {
light
.
position
.
set
(
0.5
,
1
,
0.75
).
multiplyScalar
(
200
);
editor
.
execute
(
new
CmdAddObject
(
light
)
);
editor
.
select
(
light
);
}
);
options
.
add
(
option
);
...
...
@@ -388,7 +374,6 @@ Menubar.Add = function ( editor ) {
light
.
name
=
'
AmbientLight
'
+
(
++
lightCount
);
editor
.
execute
(
new
CmdAddObject
(
light
)
);
editor
.
select
(
light
);
}
);
options
.
add
(
option
);
...
...
@@ -408,7 +393,6 @@ Menubar.Add = function ( editor ) {
camera
.
name
=
'
PerspectiveCamera
'
+
(
++
cameraCount
);
editor
.
execute
(
new
CmdAddObject
(
camera
)
);
editor
.
select
(
camera
);
}
);
options
.
add
(
option
);
...
...
editor/js/Menubar.Edit.js
浏览文件 @
7dd2849c
...
...
@@ -96,7 +96,6 @@ Menubar.Edit = function ( editor ) {
object
=
object
.
clone
();
editor
.
execute
(
new
CmdAddObject
(
object
)
);
editor
.
select
(
object
);
}
);
options
.
add
(
option
);
...
...
@@ -116,7 +115,6 @@ Menubar.Edit = function ( editor ) {
if
(
parent
===
undefined
)
return
;
// avoid deleting the camera or scene
editor
.
execute
(
new
CmdRemoveObject
(
object
)
);
editor
.
select
(
parent
);
}
);
options
.
add
(
option
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录