You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
52 lines
1.3 KiB
2 years 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:Object3D] → [page:Line] →
|
||
|
|
||
|
<h1>[name]</h1>
|
||
|
|
||
|
<p class="desc">坐标格辅助对象. 坐标格实际上是2维线数组.</p>
|
||
|
|
||
|
<h2>代码示例</h2>
|
||
|
|
||
|
<code>
|
||
|
const size = 10;
|
||
|
const divisions = 10;
|
||
|
|
||
|
const gridHelper = new THREE.GridHelper( size, divisions );
|
||
|
scene.add( gridHelper );
|
||
|
</code>
|
||
|
|
||
|
<h2>例子</h2>
|
||
|
|
||
|
<p>
|
||
|
[example:webgl_helpers WebGL / helpers]
|
||
|
</p>
|
||
|
|
||
|
<h2>构造函数</h2>
|
||
|
|
||
|
<h3>[name]( [param:number size], [param:Number divisions], [param:Color colorCenterLine], [param:Color colorGrid] )</h3>
|
||
|
<p>
|
||
|
size -- 坐标格尺寸. 默认为 10. <br />
|
||
|
divisions -- 坐标格细分次数. 默认为 10. <br />
|
||
|
colorCenterLine -- 中线颜色. 值可以为 [page:Color] 类型, 16进制 和 CSS 颜色名. 默认为 0x444444 <br />
|
||
|
colorGrid -- 坐标格网格线颜色. 值可以为 [page:Color] 类型, 16进制 和 CSS 颜色名. 默认为 0x888888
|
||
|
</p>
|
||
|
<p>
|
||
|
创建一个尺寸为 'size' 和 每个维度细分 'divisions' 次的坐标格. 颜色可选.
|
||
|
</p>
|
||
|
|
||
|
<h2>源码</h2>
|
||
|
|
||
|
<p>
|
||
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||
|
</p>
|
||
|
</body>
|
||
|
</html>
|