Search Tutorials
The Color Parameters Lines 4 - 11 : Defining the Color VariablesmyObjTransform.Ra = myred; myObjTransform.Rb = myredOffset; myObjTransform.Ga = mygreen; myObjTransform.Gb = mygreenOffset; myObjTransform.Ba = myblue; myObjTransform.Bb = myblueOffset; myObjTransform.Ab = myAlpha; myObjTransform.Ab = myAlphaOffset; These are the 8 parameters that specify the percentage and offset values for the red, green, blue, and alpha (transparency) components of a color, entered in a 0xRRGGBBAA format - each color component recieves the value we sent to the function. Our object has 8 properties, 1 for each color component - the names (ra,rb,ga,gb,ba,bb,aa,ab) are reserved words - we can't "invent" our own color properties. If you'll look carefully you'll see the reasoning behind these names - there are RGB colors (and Alpha) - the exact values are called (RGBA)+a and they are measured between -100 to 100, (0 is none color, 100 is full color) and the offset values are called (RGBA)+b and they are measured between -255 to 255 (0 is no influence at all, 255 is full influence, -255 is reversed influence. The parameters for a color transformobject are defined as follows:ra is the percentage for the red component (-100 to 100). myObjColor.setTransform(myObjTransform); This is the final and most important line - this line connects the virtual object to our real object using the "setTransform" method that can be found in the "color" submenu in the "object" menu.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|