# ColorfulCircle | SDF-2D - v0.7.0
Documentation for SDF-2D - v0.7.0

### Hierarchy

- Drawable
  - ColorfulCircle

## Index

### Constructors

- constructor

### Properties

- center
- colorIndex
- radius

### Methods

- getObjectToSerialize
- minDistance

### Object literals

- descriptor

## Constructors

### constructor

- new ColorfulCircle(center: vec2, radius: number, colorIndex: number): ColorfulCircle

- - Defined in drawables/shapes/colorful-circle.ts:36

  #### Parameters

  - ##### center: vec2

  - ##### radius: number

  - ##### colorIndex: number

  #### Returns ColorfulCircle

## Properties

### center

center: vec2

- Defined in drawables/shapes/colorful-circle.ts:38

### colorIndex

colorIndex: number

- Defined in drawables/shapes/colorful-circle.ts:38

### radius

radius: number

- Defined in drawables/shapes/colorful-circle.ts:38

## Methods

### Protected getObjectToSerialize

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

- Overrides Drawable.getObjectToSerialize

  - Defined in drawables/shapes/colorful-circle.ts:46

  #### Parameters

  - ##### transform2d: mat2d

  - ##### transform1d: number

  #### Returns any

### minDistance

- minDistance(target: vec2): number

- Overrides Drawable.minDistance

  - Defined in drawables/shapes/colorful-circle.ts:42

  #### Parameters

  - ##### target: vec2

  #### Returns number

## Object literals

### Static descriptor

descriptor: object

Overrides Drawable.descriptor

- Defined in drawables/shapes/colorful-circle.ts:6

### empty

empty: ColorfulCircle = new ColorfulCircle(vec2.create(), 0, 0)

- Defined in drawables/shapes/colorful-circle.ts:35

### shaderCombinationSteps

shaderCombinationSteps: number[] = [0, 1, 2, 3, 8, 16]

- Defined in drawables/shapes/colorful-circle.ts:34

### uniformCountMacroName

uniformCountMacroName: string = "COLORFUL_CIRCLE_COUNT"

- Defined in drawables/shapes/colorful-circle.ts:33

### propertyUniformMapping

propertyUniformMapping: object

- Defined in drawables/shapes/colorful-circle.ts:28

### center

center: string = "colorfulCircleCenters"

- Defined in drawables/shapes/colorful-circle.ts:29

### colorIndex

colorIndex: string = "colorfulCircleColorIndex"

- Defined in drawables/shapes/colorful-circle.ts:31

### radius

radius: string = "colorfulCircleRadii"

- Defined in drawables/shapes/colorful-circle.ts:30

### sdf

sdf: object

- Defined in drawables/shapes/colorful-circle.ts:7

### distanceFunctionName

distanceFunctionName: string = "circleMinDistance"

- Defined in drawables/shapes/colorful-circle.ts:26

### shader

shader: string = `uniform vec2 colorfulCircleCenters[COLORFUL_CIRCLE_COUNT];uniform float colorfulCircleRadii[COLORFUL_CIRCLE_COUNT];uniform int colorfulCircleColorIndex[COLORFUL_CIRCLE_COUNT];float circleMinDistance(vec2 target, out vec4 color) {float minDistance = 1000.0;for (int i = 0; i < COLORFUL_CIRCLE_COUNT; i++) {float dist = distance(colorfulCircleCenters[i], target) - colorfulCircleRadii[i];if (dist < minDistance) {color = readFromPalette(colorfulCircleColorIndex[i]);dist = minDistance;}}return minDistance;}`

- Defined in drawables/shapes/colorful-circle.ts:8