Class: ToolRainbow

ToolRainbow


new ToolRainbow(config)

Parameters:
Name Type Description
config object

tool config

Version:
  • 0.5.1
Tutorials:
  • Tutorial: solver
  • Tutorial: tutorial-1
  • Tutorial: tutorial-2
Throws:
InvalidArgumentException

Extends

Methods


drawFramePath(config, points)

Draw part of tool path

Parameters:
Name Type Description
config object

Drawing parameters

points array

List of points to draw


drawFramePath(config, points)

Draw part of rainbow

Parameters:
Name Type Description
config object

Drawing parameters

points array

List of points to draw


getRbwColorStr(x, y)

Get color based on x, y coordinates

Parameters:
Name Type Description
x number

x

y number

y

Returns:
  • color as "rgba(0,0,0,1) string
Type
string

getColorStr(x, y)

Get color based on x, y coordinates

Parameters:
Name Type Description
x number

x

y number

y

Returns:
  • color as "rgba(0,0,0,1)"" string
Type
string

drawFramePath(config, points)

Draw part of rainbow

Parameters:
Name Type Description
config object

Drawing parameters

points array

List of points to draw


distance(x1, y1, x2, y2)

Calculate distance between two points

Parameters:
Name Type Description
x1 number

start x

y1 number

start y

x2 number

end x

y2 number

end y

Inherited From:
Returns:
  • distance
Type
number