new ColorTransferFunction()
Color segmentation function.
Methods
-
addRGBPoint()
-
Add the x and corresponding y coordinates of a segment point to the piecewise function.
-
getColor()
-
Get the color value corresponding to x on the piecewise function.
-
getSize()
-
Return the number of segmentation points in a piecewise function.
-
getTable()
-
Discretize the y of the piecewise function and fill it into an array. Among them, xStart and xEnd are the starting and ending positions of x values on the piecewise function. Size is the size of the array to be filled in. Table is the output item, of Float32Array type, which is the array to be filled in.
-
removeAllPoints()
-
Remove all segmentation points of the piecewise function.
-
removePoint()
-
Remove the segmentation point at the position of x from the piecewise function.