API Documentation | All Packages | All Classes | Index | Frames | ![]() |
ColorRamp | Properties | Methods | Constants | |
Package | weavejs.util |
Class | public class ColorRamp |
Inheritance | ColorRamp ![]() ![]() ![]() |
Method | Defined By | ||
---|---|---|---|
ColorRamp(sessionState:Object = null) | ColorRamp | ||
![]() | addDisposeCallback(relevantContext:Object, callback:Function, allowDelay:Boolean = false):void | CallbackCollection | |
![]() | addGroupedCallback(relevantContext:Object, groupedCallback:Function, triggerCallbackNow:Boolean = false, delayWhileBusy:Boolean = true):void | CallbackCollection | |
![]() | addImmediateCallback(relevantContext:Object, callback:Function, runCallbackNow:Boolean = false, alwaysCallLast:Boolean = false):void | CallbackCollection | |
![]() | delayCallbacks():void | CallbackCollection | |
![]() | detectChanges():void
This function may be called to detect change to a non-primitive session state in case it has been modified externally. | LinkableVariable | |
![]() | dispose():void [override] | LinkableVariable | |
findMatchingColorRamp(ramp:ColorRamp):Object [static]
| ColorRamp | ||
getColor(value:Number, min:Number = 0, max:Number = 1):Number
Normalizes a value between min and max and returns an RGB hex color. | ColorRamp | ||
getColorFromNorm(normValue:Number):Number | ColorRamp | ||
getColorRampByName(rampName:String):Object [static]
| ColorRamp | ||
getColors():Array | ColorRamp | ||
getHexColor(value:Number, min:Number = 0, max:Number = 1):String
Normalizes a value between min and max and returns an RGB hex color. | ColorRamp | ||
getHexColors():Array | ColorRamp | ||
![]() | getSessionState():Object | LinkableVariable | |
![]() | getSessionStateType():Class
The type restriction passed in to the constructor. | LinkableVariable | |
![]() | lock():void
Call this function when you do not want to allow any more changes to the value of this sessioned property. | LinkableVariable | |
![]() | removeCallback(relevantContext:Object, callback:Function):void | CallbackCollection | |
![]() | resumeCallbacks():void | CallbackCollection | |
reverse():void | ColorRamp | ||
![]() | setSessionState(value:Object):void | LinkableVariable | |
![]() | triggerCallbacks():void | CallbackCollection | |
![]() | verifyValue(value:Object):Boolean
This function will verify if a given value is a valid session state for this linkable variable. | LinkableVariable |
Constant | Defined By | ||
---|---|---|---|
allColorRamps : Array [static] | ColorRamp | ||
COLOR : String = color [static] | ColorRamp | ||
![]() | DEFAULT_TRIGGER_COUNT : uint = 1 [static]
This is the default value of triggerCounter. | CallbackCollection | |
POSITION : String = position [static] | ColorRamp | ||
![]() | STACK_TRACE_TRIGGER : String = This is the stack trace from when the callbacks were last triggered. [static] | CallbackCollection |
ColorRamp | () | Constructor |
public function ColorRamp(sessionState:Object = null)
sessionState:Object (default = null )
|
findMatchingColorRamp | () | method |
public static function findMatchingColorRamp(ramp:ColorRamp):Object
Parameters
ramp:ColorRamp |
Object — An Object with "name", "tags", and "colors" properties.
|
getColor | () | method |
public function getColor(value:Number, min:Number = 0, max:Number = 1):Number
Normalizes a value between min and max and returns an RGB hex color.
Parameters
value:Number — A numeric value
| |
min:Number (default = 0 ) — The min value used for normalization
| |
max:Number (default = 1 ) — The max value used for normalization
|
Number — A color represented as a Number between 0x000000 and 0xFFFFFF
|
getColorFromNorm | () | method |
public function getColorFromNorm(normValue:Number):Number
Parameters
normValue:Number — A value between 0 and 1.
|
Number — A color.
|
getColorRampByName | () | method |
public static function getColorRampByName(rampName:String):Object
Parameters
rampName:String |
Object — An Object with "name", "tags", and "colors" properties.
|
getColors | () | method |
public function getColors():Array
ReturnsArray |
getHexColor | () | method |
public function getHexColor(value:Number, min:Number = 0, max:Number = 1):String
Normalizes a value between min and max and returns an RGB hex color.
Parameters
value:Number — A numeric value
| |
min:Number (default = 0 ) — The min value used for normalization
| |
max:Number (default = 1 ) — The max value used for normalization
|
String — A 6-digit hex color String like #FFFFFF
|
getHexColors | () | method |
public function getHexColors():Array
ReturnsArray |
reverse | () | method |
public function reverse():void
allColorRamps | Constant |
public static const allColorRamps:Array
COLOR | Constant |
public static const COLOR:String = color
POSITION | Constant |
public static const POSITION:String = position