[page:Object3D] → [page:Line] →

[name]

极坐标格辅助对象. 坐标格实际上是2维线数组.

代码示例

const radius = 10; const sectors = 16; const rings = 8; const divisions = 64; const helper = new THREE.PolarGridHelper( radius, sectors, rings, divisions ); scene.add( helper );

例子

[example:webgl_helpers WebGL / helpers]

构造函数

[name]( [param:Number radius], [param:Number sectors], [param:Number rings], [param:Number divisions], [param:Color color1], [param:Color color2] )

radius -- 极坐标格半径. 可以为任何正数. 默认为 10.
sectors -- The number of sectors the grid will be divided into. This can be any positive integer. Default is 16.
rings -- The number of rings. This can be any positive integer. Default is 8.
divisions -- 圆圈细分段数. 可以为任何大于或等于3的正整数. 默认为 64.
color1 -- 极坐标格使用的第一个颜色. 值可以为 [page:Color] 类型, 16进制 和 CSS 颜色名. 默认为 0x444444
color2 -- 极坐标格使用的第二个颜色. 值可以为 [page:Color] 类型, 16进制 和 CSS 颜色名. 默认为 0x888888

Creates a new [name] of radius 'radius' with 'sectors' number of sectors and 'rings' number of rings, where each circle is smoothed into 'divisions' number of line segments. Colors are optional.

源码

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]