Category:LSL Alpha/ja

From Second Life Wiki
Jump to navigation Jump to search

"アルファ" とはどのくらいオブジェクト (あるいはこの場合プリム) が不透明あるいは透明であるかを示すものです。Second Life ではアルファ設定値はスクリプトの llSetAlpha 関数で設定されます。この関数には float 値を渡します。0.0 を渡した場合、オブジェクト/プリムは完全に透明になります。1.0 を渡した場合、オブジェクトは完全に不透明になります。

しばしば、住人 は透明な テクスチャ のことをアルファテクスチャと呼びます。 これをこのプリムプロパティと混同してはいけません。 そうならないように、llSetTextureTEXTURE_TRANSPARENT を参照してください。

編集モード

編集モードでは、アルファ値は 0% から 100% のパーセント値で表現されます。0% はスクリプトで llSetAlpha(1.0) とするのと同等で、100% は llSetAlpha(0.0) と同等です。

関数 LSL 例 & 説明
llSetAlpha <source lang="lsl2">llSetAlpha(1.0, ALL_SIDES);</source> This will set the object's sides' alpha to opaque, or 0%.
llSetLinkAlpha <source lang="lsl2">llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);</source>

This will set link-set's alpha to transparent, or 100%.

llSetPrimitiveParams <source lang="lsl2">llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, llGetColor(ALL_SIDES), 0.5]);

// Using llGetColor this way may not give the desired result (it returns the average color)</source> This will set the object's alpha to translucent, or 50%.

llSetLinkPrimitiveParams <source lang="lsl2">llSetLinkPrimitiveParams(LINK_SET, [PRIM_COLOR, ALL_SIDES, llGetColor(ALL_SIDES), 0.5]);

// Using llGetColor this way may not give the desired result (it returns the average color).</source> This will set the link-set's alpha to translucent, or 50%.

llSetLinkPrimitiveParamsFast <source lang="lsl2">llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_COLOR, ALL_SIDES, llGetColor(ALL_SIDES), 0.5]);

// Using llGetColor this way may not give the desired result (it returns the average color).</source> This will set the link-set's alpha to translucent, or 50%.