# Class PolygonBase

- Defined in drawables/shapes/polygon-factory.ts:11

##### Index

### Constructors

constructor

### Properties

vertices
descriptor

### Methods

getObjectToSerialize
minDistance

## Constructors

### constructor

- new PolygonBase(vertices: vec2[]): PolygonBase

  #### Parameters

  - vertices: vec2[]

  #### Returns PolygonBase

  Overrides EmptyDrawable.constructor

  - Defined in drawables/shapes/polygon-factory.ts:12

## Properties

### vertices

vertices: vec2[]

- Defined in drawables/shapes/polygon-factory.ts:12

### `Static` `Readonly` descriptor

descriptor: DrawableDescriptor

This should be defined in inherited classes.

Inherited from EmptyDrawable.descriptor

- Defined in drawables/empty-drawable.ts:11

## Methods

### `Protected` getObjectToSerialize

- getObjectToSerialize(transform2d: mat2d, transform1d: number): any

  Return the values that should be given to the shaders through uniform inputs.

  #### Parameters

  - transform2d: mat2d

    position-like properties should be transformed by this matrix before being returned.

  - transform1d: number

    scalar properties should be transformed by this number before being returned.

  #### Returns any

  Inherited from EmptyDrawable.getObjectToSerialize

  - Defined in drawables/empty-drawable.ts:19

### minDistance

- minDistance(target: vec2): number

  The lower bound of the distance between the target and the object.

  It can return 0 by default; the only consequence is reduced performance, because this object won't benefit from tile-based rendering.

  #### Parameters

  - target: vec2

  #### Returns number

  Inherited from EmptyDrawable.minDistance

  - Defined in drawables/empty-drawable.ts:14