The Color ParametersLines 4 - 11 : Defining the Color Variables
myObjTransform.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).
rb is the offset for the red component (-255 to 255).
ga is the percentage for the green component (-100 to 100).
gb is the offset for the green component (-255 to 255).
ba is the percentage for the blue component (-100 to 100).
bb is the offset for the blue component (-255 to 255).
aa is the percentage for alpha (-100 to 100).
ab is the offset for alpha (-255 to 255).
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.
|» Level Advanced|
Rating: 8 Votes: 53
|No information about the author has been provided|
|Download the files used in this tutorial.|
|Download (8 kb)|
|More help? Search our boards for quick answers!|