# Reticle

Reticle 3D Sprite

## Constructor

#### new Reticle(coloropt, autoSelectopt, dwellTimeopt)

Source:
  - interface/Reticle.js, line 12

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`color` | THREE.Color | <optional> | `0xffffff` | Color of the reticle sprite
`autoSelect` | boolean | <optional> | `true` | Auto selection
`dwellTime` | number | <optional> | `1500` | Duration for dwelling sequence to complete

### Methods

#### createCanvas() → {object|HTMLCanvasElement|CanvasRenderingContext2D}

Source:
  - interface/Reticle.js, line 85

Create canvas element

##### Returns:

- object

  Type
    object

- object.canvas

  Type
    HTMLCanvasElement

- object.context

  Type
    CanvasRenderingContext2D

#### createCanvasTexture(canvas) → {THREE.CanvasTexture}

Source:
  - interface/Reticle.js, line 66

Create canvas texture

##### Parameters:

Name | Type | Description
--- | --- | ---
`canvas` | HTMLCanvasElement |

##### Returns:

Type
  THREE.CanvasTexture

#### end()

Source:
  - interface/Reticle.js, line 259

End dwelling

##### Fires:

- Reticle#event:reticle-end

#### hide()

Source:
  - interface/Reticle.js, line 219

Make reticle invisible

#### ripple()

Source:
  - interface/Reticle.js, line 148

Ripple effect

##### Fires:

- Reticle#event:reticle-ripple-start
- Reticle#event:reticle-ripple-end

#### setColor(color)

Source:
  - interface/Reticle.js, line 53

Set material color

##### Parameters:

Name | Type | Description
--- | --- | ---
`color` | THREE.Color |

#### show()

Source:
  - interface/Reticle.js, line 208

Make reticle visible

#### start(callback)

Source:
  - interface/Reticle.js, line 232

Start dwelling

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function |

##### Fires:

- Reticle#event:reticle-start

#### update()

Source:
  - interface/Reticle.js, line 285

Update dwelling

##### Fires:

- Reticle#event:reticle-update

#### updateCanvasArcByProgress(progress)

Source:
  - interface/Reticle.js, line 110

Update canvas arc by progress

##### Parameters:

Name | Type | Description
--- | --- | ---
`progress` | number |

### Events

#### reticle-end

Source:
  - interface/Reticle.js, line 270

Reticle end event

##### Type:

- object

#### reticle-ripple-end

Source:
  - interface/Reticle.js, line 179

Reticle ripple end event

##### Type:

- object

#### reticle-ripple-start

Source:
  - interface/Reticle.js, line 192

Reticle ripple start event

##### Type:

- object

#### reticle-start

Source:
  - interface/Reticle.js, line 240

Reticle start event

##### Type:

- object

#### reticle-update

Source:
  - interface/Reticle.js, line 294

Reticle update event

##### Type:

- object