Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
ff340dc7
T
three.js
项目概览
车家大少爷
/
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,发现更多精彩内容 >>
提交
ff340dc7
编写于
4月 25, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor: Switched to BufferGeometry. See #8617.
上级
40578c96
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
66 addition
and
41 deletion
+66
-41
editor/js/Menubar.Add.js
editor/js/Menubar.Add.js
+8
-8
editor/js/Sidebar.Geometry.BoxGeometry.js
editor/js/Sidebar.Geometry.BoxGeometry.js
+6
-3
editor/js/Sidebar.Geometry.CircleGeometry.js
editor/js/Sidebar.Geometry.CircleGeometry.js
+6
-3
editor/js/Sidebar.Geometry.CylinderGeometry.js
editor/js/Sidebar.Geometry.CylinderGeometry.js
+6
-3
editor/js/Sidebar.Geometry.Geometry.js
editor/js/Sidebar.Geometry.Geometry.js
+3
-3
editor/js/Sidebar.Geometry.IcosahedronGeometry.js
editor/js/Sidebar.Geometry.IcosahedronGeometry.js
+6
-3
editor/js/Sidebar.Geometry.LatheGeometry.js
editor/js/Sidebar.Geometry.LatheGeometry.js
+6
-5
editor/js/Sidebar.Geometry.PlaneGeometry.js
editor/js/Sidebar.Geometry.PlaneGeometry.js
+6
-3
editor/js/Sidebar.Geometry.SphereGeometry.js
editor/js/Sidebar.Geometry.SphereGeometry.js
+6
-3
editor/js/Sidebar.Geometry.TeapotBufferGeometry.js
editor/js/Sidebar.Geometry.TeapotBufferGeometry.js
+1
-1
editor/js/Sidebar.Geometry.TorusGeometry.js
editor/js/Sidebar.Geometry.TorusGeometry.js
+6
-3
editor/js/Sidebar.Geometry.TorusKnotGeometry.js
editor/js/Sidebar.Geometry.TorusKnotGeometry.js
+6
-3
未找到文件。
editor/js/Menubar.Add.js
浏览文件 @
ff340dc7
...
...
@@ -56,7 +56,7 @@ Menubar.Add = function ( editor ) {
option
.
setTextContent
(
'
Plane
'
);
option
.
onClick
(
function
()
{
var
geometry
=
new
THREE
.
PlaneGeometry
(
2
,
2
);
var
geometry
=
new
THREE
.
Plane
Buffer
Geometry
(
2
,
2
);
var
material
=
new
THREE
.
MeshStandardMaterial
();
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
material
);
mesh
.
name
=
'
Plane
'
+
(
++
meshCount
);
...
...
@@ -73,7 +73,7 @@ Menubar.Add = function ( editor ) {
option
.
setTextContent
(
'
Box
'
);
option
.
onClick
(
function
()
{
var
geometry
=
new
THREE
.
BoxGeometry
(
1
,
1
,
1
);
var
geometry
=
new
THREE
.
Box
Buffer
Geometry
(
1
,
1
,
1
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Box
'
+
(
++
meshCount
);
...
...
@@ -92,7 +92,7 @@ Menubar.Add = function ( editor ) {
var
radius
=
1
;
var
segments
=
32
;
var
geometry
=
new
THREE
.
CircleGeometry
(
radius
,
segments
);
var
geometry
=
new
THREE
.
Circle
Buffer
Geometry
(
radius
,
segments
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Circle
'
+
(
++
meshCount
);
...
...
@@ -115,7 +115,7 @@ Menubar.Add = function ( editor ) {
var
heightSegments
=
1
;
var
openEnded
=
false
;
var
geometry
=
new
THREE
.
CylinderGeometry
(
radiusTop
,
radiusBottom
,
height
,
radiusSegments
,
heightSegments
,
openEnded
);
var
geometry
=
new
THREE
.
Cylinder
Buffer
Geometry
(
radiusTop
,
radiusBottom
,
height
,
radiusSegments
,
heightSegments
,
openEnded
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Cylinder
'
+
(
++
meshCount
);
...
...
@@ -139,7 +139,7 @@ Menubar.Add = function ( editor ) {
var
thetaStart
=
0
;
var
thetaLength
=
Math
.
PI
;
var
geometry
=
new
THREE
.
SphereGeometry
(
radius
,
widthSegments
,
heightSegments
,
phiStart
,
phiLength
,
thetaStart
,
thetaLength
);
var
geometry
=
new
THREE
.
Sphere
Buffer
Geometry
(
radius
,
widthSegments
,
heightSegments
,
phiStart
,
phiLength
,
thetaStart
,
thetaLength
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Sphere
'
+
(
++
meshCount
);
...
...
@@ -180,7 +180,7 @@ Menubar.Add = function ( editor ) {
var
tubularSegments
=
12
;
var
arc
=
Math
.
PI
*
2
;
var
geometry
=
new
THREE
.
TorusGeometry
(
radius
,
tube
,
radialSegments
,
tubularSegments
,
arc
);
var
geometry
=
new
THREE
.
Torus
Buffer
Geometry
(
radius
,
tube
,
radialSegments
,
tubularSegments
,
arc
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Torus
'
+
(
++
meshCount
);
...
...
@@ -203,7 +203,7 @@ Menubar.Add = function ( editor ) {
var
p
=
2
;
var
q
=
3
;
var
geometry
=
new
THREE
.
TorusKnotGeometry
(
radius
,
tube
,
tubularSegments
,
radialSegments
,
p
,
q
);
var
geometry
=
new
THREE
.
TorusKnot
Buffer
Geometry
(
radius
,
tube
,
tubularSegments
,
radialSegments
,
p
,
q
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
TorusKnot
'
+
(
++
meshCount
);
...
...
@@ -265,7 +265,7 @@ Menubar.Add = function ( editor ) {
var
phiStart
=
0
;
var
phiLength
=
2
*
Math
.
PI
;
var
geometry
=
new
THREE
.
LatheGeometry
(
points
,
segments
,
phiStart
,
phiLength
);
var
geometry
=
new
THREE
.
Lathe
Buffer
Geometry
(
points
,
segments
,
phiStart
,
phiLength
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
(
{
side
:
THREE
.
DoubleSide
}
)
);
mesh
.
name
=
'
Lathe
'
+
(
++
meshCount
);
...
...
editor/js/Sidebar.Geometry.BoxGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -8,7 +8,8 @@ Sidebar.Geometry.BoxGeometry = function ( editor, object ) {
var
container
=
new
UI
.
Row
();
var
parameters
=
object
.
geometry
.
parameters
;
var
geometry
=
object
.
geometry
;
var
parameters
=
geometry
.
parameters
;
// width
...
...
@@ -74,7 +75,7 @@ Sidebar.Geometry.BoxGeometry = function ( editor, object ) {
function
update
()
{
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
.
BoxGeometry
(
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
[
geometry
.
type
]
(
width
.
getValue
(),
height
.
getValue
(),
depth
.
getValue
(),
...
...
@@ -87,4 +88,6 @@ Sidebar.Geometry.BoxGeometry = function ( editor, object ) {
return
container
;
}
};
Sidebar
.
Geometry
.
BoxBufferGeometry
=
Sidebar
.
Geometry
.
BoxGeometry
;
editor/js/Sidebar.Geometry.CircleGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -8,7 +8,8 @@ Sidebar.Geometry.CircleGeometry = function ( editor, object ) {
var
container
=
new
UI
.
Row
();
var
parameters
=
object
.
geometry
.
parameters
;
var
geometry
=
object
.
geometry
;
var
parameters
=
geometry
.
parameters
;
// radius
...
...
@@ -54,7 +55,7 @@ Sidebar.Geometry.CircleGeometry = function ( editor, object ) {
function
update
()
{
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
.
CircleGeometry
(
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
[
geometry
.
type
]
(
radius
.
getValue
(),
segments
.
getValue
(),
thetaStart
.
getValue
(),
...
...
@@ -65,4 +66,6 @@ Sidebar.Geometry.CircleGeometry = function ( editor, object ) {
return
container
;
}
};
Sidebar
.
Geometry
.
CircleBufferGeometry
=
Sidebar
.
Geometry
.
CircleGeometry
;
editor/js/Sidebar.Geometry.CylinderGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -8,7 +8,8 @@ Sidebar.Geometry.CylinderGeometry = function ( editor, object ) {
var
container
=
new
UI
.
Row
();
var
parameters
=
object
.
geometry
.
parameters
;
var
geometry
=
object
.
geometry
;
var
parameters
=
geometry
.
parameters
;
// radiusTop
...
...
@@ -74,7 +75,7 @@ Sidebar.Geometry.CylinderGeometry = function ( editor, object ) {
function
update
()
{
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
.
CylinderGeometry
(
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
[
geometry
.
type
]
(
radiusTop
.
getValue
(),
radiusBottom
.
getValue
(),
height
.
getValue
(),
...
...
@@ -87,4 +88,6 @@ Sidebar.Geometry.CylinderGeometry = function ( editor, object ) {
return
container
;
}
};
Sidebar
.
Geometry
.
CylinderBufferGeometry
=
Sidebar
.
Geometry
.
CylinderGeometry
;
editor/js/Sidebar.Geometry.Geometry.js
浏览文件 @
ff340dc7
...
...
@@ -30,7 +30,7 @@ Sidebar.Geometry.Geometry = function ( editor ) {
//
var
update
=
function
(
object
)
{
function
update
(
object
)
{
if
(
object
===
null
)
return
;
...
...
@@ -49,11 +49,11 @@ Sidebar.Geometry.Geometry = function ( editor ) {
}
}
;
}
signals
.
objectSelected
.
add
(
update
);
signals
.
geometryChanged
.
add
(
update
);
return
container
;
}
}
;
editor/js/Sidebar.Geometry.IcosahedronGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -8,7 +8,8 @@ Sidebar.Geometry.IcosahedronGeometry = function ( editor, object ) {
var
container
=
new
UI
.
Row
();
var
parameters
=
object
.
geometry
.
parameters
;
var
geometry
=
object
.
geometry
;
var
parameters
=
geometry
.
parameters
;
// radius
...
...
@@ -35,7 +36,7 @@ Sidebar.Geometry.IcosahedronGeometry = function ( editor, object ) {
function
update
()
{
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
.
IcosahedronGeometry
(
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
[
geometry
.
type
]
(
radius
.
getValue
(),
detail
.
getValue
()
)
)
);
...
...
@@ -46,4 +47,6 @@ Sidebar.Geometry.IcosahedronGeometry = function ( editor, object ) {
return
container
;
}
};
Sidebar
.
Geometry
.
IcosahedronBufferGeometry
=
Sidebar
.
Geometry
.
IcosahedronGeometry
;
editor/js/Sidebar.Geometry.LatheGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -8,7 +8,8 @@ Sidebar.Geometry.LatheGeometry = function( editor, object ) {
var
container
=
new
UI
.
Row
();
var
parameters
=
object
.
geometry
.
parameters
;
var
geometry
=
object
.
geometry
;
var
parameters
=
geometry
.
parameters
;
// segments
...
...
@@ -133,17 +134,17 @@ Sidebar.Geometry.LatheGeometry = function( editor, object ) {
}
var
geometry
=
new
THREE
.
LatheGeometry
(
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
[
geometry
.
type
]
(
points
,
segments
.
getValue
(),
phiStart
.
getValue
()
/
180
*
Math
.
PI
,
phiLength
.
getValue
()
/
180
*
Math
.
PI
);
editor
.
execute
(
new
SetGeometryCommand
(
object
,
geometry
)
);
)
)
);
}
return
container
;
};
Sidebar
.
Geometry
.
LatheBufferGeometry
=
Sidebar
.
Geometry
.
LatheGeometry
;
editor/js/Sidebar.Geometry.PlaneGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -8,7 +8,8 @@ Sidebar.Geometry.PlaneGeometry = function ( editor, object ) {
var
container
=
new
UI
.
Row
();
var
parameters
=
object
.
geometry
.
parameters
;
var
geometry
=
object
.
geometry
;
var
parameters
=
geometry
.
parameters
;
// width
...
...
@@ -55,7 +56,7 @@ Sidebar.Geometry.PlaneGeometry = function ( editor, object ) {
function
update
()
{
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
.
PlaneGeometry
(
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
[
geometry
.
type
]
(
width
.
getValue
(),
height
.
getValue
(),
widthSegments
.
getValue
(),
...
...
@@ -66,4 +67,6 @@ Sidebar.Geometry.PlaneGeometry = function ( editor, object ) {
return
container
;
}
};
Sidebar
.
Geometry
.
PlaneBufferGeometry
=
Sidebar
.
Geometry
.
PlaneGeometry
;
editor/js/Sidebar.Geometry.SphereGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -8,7 +8,8 @@ Sidebar.Geometry.SphereGeometry = function ( editor, object ) {
var
container
=
new
UI
.
Row
();
var
parameters
=
object
.
geometry
.
parameters
;
var
geometry
=
object
.
geometry
;
var
parameters
=
geometry
.
parameters
;
// radius
...
...
@@ -85,7 +86,7 @@ Sidebar.Geometry.SphereGeometry = function ( editor, object ) {
function
update
()
{
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
.
SphereGeometry
(
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
[
geometry
.
type
]
(
radius
.
getValue
(),
widthSegments
.
getValue
(),
heightSegments
.
getValue
(),
...
...
@@ -99,4 +100,6 @@ Sidebar.Geometry.SphereGeometry = function ( editor, object ) {
return
container
;
}
};
Sidebar
.
Geometry
.
SphereBufferGeometry
=
Sidebar
.
Geometry
.
SphereGeometry
;
editor/js/Sidebar.Geometry.TeapotBufferGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -100,4 +100,4 @@ Sidebar.Geometry.TeapotBufferGeometry = function ( signals, object ) {
return
container
;
}
}
;
editor/js/Sidebar.Geometry.TorusGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -8,7 +8,8 @@ Sidebar.Geometry.TorusGeometry = function ( editor, object ) {
var
container
=
new
UI
.
Row
();
var
parameters
=
object
.
geometry
.
parameters
;
var
geometry
=
object
.
geometry
;
var
parameters
=
geometry
.
parameters
;
// radius
...
...
@@ -65,7 +66,7 @@ Sidebar.Geometry.TorusGeometry = function ( editor, object ) {
function
update
()
{
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
.
TorusGeometry
(
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
[
geometry
.
type
]
(
radius
.
getValue
(),
tube
.
getValue
(),
radialSegments
.
getValue
(),
...
...
@@ -77,4 +78,6 @@ Sidebar.Geometry.TorusGeometry = function ( editor, object ) {
return
container
;
}
};
Sidebar
.
Geometry
.
TorusBufferGeometry
=
Sidebar
.
Geometry
.
TorusGeometry
;
editor/js/Sidebar.Geometry.TorusKnotGeometry.js
浏览文件 @
ff340dc7
...
...
@@ -8,7 +8,8 @@ Sidebar.Geometry.TorusKnotGeometry = function ( editor, object ) {
var
container
=
new
UI
.
Row
();
var
parameters
=
object
.
geometry
.
parameters
;
var
geometry
=
object
.
geometry
;
var
parameters
=
geometry
.
parameters
;
// radius
...
...
@@ -75,7 +76,7 @@ Sidebar.Geometry.TorusKnotGeometry = function ( editor, object ) {
function
update
()
{
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
.
TorusKnotGeometry
(
editor
.
execute
(
new
SetGeometryCommand
(
object
,
new
THREE
[
geometry
.
type
]
(
radius
.
getValue
(),
tube
.
getValue
(),
tubularSegments
.
getValue
(),
...
...
@@ -88,4 +89,6 @@ Sidebar.Geometry.TorusKnotGeometry = function ( editor, object ) {
return
container
;
}
};
Sidebar
.
Geometry
.
TorusKnotBufferGeometry
=
Sidebar
.
Geometry
.
TorusKnotGeometry
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录