Members
Methods
# getRandom(start, end)
random number in range
Parameters:
Name | Type | Description |
---|---|---|
start |
Number | range start num |
end |
Number | range end num |
random number between start and end
Type Definitions
# SetCaptchaOptions
Captcha text options to customise text appearance and value.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
characters |
integer |
<optional> |
6 | Length of captcha text. |
text |
string |
<optional> |
"Random UpperCase string" | Text of captcha |
color |
hexCode |
<optional> |
"#32cf7e" | Color of captcha text. |
font |
font |
<optional> |
"Sans" | Font of captcha text. |
skew |
boolean |
<optional> |
true | Skew captcha text. |
colors |
array |
<optional> |
[] | Array of hexCode will override color property. |
rotate |
number |
<optional> |
5 | Range of angle to rotate text. |
size |
number |
<optional> |
40 | Size of captcha text. |
opacity |
float |
<optional> |
1 | Opcaity of captcha text. |
# SetDecoyOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
color |
hexCode |
<optional> |
"#646566" | Color of decoy characters. |
font |
font |
<optional> |
"Sans" | Font of decoy characters. |
size |
number |
<optional> |
20 | Size of decoy characters. |
opacity |
float |
<optional> |
0.8 | Opacity of decoy characters. |
# SetDimensionOption
Customise dimension of captcha image.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
height |
integer |
<optional> |
100 | Height of captcha image. |
width |
integer |
<optional> |
300 | Width of captcha image. |
# SetTraceOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
color |
hexCode |
<optional> |
"#32cf7e" | Color of trace line. |
size |
number |
<optional> |
3 | Width of trace line. |
opacity |
float |
<optional> |
1 | Opacoty of trace line. |