### Hierarchy

- Drawable
  - Droplet

## Index

### Constructors

- constructor

### Properties

- from
- fromRadius
- to
- toRadius

### Methods

- getObjectToSerialize
- minDistance

### Object literals

- descriptor

## Constructors

### constructor

- new Droplet(from: vec2, to: vec2, fromRadius: number, toRadius: number): Droplet

- - Defined in drawables/shapes/droplet.ts:55

  #### Parameters

  - ##### from: vec2

  - ##### to: vec2

  - ##### fromRadius: number

  - ##### toRadius: number

  #### Returns Droplet

## Properties

### Readonly from

from: vec2

- Defined in drawables/shapes/droplet.ts:58

### Readonly fromRadius

fromRadius: number

- Defined in drawables/shapes/droplet.ts:60

### Readonly to

to: vec2

- Defined in drawables/shapes/droplet.ts:59

### Readonly toRadius

toRadius: number

- Defined in drawables/shapes/droplet.ts:61

## Methods

### Protected getObjectToSerialize

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

- Overrides Drawable.getObjectToSerialize

  - Defined in drawables/shapes/droplet.ts:80

  #### Parameters

  - ##### transform2d: mat2d

  - ##### transform1d: number

  #### Returns any

### minDistance

- minDistance(target: vec2): number

- Overrides Drawable.minDistance

  - Defined in drawables/shapes/droplet.ts:66

  #### Parameters

  - ##### target: vec2

  #### Returns number

## Object literals

### Static descriptor

descriptor: object

Overrides Drawable.descriptor

- Defined in drawables/shapes/droplet.ts:11

### empty

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

- Defined in drawables/shapes/droplet.ts:54

### shaderCombinationSteps

shaderCombinationSteps: number[] = [0, 1, 4, 16, 32]

- Defined in drawables/shapes/droplet.ts:53

### uniformCountMacroName

uniformCountMacroName: string = "DROPLET_COUNT"

- Defined in drawables/shapes/droplet.ts:52

### propertyUniformMapping

propertyUniformMapping: object

- Defined in drawables/shapes/droplet.ts:46

### from

from: string = "froms"

- Defined in drawables/shapes/droplet.ts:47

### fromRadius

fromRadius: string = "fromRadii"

- Defined in drawables/shapes/droplet.ts:49

### toFromDelta

toFromDelta: string = "toFromDeltas"

- Defined in drawables/shapes/droplet.ts:48

### toRadius

toRadius: string = "toRadii"

- Defined in drawables/shapes/droplet.ts:50

### sdf

sdf: object

- Defined in drawables/shapes/droplet.ts:12

### distanceFunctionName

distanceFunctionName: string = "dropletMinDistance"

- Defined in drawables/shapes/droplet.ts:44

### shader

shader: string = `uniform vec2 froms[DROPLET_COUNT];uniform vec2 toFromDeltas[DROPLET_COUNT];uniform float fromRadii[DROPLET_COUNT];uniform float toRadii[DROPLET_COUNT];float dropletMinDistance(vec2 target, out float colorIndex) {colorIndex = 1.0;float minDistance = 1000.0;for (int i = 0; i < DROPLET_COUNT; i++) {vec2 targetFromDelta = target - froms[i];float h = clamp(dot(targetFromDelta, toFromDeltas[i])/ dot(toFromDeltas[i], toFromDeltas[i]),0.0, 1.0);float currentDistance = -mix(fromRadii[i], toRadii[i], h) + distance(targetFromDelta, toFromDeltas[i] * h);minDistance = min(minDistance, currentDistance);}return minDistance;}`

- Defined in drawables/shapes/droplet.ts:13