Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
9d88fefa
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,发现更多精彩内容 >>
提交
9d88fefa
编写于
9月 24, 2016
作者:
M
Michael Herzog
提交者:
Mr.doob
9月 24, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Documentation: Enhanced ParametricGeometry docs (#9768)
上级
1d682dc9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
137 addition
and
0 deletion
+137
-0
docs/api/geometries/ParametricBufferGeometry.html
docs/api/geometries/ParametricBufferGeometry.html
+60
-0
docs/api/geometries/ParametricGeometry.html
docs/api/geometries/ParametricGeometry.html
+27
-0
docs/list.js
docs/list.js
+1
-0
docs/scenes/geometry-browser.html
docs/scenes/geometry-browser.html
+1
-0
docs/scenes/js/geometry.js
docs/scenes/js/geometry.js
+48
-0
未找到文件。
docs/api/geometries/ParametricBufferGeometry.html
0 → 100644
浏览文件 @
9d88fefa
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
/>
<base
href=
"../../"
/>
<script
src=
"list.js"
></script>
<script
src=
"page.js"
></script>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"page.css"
/>
</head>
<body>
[page:BufferGeometry]
→
<h1>
[name]
</h1>
<div
class=
"desc"
>
Generate geometry representing a parametric surface.
</div>
<iframe
id=
"scene"
src=
"scenes/geometry-browser.html#ParametricBufferGeometry"
></iframe>
<script>
// iOS iframe auto-resize workaround
if
(
/
(
iPad|iPhone|iPod
)
/g
.
test
(
navigator
.
userAgent
)
)
{
var
scene
=
document
.
getElementById
(
'
scene
'
);
scene
.
style
.
width
=
getComputedStyle
(
scene
).
width
;
scene
.
style
.
height
=
getComputedStyle
(
scene
).
height
;
scene
.
setAttribute
(
'
scrolling
'
,
'
no
'
);
}
</script>
<h2>
Example
</h2>
<code>
var geometry = new THREE.ParametricBufferGeometry( THREE.ParametricGeometries.klein, 25, 25 );
var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
var cube = new THREE.Mesh( geometry, material );
scene.add( cube );
</code>
<h2>
Constructor
</h2>
<h3>
[name]([page:Function func], [page:Integer slices], [page:Integer stacks])
</h3>
<div>
func — A function that takes in a [page:Float u] and [page:Float v] value each between 0 and 1 and returns a [page:Vector3]
<br
/>
slices — The count of slices to use for the parametric function
<br
/>
stacks — The count of stacks to use for the parametric function
</div>
<h2>
Source
</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
docs/api/geometries/ParametricGeometry.html
浏览文件 @
9d88fefa
...
...
@@ -14,6 +14,33 @@
<div
class=
"desc"
>
Generate geometry representing a parametric surface.
</div>
<iframe
id=
"scene"
src=
"scenes/geometry-browser.html#ParametricGeometry"
></iframe>
<script>
// iOS iframe auto-resize workaround
if
(
/
(
iPad|iPhone|iPod
)
/g
.
test
(
navigator
.
userAgent
)
)
{
var
scene
=
document
.
getElementById
(
'
scene
'
);
scene
.
style
.
width
=
getComputedStyle
(
scene
).
width
;
scene
.
style
.
height
=
getComputedStyle
(
scene
).
height
;
scene
.
setAttribute
(
'
scrolling
'
,
'
no
'
);
}
</script>
<h2>
Example
</h2>
<code>
var geometry = new THREE.ParametricGeometry( THREE.ParametricGeometries.klein, 25, 25 );
var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
var cube = new THREE.Mesh( geometry, material );
scene.add( cube );
</code>
<h2>
Constructor
</h2>
...
...
docs/list.js
浏览文件 @
9d88fefa
...
...
@@ -53,6 +53,7 @@ var list = {
[
"
LatheGeometry
"
,
"
api/geometries/LatheGeometry
"
],
[
"
OctahedronBufferGeometry
"
,
"
api/geometries/OctahedronBufferGeometry
"
],
[
"
OctahedronGeometry
"
,
"
api/geometries/OctahedronGeometry
"
],
[
"
ParametricBufferGeometry
"
,
"
api/geometries/ParametricBufferGeometry
"
],
[
"
ParametricGeometry
"
,
"
api/geometries/ParametricGeometry
"
],
[
"
PlaneBufferGeometry
"
,
"
api/geometries/PlaneBufferGeometry
"
],
[
"
PlaneGeometry
"
,
"
api/geometries/PlaneGeometry
"
],
...
...
docs/scenes/geometry-browser.html
浏览文件 @
9d88fefa
...
...
@@ -37,6 +37,7 @@
<script
src=
"../../build/three.min.js"
></script>
<script
src=
'../../examples/js/libs/dat.gui.min.js'
></script>
<script
src=
"../../examples/js/controls/OrbitControls.js"
></script>
<script
src=
"../../examples/js/ParametricGeometries.js"
></script>
<script
src=
'js/geometry.js'
></script>
...
...
docs/scenes/js/geometry.js
浏览文件 @
9d88fefa
...
...
@@ -1078,6 +1078,54 @@ var guis = {
generateGeometry
();
},
ParametricBufferGeometry
:
function
(
mesh
)
{
var
data
=
{
slices
:
25
,
stacks
:
25
};
function
generateGeometry
()
{
updateGroupGeometry
(
mesh
,
new
THREE
.
ParametricBufferGeometry
(
THREE
.
ParametricGeometries
.
klein
,
data
.
slices
,
data
.
stacks
)
);
}
var
folder
=
gui
.
addFolder
(
'
THREE.ParametricBufferGeometry
'
);
folder
.
add
(
data
,
'
slices
'
,
1
,
100
).
step
(
1
).
onChange
(
generateGeometry
);
folder
.
add
(
data
,
'
stacks
'
,
1
,
100
).
step
(
1
).
onChange
(
generateGeometry
);
generateGeometry
();
},
ParametricGeometry
:
function
(
mesh
)
{
var
data
=
{
slices
:
25
,
stacks
:
25
};
function
generateGeometry
()
{
updateGroupGeometry
(
mesh
,
new
THREE
.
ParametricGeometry
(
THREE
.
ParametricGeometries
.
klein
,
data
.
slices
,
data
.
stacks
)
);
}
var
folder
=
gui
.
addFolder
(
'
THREE.ParametricGeometry
'
);
folder
.
add
(
data
,
'
slices
'
,
1
,
100
).
step
(
1
).
onChange
(
generateGeometry
);
folder
.
add
(
data
,
'
stacks
'
,
1
,
100
).
step
(
1
).
onChange
(
generateGeometry
);
generateGeometry
();
}
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录