Difference between revisions of "PRIM COLOR"
Jump to navigation
Jump to search
m |
|||
Line 1: | Line 1: | ||
<onlyinclude>{{#if:{{#vardefine:return|[ {{HoverLink|ZERO_VECTOR|{{LSL VR|0.0|0.0|0.0}} vector color}}, {{HoverText|0.0|float alpha}} ]}} | <onlyinclude>{{#if:{{#vardefine:return|[ {{HoverLink|ZERO_VECTOR|{{LSL VR|0.0|0.0|0.0}} vector color}}, {{HoverText|0.0|float alpha}} ]}} | ||
{{#vardefine:color_const|{{LSL Const|PRIM_COLOR|integer|18|c=Used to get/ | {{#vardefine:color_const|{{LSL Const|PRIM_COLOR|integer|18|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the color and alpha of a prim's face}}}} | ||
{{#vardefine:facetable|{{#var:facetable}} | {{#vardefine:facetable|{{#var:facetable}} | ||
{{!}}- | {{!}}- | ||
Line 13: | Line 13: | ||
|type=integer | |type=integer | ||
|value=18 | |value=18 | ||
|desc=Used to get | |desc=Used to get or set the color and alpha of a prim's face. | ||
|examples= | |examples= | ||
|constants= | |constants= |
Revision as of 14:09, 17 April 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer PRIM_COLOR = 18;The integer constant PRIM_COLOR has the value 18
Used to get or set the color and alpha of a prim's face.
[ PRIM_COLOR, integer face, float color, float alpha ]
[ PRIM_COLOR, integer face, float color, float alpha ]• integer | face | – | face number or ALL_SIDES | |
• float | color | – | color in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white) | |
• float | alpha | – | from 0.0 (clear) to 1.0 (solid) (0.0 <= alpha <= 1.0) |
When used with llSetPrimitiveParams & llSetLinkPrimitiveParams
llGetPrimitiveParams([ PRIM_COLOR, integer face ]);
llGetPrimitiveParams([ PRIM_COLOR, integer face ]);Returns the list [ float color, float alpha ]
• integer | face | – | face number or ALL_SIDES | ||
• float | color | – | color in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white) | ||
• float | alpha | – | from 0.0 (clear) to 1.0 (solid) (0.0 <= alpha <= 1.0) |
Caveats:
- If face is ALL_SIDES then the PRIM_COLOR works on all sides.
- If face indicates a face that does not exist the PRIM_COLOR return is [ ZERO_VECTOR, 0.0 ]
Caveats
- If face is ALL_SIDES then the PRIM_COLOR works on all sides.
- If face indicates a face that does not exist the PRIM_COLOR return is [ ZERO_VECTOR, 0.0 ]
Related Articles
Functions
• | llSetPrimitiveParams | |||
• | llSetLinkPrimitiveParams | |||
• | llGetPrimitiveParams |
Events
• | changed |
Articles
• | Color in LSL | |||
• | Translucent Color |