# Flashlight | SDF-2D - v0.5.3
Documentation for SDF-2D - v0.5.3

### Hierarchy

- LightDrawable
  - Flashlight

## Index

### Constructors

- constructor

### Properties

- center
- color
- direction
- intensity
- lightnessRatio
- startCutoff

### Methods

- getObjectToSerialize
- minDistance
- setLightnessRatio

### Object literals

- descriptor

## Constructors

### constructor

- new Flashlight(center: vec2, color: vec3, intensity: number, direction: vec2, startCutoff?: number): Flashlight

- Overrides LightDrawable.__constructor

  - Defined in drawables/lights/flashlight.ts:20

  #### Parameters

  - ##### center: vec2

  - ##### color: vec3

  - ##### intensity: number

  - ##### direction: vec2

  - ##### Default value startCutoff: number = 0

  #### Returns Flashlight

## Properties

### center

center: vec2

Inherited from Flashlight.center

- Defined in drawables/lights/light-drawable.ts:8

### color

color: vec3

Inherited from Flashlight.color

- Defined in drawables/lights/light-drawable.ts:8

### direction

direction: vec2

- Defined in drawables/lights/flashlight.ts:26

### intensity

intensity: number

Inherited from Flashlight.intensity

- Defined in drawables/lights/light-drawable.ts:8

### Protected lightnessRatio

lightnessRatio: number = 1

Inherited from Flashlight.lightnessRatio

- Defined in drawables/lights/light-drawable.ts:6

### startCutoff

startCutoff: number

- Defined in drawables/lights/flashlight.ts:27

## Methods

### Protected getObjectToSerialize

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

- Overrides LightDrawable.getObjectToSerialize

  - Defined in drawables/lights/flashlight.ts:32

  #### Parameters

  - ##### transform2d: mat2d

  - ##### transform1d: number

  #### Returns any

### minDistance

- minDistance(target: vec2): number

- Inherited from Flashlight.minDistance

  Overrides Drawable.minDistance

  - Defined in drawables/lights/light-drawable.ts:16

  #### Parameters

  - ##### target: vec2

  #### Returns number

### setLightnessRatio

- setLightnessRatio(ratio: number): void

- Inherited from Flashlight.setLightnessRatio

  - Defined in drawables/lights/light-drawable.ts:12

  #### Parameters

  - ##### ratio: number

  #### Returns void

## Object literals

### Static Readonly descriptor

descriptor: object

Overrides Drawable.descriptor

- Defined in drawables/lights/flashlight.ts:9

### empty

empty: Flashlight = new Flashlight(vec2.create(), vec3.create(), 0, vec2.create())

- Defined in drawables/lights/flashlight.ts:19

### shaderCombinationSteps

shaderCombinationSteps: number[] = [0, 1, 2, 4]

- Defined in drawables/lights/flashlight.ts:18

### uniformCountMacroName

uniformCountMacroName: string = "FLASHLIGHT_COUNT"

- Defined in drawables/lights/flashlight.ts:17

### propertyUniformMapping

propertyUniformMapping: object

- Defined in drawables/lights/flashlight.ts:10

### center

center: string = "flashlightCenters"

- Defined in drawables/lights/flashlight.ts:11

### color

color: string = "flashlightColors"

- Defined in drawables/lights/flashlight.ts:12

### direction

direction: string = "flashlightDirections"

- Defined in drawables/lights/flashlight.ts:14

### intensity

intensity: string = "flashlightIntensities"

- Defined in drawables/lights/flashlight.ts:13

### startCutoff

startCutoff: string = "flashlightStartCutoffs"

- Defined in drawables/lights/flashlight.ts:15