You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.0 KiB
HTML
70 lines
2.0 KiB
HTML
2 months ago
|
<!DOCTYPE html>
|
||
|
<html lang="zh">
|
||
|
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<base href="../../../" />
|
||
|
<script src="page.js"></script>
|
||
|
<link type="text/css" rel="stylesheet" href="page.css" />
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
[page:BufferGeometry] →
|
||
|
|
||
|
<h1>[name]</h1>
|
||
|
|
||
|
<p class="desc">
|
||
|
[name] 通过 Martin Newell 的著名 Utah 茶壶数据库进行镶嵌。
|
||
|
</p>
|
||
|
|
||
|
<h2>导入</h2>
|
||
|
|
||
|
<p>
|
||
|
[name] 是一个附加组件,必须显式导入。
|
||
|
参见 [link:#manual/introduction/Installation Installation / Addons].
|
||
|
</p>
|
||
|
|
||
|
<code>
|
||
|
import { TeapotGeometry } from 'three/addons/geometries/TeapotGeometry.js';
|
||
|
</code>
|
||
|
|
||
|
<h2>代码示例</h2>
|
||
|
|
||
|
<code>
|
||
|
const geometry = new TeapotGeometry( 50, 18 );
|
||
|
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
|
||
|
const teapot = new THREE.Mesh( geometry, material );
|
||
|
scene.add( teapot );
|
||
|
</code>
|
||
|
|
||
|
<h2>构造函数</h2>
|
||
|
|
||
|
<h3>
|
||
|
[name]([param:Integer size], [param:Integer segments], [param:Boolean bottom], [param:Boolean lid],
|
||
|
[param:Boolean body],
|
||
|
[param:Boolean fitLid], [param:Boolean blinn])属性
|
||
|
</h3>
|
||
|
<p>
|
||
|
size — 茶壶的相对尺寸。可选;默认为 `50`。<br>
|
||
|
segments — 每个面片边缘细分的线段数。可选;默认为 `10`。<br>
|
||
|
bottom — 是否生成茶壶底部。可选;默认为 `true`。<br>
|
||
|
lid — 是否生成盖子。可选;默认为 `true`。<br>
|
||
|
body — 是否生成壶身。可选;默认为 `true`。<br>
|
||
|
fitLid — 是否稍微拉伸盖子以防止壶身和盖子之间的间隙。可选;默认为 `true`。<br>
|
||
|
blinn — 是否垂直缩放茶壶以获得更好的外观。可选;默认为 `true`。
|
||
|
</p>
|
||
|
|
||
|
<h2>属性</h2>
|
||
|
<p>请参阅基础 [page:BufferGeometry] 类以获取通用属性。</p>
|
||
|
|
||
|
<h2>方法</h2>
|
||
|
<p>请参阅基础 [page:BufferGeometry] 类以获取通用方法。</p>
|
||
|
|
||
|
<h2>源代码</h2>
|
||
|
|
||
|
<p>
|
||
|
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/TeapotGeometry.js examples/jsm/geometries/TeapotGeometry.js]
|
||
|
</p>
|
||
|
</body>
|
||
|
|
||
|
</html>
|