Difference between revisions of "Category:LSL Alpha/ja"

From Second Life Wiki
Jump to: navigation, search
m
m
 
Line 14: Line 14:
 
!style="background-color: #D2D3FF" | LSL 例 & 説明
 
!style="background-color: #D2D3FF" | LSL 例 & 説明
 
|-
 
|-
| [[llSetAlpha]]
+
| {{LSLG/ja|llSetAlpha}}
 
| <source lang="lsl2">llSetAlpha(1.0, ALL_SIDES);</source> This will set the object's sides' alpha to opaque, or '''0%'''.
 
| <source lang="lsl2">llSetAlpha(1.0, ALL_SIDES);</source> This will set the object's sides' alpha to opaque, or '''0%'''.
 
|-
 
|-
| [[llSetLinkAlpha]]
+
| {{LSLG/ja|llSetLinkAlpha}}
 
| <source lang="lsl2">llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);</source>
 
| <source lang="lsl2">llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);</source>
 
This will set link-set's alpha to transparent, or '''100%'''.
 
This will set link-set's alpha to transparent, or '''100%'''.
 
|-
 
|-
| [[llSetPrimitiveParams]]
+
| {{LSLG/ja|llSetPrimitiveParams}}
 
| <source lang="lsl2">llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, llGetColor(ALL_SIDES), 0.5]);
 
| <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>
 
// 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%'''.
 
This will set the object's alpha to translucent, or '''50%'''.
 
|-
 
|-
| [[llSetLinkPrimitiveParams]]
+
| {{LSLG/ja|llSetLinkPrimitiveParams}}
 
| <source lang="lsl2">llSetLinkPrimitiveParams(LINK_SET, [PRIM_COLOR, ALL_SIDES, llGetColor(ALL_SIDES), 0.5]);
 
| <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>
 
// 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%'''.
 
This will set the link-set's alpha to translucent, or '''50%'''.
 
|-
 
|-
| [[llSetLinkPrimitiveParamsFast]]
+
| {{LSLG/ja|llSetLinkPrimitiveParamsFast}}
 
| <source lang="lsl2">llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_COLOR, ALL_SIDES, llGetColor(ALL_SIDES), 0.5]);
 
| <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>
 
// Using llGetColor this way may not give the desired result (it returns the average color).</source>

Latest revision as of 09:09, 14 December 2015

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

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

編集モード

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

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

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

llSetPrimitiveParams
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)

This will set the object's alpha to translucent, or 50%.

llSetLinkPrimitiveParams
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).

This will set the link-set's alpha to translucent, or 50%.

llSetLinkPrimitiveParamsFast
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).

This will set the link-set's alpha to translucent, or 50%.