Constructor
new Reticle(coloropt, autoSelectopt, dwellTimeopt)
- Source:
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:
Create canvas element
Returns:
-
object
- Type
- object
-
object.canvas
- Type
- HTMLCanvasElement
-
object.context
- Type
- CanvasRenderingContext2D
createCanvasTexture(canvas) → {THREE.CanvasTexture}
- Source:
Create canvas texture
Parameters:
Name | Type | Description |
---|---|---|
canvas |
HTMLCanvasElement |
Returns:
- Type
- THREE.CanvasTexture
end()
- Source:
End dwelling
Fires:
hide()
- Source:
Make reticle invisible
ripple()
- Source:
Ripple effect
Fires:
setColor(color)
- Source:
Set material color
Parameters:
Name | Type | Description |
---|---|---|
color |
THREE.Color |
show()
- Source:
Make reticle visible
start(callback)
- Source:
Start dwelling
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
Fires:
update()
- Source:
Update dwelling
Fires:
updateCanvasArcByProgress(progress)
- Source:
Update canvas arc by progress
Parameters:
Name | Type | Description |
---|---|---|
progress |
number |
Events
reticle-end
- Source:
Reticle end event
Type:
- object
reticle-ripple-end
- Source:
Reticle ripple end event
Type:
- object
reticle-ripple-start
- Source:
Reticle ripple start event
Type:
- object
reticle-start
- Source:
Reticle start event
Type:
- object
reticle-update
- Source:
Reticle update event
Type:
- object