Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
f658b6f2
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,发现更多精彩内容 >>
提交
f658b6f2
编写于
1月 15, 2018
作者:
M
Mugen87
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Docs: Clean up geometry.js and material.js
上级
782f2cde
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
391 addition
and
454 deletion
+391
-454
docs/scenes/js/geometry.js
docs/scenes/js/geometry.js
+217
-281
docs/scenes/js/material.js
docs/scenes/js/material.js
+174
-173
未找到文件。
docs/scenes/js/geometry.js
浏览文件 @
f658b6f2
...
...
@@ -4,74 +4,6 @@
var
twoPi
=
Math
.
PI
*
2
;
var
constants
=
{
combine
:
{
"
THREE.MultiplyOperation
"
:
THREE
.
MultiplyOperation
,
"
THREE.MixOperation
"
:
THREE
.
MixOperation
,
"
THREE.AddOperation
"
:
THREE
.
AddOperation
},
side
:
{
"
THREE.FrontSide
"
:
THREE
.
FrontSide
,
"
THREE.BackSide
"
:
THREE
.
BackSide
,
"
THREE.DoubleSide
"
:
THREE
.
DoubleSide
},
colors
:
{
"
THREE.NoColors
"
:
THREE
.
NoColors
,
"
THREE.FaceColors
"
:
THREE
.
FaceColors
,
"
THREE.VertexColors
"
:
THREE
.
VertexColors
},
blendingMode
:
{
"
THREE.NoBlending
"
:
THREE
.
NoBlending
,
"
THREE.NormalBlending
"
:
THREE
.
NormalBlending
,
"
THREE.AdditiveBlending
"
:
THREE
.
AdditiveBlending
,
"
THREE.SubtractiveBlending
"
:
THREE
.
SubtractiveBlending
,
"
THREE.MultiplyBlending
"
:
THREE
.
MultiplyBlending
,
"
THREE.CustomBlending
"
:
THREE
.
CustomBlending
},
equations
:
{
"
THREE.AddEquation
"
:
THREE
.
AddEquation
,
"
THREE.SubtractEquation
"
:
THREE
.
SubtractEquation
,
"
THREE.ReverseSubtractEquation
"
:
THREE
.
ReverseSubtractEquation
},
destinationFactors
:
{
"
THREE.ZeroFactor
"
:
THREE
.
ZeroFactor
,
"
THREE.OneFactor
"
:
THREE
.
OneFactor
,
"
THREE.SrcColorFactor
"
:
THREE
.
SrcColorFactor
,
"
THREE.OneMinusSrcColorFactor
"
:
THREE
.
OneMinusSrcColorFactor
,
"
THREE.SrcAlphaFactor
"
:
THREE
.
SrcAlphaFactor
,
"
THREE.OneMinusSrcAlphaFactor
"
:
THREE
.
OneMinusSrcAlphaFactor
,
"
THREE.DstAlphaFactor
"
:
THREE
.
DstAlphaFactor
,
"
THREE.OneMinusDstAlphaFactor
"
:
THREE
.
OneMinusDstAlphaFactor
},
sourceFactors
:
{
"
THREE.DstColorFactor
"
:
THREE
.
DstColorFactor
,
"
THREE.OneMinusDstColorFactor
"
:
THREE
.
OneMinusDstColorFactor
,
"
THREE.SrcAlphaSaturateFactor
"
:
THREE
.
SrcAlphaSaturateFactor
}
};
function
updateGroupGeometry
(
mesh
,
geometry
)
{
mesh
.
children
[
0
].
geometry
.
dispose
();
...
...
@@ -113,7 +45,7 @@ var heartShape = new THREE.Shape();
heartShape
.
moveTo
(
x
+
5
,
y
+
5
);
heartShape
.
bezierCurveTo
(
x
+
5
,
y
+
5
,
x
+
4
,
y
,
x
,
y
);
heartShape
.
bezierCurveTo
(
x
-
6
,
y
,
x
-
6
,
y
+
7
,
x
-
6
,
y
+
7
);
heartShape
.
bezierCurveTo
(
x
-
6
,
y
,
x
-
6
,
y
+
7
,
x
-
6
,
y
+
7
);
heartShape
.
bezierCurveTo
(
x
-
6
,
y
+
11
,
x
-
3
,
y
+
15.4
,
x
+
5
,
y
+
19
);
heartShape
.
bezierCurveTo
(
x
+
12
,
y
+
15.4
,
x
+
16
,
y
+
11
,
x
+
16
,
y
+
7
);
heartShape
.
bezierCurveTo
(
x
+
16
,
y
+
7
,
x
+
16
,
y
,
x
+
10
,
y
);
...
...
@@ -121,15 +53,15 @@ heartShape.bezierCurveTo( x + 7, y, x + 5, y + 5, x + 5, y + 5 );
var
guis
=
{
BoxBufferGeometry
:
function
(
mesh
)
{
BoxBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
width
:
15
,
height
:
15
,
depth
:
15
,
widthSegments
:
1
,
heightSegments
:
1
,
depthSegments
:
1
width
:
15
,
height
:
15
,
depth
:
15
,
widthSegments
:
1
,
heightSegments
:
1
,
depthSegments
:
1
};
function
generateGeometry
()
{
...
...
@@ -155,15 +87,15 @@ var guis = {
},
BoxGeometry
:
function
(
mesh
)
{
BoxGeometry
:
function
(
mesh
)
{
var
data
=
{
width
:
15
,
height
:
15
,
depth
:
15
,
widthSegments
:
1
,
heightSegments
:
1
,
depthSegments
:
1
width
:
15
,
height
:
15
,
depth
:
15
,
widthSegments
:
1
,
heightSegments
:
1
,
depthSegments
:
1
};
function
generateGeometry
()
{
...
...
@@ -189,17 +121,17 @@ var guis = {
},
CylinderBufferGeometry
:
function
(
mesh
)
{
CylinderBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radiusTop
:
5
,
radiusBottom
:
5
,
height
:
10
,
radiusSegments
:
8
,
heightSegments
:
1
,
openEnded
:
false
,
thetaStart
:
0
,
thetaLength
:
twoPi
radiusTop
:
5
,
radiusBottom
:
5
,
height
:
10
,
radiusSegments
:
8
,
heightSegments
:
1
,
openEnded
:
false
,
thetaStart
:
0
,
thetaLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -235,17 +167,17 @@ var guis = {
},
CylinderGeometry
:
function
(
mesh
)
{
CylinderGeometry
:
function
(
mesh
)
{
var
data
=
{
radiusTop
:
5
,
radiusBottom
:
5
,
height
:
10
,
radiusSegments
:
8
,
heightSegments
:
1
,
openEnded
:
false
,
thetaStart
:
0
,
thetaLength
:
twoPi
radiusTop
:
5
,
radiusBottom
:
5
,
height
:
10
,
radiusSegments
:
8
,
heightSegments
:
1
,
openEnded
:
false
,
thetaStart
:
0
,
thetaLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -281,16 +213,16 @@ var guis = {
},
ConeBufferGeometry
:
function
(
mesh
)
{
ConeBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
5
,
height
:
10
,
radiusSegments
:
8
,
heightSegments
:
1
,
openEnded
:
false
,
thetaStart
:
0
,
thetaLength
:
twoPi
radius
:
5
,
height
:
10
,
radiusSegments
:
8
,
heightSegments
:
1
,
openEnded
:
false
,
thetaStart
:
0
,
thetaLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -324,16 +256,16 @@ var guis = {
},
ConeGeometry
:
function
(
mesh
)
{
ConeGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
5
,
height
:
10
,
radiusSegments
:
8
,
heightSegments
:
1
,
openEnded
:
false
,
thetaStart
:
0
,
thetaLength
:
twoPi
radius
:
5
,
height
:
10
,
radiusSegments
:
8
,
heightSegments
:
1
,
openEnded
:
false
,
thetaStart
:
0
,
thetaLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -368,13 +300,13 @@ var guis = {
},
CircleBufferGeometry
:
function
(
mesh
)
{
CircleBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
segments
:
32
,
thetaStart
:
0
,
thetaLength
:
twoPi
radius
:
10
,
segments
:
32
,
thetaStart
:
0
,
thetaLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -398,13 +330,13 @@ var guis = {
},
CircleGeometry
:
function
(
mesh
)
{
CircleGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
segments
:
32
,
thetaStart
:
0
,
thetaLength
:
twoPi
radius
:
10
,
segments
:
32
,
thetaStart
:
0
,
thetaLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -428,11 +360,11 @@ var guis = {
},
DodecahedronGeometry
:
function
(
)
{
DodecahedronGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
detail
:
0
radius
:
10
,
detail
:
0
};
function
generateGeometry
()
{
...
...
@@ -454,11 +386,11 @@ var guis = {
},
DodecahedronBufferGeometry
:
function
(
)
{
DodecahedronBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
detail
:
0
radius
:
10
,
detail
:
0
};
function
generateGeometry
()
{
...
...
@@ -480,11 +412,11 @@ var guis = {
},
IcosahedronGeometry
:
function
(
)
{
IcosahedronGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
detail
:
0
radius
:
10
,
detail
:
0
};
function
generateGeometry
()
{
...
...
@@ -506,11 +438,11 @@ var guis = {
},
IcosahedronBufferGeometry
:
function
(
)
{
IcosahedronBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
detail
:
0
radius
:
10
,
detail
:
0
};
function
generateGeometry
()
{
...
...
@@ -532,7 +464,7 @@ var guis = {
},
LatheBufferGeometry
:
function
(
)
{
LatheBufferGeometry
:
function
(
mesh
)
{
var
points
=
[];
...
...
@@ -543,9 +475,9 @@ var guis = {
}
var
data
=
{
segments
:
12
,
phiStart
:
0
,
phiLength
:
twoPi
segments
:
12
,
phiStart
:
0
,
phiLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -568,7 +500,7 @@ var guis = {
},
LatheGeometry
:
function
(
)
{
LatheGeometry
:
function
(
mesh
)
{
var
points
=
[];
...
...
@@ -579,9 +511,9 @@ var guis = {
}
var
data
=
{
segments
:
12
,
phiStart
:
0
,
phiLength
:
twoPi
segments
:
12
,
phiStart
:
0
,
phiLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -604,11 +536,11 @@ var guis = {
},
OctahedronGeometry
:
function
(
)
{
OctahedronGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
detail
:
0
radius
:
10
,
detail
:
0
};
function
generateGeometry
()
{
...
...
@@ -630,11 +562,11 @@ var guis = {
},
OctahedronBufferGeometry
:
function
(
)
{
OctahedronBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
detail
:
0
radius
:
10
,
detail
:
0
};
function
generateGeometry
()
{
...
...
@@ -656,13 +588,13 @@ var guis = {
},
PlaneBufferGeometry
:
function
(
mesh
)
{
PlaneBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
width
:
10
,
height
:
10
,
widthSegments
:
1
,
heightSegments
:
1
width
:
10
,
height
:
10
,
widthSegments
:
1
,
heightSegments
:
1
};
function
generateGeometry
()
{
...
...
@@ -686,13 +618,13 @@ var guis = {
},
PlaneGeometry
:
function
(
mesh
)
{
PlaneGeometry
:
function
(
mesh
)
{
var
data
=
{
width
:
10
,
height
:
10
,
widthSegments
:
1
,
heightSegments
:
1
width
:
10
,
height
:
10
,
widthSegments
:
1
,
heightSegments
:
1
};
function
generateGeometry
()
{
...
...
@@ -716,15 +648,15 @@ var guis = {
},
RingBufferGeometry
:
function
(
mesh
)
{
RingBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
innerRadius
:
5
,
outerRadius
:
10
,
thetaSegments
:
8
,
phiSegments
:
8
,
thetaStart
:
0
,
thetaLength
:
twoPi
innerRadius
:
5
,
outerRadius
:
10
,
thetaSegments
:
8
,
phiSegments
:
8
,
thetaStart
:
0
,
thetaLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -750,15 +682,15 @@ var guis = {
},
RingGeometry
:
function
(
mesh
)
{
RingGeometry
:
function
(
mesh
)
{
var
data
=
{
innerRadius
:
5
,
outerRadius
:
10
,
thetaSegments
:
8
,
phiSegments
:
8
,
thetaStart
:
0
,
thetaLength
:
twoPi
innerRadius
:
5
,
outerRadius
:
10
,
thetaSegments
:
8
,
phiSegments
:
8
,
thetaStart
:
0
,
thetaLength
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -784,16 +716,16 @@ var guis = {
},
SphereBufferGeometry
:
function
(
mesh
)
{
SphereBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
15
,
widthSegments
:
8
,
heightSegments
:
6
,
phiStart
:
0
,
phiLength
:
twoPi
,
thetaStart
:
0
,
thetaLength
:
Math
.
PI
radius
:
15
,
widthSegments
:
8
,
heightSegments
:
6
,
phiStart
:
0
,
phiLength
:
twoPi
,
thetaStart
:
0
,
thetaLength
:
Math
.
PI
};
function
generateGeometry
()
{
...
...
@@ -820,16 +752,16 @@ var guis = {
},
SphereGeometry
:
function
(
mesh
)
{
SphereGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
15
,
widthSegments
:
8
,
heightSegments
:
6
,
phiStart
:
0
,
phiLength
:
twoPi
,
thetaStart
:
0
,
thetaLength
:
Math
.
PI
radius
:
15
,
widthSegments
:
8
,
heightSegments
:
6
,
phiStart
:
0
,
phiLength
:
twoPi
,
thetaStart
:
0
,
thetaLength
:
Math
.
PI
};
function
generateGeometry
()
{
...
...
@@ -856,11 +788,11 @@ var guis = {
},
TetrahedronGeometry
:
function
(
)
{
TetrahedronGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
detail
:
0
radius
:
10
,
detail
:
0
};
function
generateGeometry
()
{
...
...
@@ -882,11 +814,11 @@ var guis = {
},
TetrahedronBufferGeometry
:
function
(
)
{
TetrahedronBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
detail
:
0
radius
:
10
,
detail
:
0
};
function
generateGeometry
()
{
...
...
@@ -908,19 +840,19 @@ var guis = {
},
TextGeometry
:
function
(
mesh
)
{
TextGeometry
:
function
(
mesh
)
{
var
data
=
{
text
:
"
TextGeometry
"
,
size
:
5
,
height
:
2
,
curveSegments
:
12
,
font
:
"
helvetiker
"
,
weight
:
"
regular
"
,
bevelEnabled
:
false
,
bevelThickness
:
1
,
bevelSize
:
0.5
,
bevelSegments
:
3
text
:
"
TextGeometry
"
,
size
:
5
,
height
:
2
,
curveSegments
:
12
,
font
:
"
helvetiker
"
,
weight
:
"
regular
"
,
bevelEnabled
:
false
,
bevelThickness
:
1
,
bevelSize
:
0.5
,
bevelSegments
:
3
};
var
fonts
=
[
...
...
@@ -977,19 +909,19 @@ var guis = {
},
TextBufferGeometry
:
function
(
mesh
)
{
TextBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
text
:
"
TextBufferGeometry
"
,
size
:
5
,
height
:
2
,
curveSegments
:
12
,
font
:
"
helvetiker
"
,
weight
:
"
regular
"
,
bevelEnabled
:
false
,
bevelThickness
:
1
,
bevelSize
:
0.5
,
bevelSegments
:
3
text
:
"
TextBufferGeometry
"
,
size
:
5
,
height
:
2
,
curveSegments
:
12
,
font
:
"
helvetiker
"
,
weight
:
"
regular
"
,
bevelEnabled
:
false
,
bevelThickness
:
1
,
bevelSize
:
0.5
,
bevelSegments
:
3
};
var
fonts
=
[
...
...
@@ -1046,14 +978,14 @@ var guis = {
},
TorusBufferGeometry
:
function
(
mesh
)
{
TorusBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
tube
:
3
,
radialSegments
:
16
,
tubularSegments
:
100
,
arc
:
twoPi
radius
:
10
,
tube
:
3
,
radialSegments
:
16
,
tubularSegments
:
100
,
arc
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -1078,14 +1010,14 @@ var guis = {
},
TorusGeometry
:
function
(
mesh
)
{
TorusGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
tube
:
3
,
radialSegments
:
16
,
tubularSegments
:
100
,
arc
:
twoPi
radius
:
10
,
tube
:
3
,
radialSegments
:
16
,
tubularSegments
:
100
,
arc
:
twoPi
};
function
generateGeometry
()
{
...
...
@@ -1110,15 +1042,15 @@ var guis = {
},
TorusKnotBufferGeometry
:
function
(
mesh
)
{
TorusKnotBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
tube
:
3
,
tubularSegments
:
64
,
radialSegments
:
8
,
p
:
2
,
q
:
3
radius
:
10
,
tube
:
3
,
tubularSegments
:
64
,
radialSegments
:
8
,
p
:
2
,
q
:
3
};
function
generateGeometry
()
{
...
...
@@ -1145,15 +1077,15 @@ var guis = {
},
TorusKnotGeometry
:
function
(
mesh
)
{
TorusKnotGeometry
:
function
(
mesh
)
{
var
data
=
{
radius
:
10
,
tube
:
3
,
tubularSegments
:
64
,
radialSegments
:
8
,
p
:
2
,
q
:
3
radius
:
10
,
tube
:
3
,
tubularSegments
:
64
,
radialSegments
:
8
,
p
:
2
,
q
:
3
};
function
generateGeometry
()
{
...
...
@@ -1180,11 +1112,11 @@ var guis = {
},
ParametricBufferGeometry
:
function
(
mesh
)
{
ParametricBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
slices
:
25
,
stacks
:
25
slices
:
25
,
stacks
:
25
};
function
generateGeometry
()
{
...
...
@@ -1204,11 +1136,11 @@ var guis = {
},
ParametricGeometry
:
function
(
mesh
)
{
ParametricGeometry
:
function
(
mesh
)
{
var
data
=
{
slices
:
25
,
stacks
:
25
slices
:
25
,
stacks
:
25
};
function
generateGeometry
()
{
...
...
@@ -1228,11 +1160,11 @@ var guis = {
},
TubeGeometry
:
function
(
mesh
)
{
TubeGeometry
:
function
(
mesh
)
{
var
data
=
{
segments
:
20
,
radius
:
2
,
segments
:
20
,
radius
:
2
,
radiusSegments
:
8
};
...
...
@@ -1256,11 +1188,11 @@ var guis = {
},
TubeBufferGeometry
:
function
(
mesh
)
{
TubeBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
segments
:
20
,
radius
:
2
,
segments
:
20
,
radius
:
2
,
radiusSegments
:
8
};
...
...
@@ -1284,17 +1216,18 @@ var guis = {
},
ShapeGeometry
:
function
(
mesh
)
{
ShapeGeometry
:
function
(
mesh
)
{
var
data
=
{
segments
:
12
segments
:
12
};
function
generateGeometry
()
{
updateGroupGeometry
(
mesh
,
new
THREE
.
ShapeGeometry
(
heartShape
,
data
.
segments
)
);
var
geometry
=
new
THREE
.
ShapeGeometry
(
heartShape
,
data
.
segments
);
geometry
.
center
();
updateGroupGeometry
(
mesh
,
geometry
);
}
...
...
@@ -1305,17 +1238,18 @@ var guis = {
},
ShapeBufferGeometry
:
function
(
mesh
)
{
ShapeBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
segments
:
12
segments
:
12
};
function
generateGeometry
()
{
updateGroupGeometry
(
mesh
,
new
THREE
.
ShapeBufferGeometry
(
heartShape
,
data
.
segments
)
);
var
geometry
=
new
THREE
.
ShapeBufferGeometry
(
heartShape
,
data
.
segments
);
geometry
.
center
();
updateGroupGeometry
(
mesh
,
geometry
);
}
...
...
@@ -1326,7 +1260,7 @@ var guis = {
},
ExtrudeGeometry
:
function
(
mesh
)
{
ExtrudeGeometry
:
function
(
mesh
)
{
var
data
=
{
steps
:
2
,
...
...
@@ -1340,7 +1274,7 @@ var guis = {
var
length
=
12
,
width
=
8
;
var
shape
=
new
THREE
.
Shape
();
shape
.
moveTo
(
0
,
0
);
shape
.
moveTo
(
0
,
0
);
shape
.
lineTo
(
0
,
width
);
shape
.
lineTo
(
length
,
width
);
shape
.
lineTo
(
length
,
0
);
...
...
@@ -1348,9 +1282,10 @@ var guis = {
function
generateGeometry
()
{
updateGroupGeometry
(
mesh
,
new
THREE
.
ExtrudeGeometry
(
shape
,
data
)
);
var
geometry
=
new
THREE
.
ExtrudeGeometry
(
shape
,
data
);
geometry
.
center
();
updateGroupGeometry
(
mesh
,
geometry
);
}
...
...
@@ -1366,7 +1301,7 @@ var guis = {
},
ExtrudeBufferGeometry
:
function
(
mesh
)
{
ExtrudeBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
steps
:
2
,
...
...
@@ -1380,7 +1315,7 @@ var guis = {
var
length
=
12
,
width
=
8
;
var
shape
=
new
THREE
.
Shape
();
shape
.
moveTo
(
0
,
0
);
shape
.
moveTo
(
0
,
0
);
shape
.
lineTo
(
0
,
width
);
shape
.
lineTo
(
length
,
width
);
shape
.
lineTo
(
length
,
0
);
...
...
@@ -1388,9 +1323,10 @@ var guis = {
function
generateGeometry
()
{
updateGroupGeometry
(
mesh
,
new
THREE
.
ExtrudeBufferGeometry
(
shape
,
data
)
);
var
geometry
=
new
THREE
.
ExtrudeBufferGeometry
(
shape
,
data
);
geometry
.
center
();
updateGroupGeometry
(
mesh
,
geometry
);
}
...
...
@@ -1408,7 +1344,7 @@ var guis = {
};
function
chooseFromHash
(
mesh
)
{
function
chooseFromHash
(
mesh
)
{
var
selectedGeometry
=
window
.
location
.
hash
.
substring
(
1
)
||
"
TorusGeometry
"
;
...
...
@@ -1420,7 +1356,7 @@ function chooseFromHash ( mesh ) {
if
(
selectedGeometry
===
'
TextGeometry
'
||
selectedGeometry
===
'
TextBufferGeometry
'
)
{
return
{
fixed
:
true
};
return
{
fixed
:
true
};
}
...
...
docs/scenes/js/material.js
浏览文件 @
f658b6f2
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录