Category:LSL Color/ja
From Second Life Wiki
Color in LSLLSLは自身が特別な色の形式を持っています。LSLは色の記憶にvectorを使用します。伝統的なRGB各チャンネルの0から255のようなものではなく、LSLのカラーチャンネルは0から1です。 形式: <R, G, B>
| |||||||||||||||
部分的に使いやすいもの色とアルファを(から)integerへ(に)記憶(回収)するための応用しやすい関数ですinteger ColorAlphatoRGBA(vector color, float alpha) { return (((integer)(alpha * 255.0) & 0xFF) << 24) | (((integer)(color.x * 255.0) & 0xFF) << 16) | (((integer)(color.y * 255.0) & 0xFF) << 8) | ((integer)(color.z * 255.0) & 0xFF); } vector RGBAtoColor(integer rgba) { return < ((rgba >> 16) & 0xFF) / 255.0, ((rgba >> 8) & 0xFF) / 255.0, (rgba & 0xFF) / 255.0 >; } float RGBAtoAlpha(integer rgba) { return ((rgba >> 24) & 0xFF) / 255.0; } |
Articles in category "LSL Color/ja"
There are 11 articles in this category.
aCc |
GPS |
S cont. |

