PolarGridHelper - Verge3D User Manual - Soft8Soft
Description: Learn how to use PolarGridHelper in your interactive 3D apps made with Verge3D

Object3D → LineSegments →

# PolarGridHelper

The PolarGridHelper is an object to define polar grids. Grids are two-dimensional arrays of lines.

## Code Example

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

## Constructor

### PolarGridHelper(radius : Float, sectors : Float, rings : Float, divisions : Float, color1 : Color | Integer | String, color2 : Color | Integer | String)

- radius — the radius of the polar grid. This can be any positive number. Default is `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 — the number of line segments used for each circle. This can be any positive integer that is 3 or greater. Default is `64`.
- color1 — the first color used for grid elements. This can be a Color, a hexadecimal value, or CSS-Color name. Default is `0x444444`.
- color2 — the second color used for grid elements. This can be a Color, a hexadecimal value, or CSS-Color name. Default is `0x888888`.

Creates a new PolarGridHelper 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.

## Methods

See the base LineSegments class for inherited methods.

### # .dispose()

Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.

## Source

For more info on how to obtain the source code of this module see this page.