Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
6164f981
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,发现更多精彩内容 >>
提交
6164f981
编写于
10月 30, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor: Use default values in geometry generators.
上级
746a52f5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
42 deletion
+8
-42
editor/js/Menubar.Add.js
editor/js/Menubar.Add.js
+8
-42
未找到文件。
editor/js/Menubar.Add.js
浏览文件 @
6164f981
...
...
@@ -56,7 +56,7 @@ Menubar.Add = function ( editor ) {
option
.
setTextContent
(
'
Plane
'
);
option
.
onClick
(
function
()
{
var
geometry
=
new
THREE
.
PlaneBufferGeometry
(
2
,
2
);
var
geometry
=
new
THREE
.
PlaneBufferGeometry
(
1
,
1
,
1
,
1
);
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
.
BoxBufferGeometry
(
1
,
1
,
1
);
var
geometry
=
new
THREE
.
BoxBufferGeometry
(
1
,
1
,
1
,
1
,
1
,
1
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Box
'
+
(
++
meshCount
);
...
...
@@ -89,10 +89,7 @@ Menubar.Add = function ( editor ) {
option
.
setTextContent
(
'
Circle
'
);
option
.
onClick
(
function
()
{
var
radius
=
1
;
var
segments
=
32
;
var
geometry
=
new
THREE
.
CircleBufferGeometry
(
radius
,
segments
);
var
geometry
=
new
THREE
.
CircleBufferGeometry
(
1
,
8
,
0
,
Math
.
PI
*
2
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Circle
'
+
(
++
meshCount
);
...
...
@@ -108,14 +105,7 @@ Menubar.Add = function ( editor ) {
option
.
setTextContent
(
'
Cylinder
'
);
option
.
onClick
(
function
()
{
var
radiusTop
=
1
;
var
radiusBottom
=
1
;
var
height
=
2
;
var
radiusSegments
=
32
;
var
heightSegments
=
1
;
var
openEnded
=
false
;
var
geometry
=
new
THREE
.
CylinderBufferGeometry
(
radiusTop
,
radiusBottom
,
height
,
radiusSegments
,
heightSegments
,
openEnded
);
var
geometry
=
new
THREE
.
CylinderBufferGeometry
(
1
,
1
,
1
,
8
,
1
,
false
,
0
,
Math
.
PI
*
2
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Cylinder
'
+
(
++
meshCount
);
...
...
@@ -131,15 +121,7 @@ Menubar.Add = function ( editor ) {
option
.
setTextContent
(
'
Sphere
'
);
option
.
onClick
(
function
()
{
var
radius
=
1
;
var
widthSegments
=
32
;
var
heightSegments
=
16
;
var
phiStart
=
0
;
var
phiLength
=
Math
.
PI
*
2
;
var
thetaStart
=
0
;
var
thetaLength
=
Math
.
PI
;
var
geometry
=
new
THREE
.
SphereBufferGeometry
(
radius
,
widthSegments
,
heightSegments
,
phiStart
,
phiLength
,
thetaStart
,
thetaLength
);
var
geometry
=
new
THREE
.
SphereBufferGeometry
(
1
,
8
,
6
,
0
,
Math
.
PI
*
2
,
0
,
Math
.
PI
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Sphere
'
+
(
++
meshCount
);
...
...
@@ -155,10 +137,7 @@ Menubar.Add = function ( editor ) {
option
.
setTextContent
(
'
Icosahedron
'
);
option
.
onClick
(
function
()
{
var
radius
=
1
;
var
detail
=
2
;
var
geometry
=
new
THREE
.
IcosahedronGeometry
(
radius
,
detail
);
var
geometry
=
new
THREE
.
IcosahedronGeometry
(
1
,
0
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Icosahedron
'
+
(
++
meshCount
);
...
...
@@ -174,13 +153,7 @@ Menubar.Add = function ( editor ) {
option
.
setTextContent
(
'
Torus
'
);
option
.
onClick
(
function
()
{
var
radius
=
2
;
var
tube
=
1
;
var
radialSegments
=
32
;
var
tubularSegments
=
12
;
var
arc
=
Math
.
PI
*
2
;
var
geometry
=
new
THREE
.
TorusBufferGeometry
(
radius
,
tube
,
radialSegments
,
tubularSegments
,
arc
);
var
geometry
=
new
THREE
.
TorusBufferGeometry
(
1
,
0.4
,
8
,
6
,
Math
.
PI
*
2
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
Torus
'
+
(
++
meshCount
);
...
...
@@ -196,14 +169,7 @@ Menubar.Add = function ( editor ) {
option
.
setTextContent
(
'
TorusKnot
'
);
option
.
onClick
(
function
()
{
var
radius
=
2
;
var
tube
=
0.8
;
var
tubularSegments
=
64
;
var
radialSegments
=
12
;
var
p
=
2
;
var
q
=
3
;
var
geometry
=
new
THREE
.
TorusKnotBufferGeometry
(
radius
,
tube
,
tubularSegments
,
radialSegments
,
p
,
q
);
var
geometry
=
new
THREE
.
TorusKnotBufferGeometry
(
1
,
0.4
,
64
,
8
,
2
,
3
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshStandardMaterial
()
);
mesh
.
name
=
'
TorusKnot
'
+
(
++
meshCount
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录