Difference between revisions of "PRIM GLOW/ja"
Jump to navigation
Jump to search
Asuka Neely (talk | contribs) (New page: <onlyinclude>{{#if: {{#vardefine:p_intensity_desc|0.0から1.0の範囲}} {{#vardefine:return|[ {{HoverText|0.0|float intensity}} ]}} {{#vardefine:glow_const|{{LSL Const/ja|PR...) |
|||
(One intermediate revision by one other user not shown) | |||
Line 16: | Line 16: | ||
{{LSL_Function/face/ja|face|{{#var:glow_const}}|!footer=*|return={{#var:return}}}} | {{LSL_Function/face/ja|face|{{#var:glow_const}}|!footer=*|return={{#var:return}}}} | ||
}}{{LSL Constant | }}{{LSL Constant | ||
|inject-2={{LSL PrimitiveParam Categorize|Face}} | |||
|name=PRIM_GLOW | |name=PRIM_GLOW | ||
|type=integer | |type=integer | ||
Line 34: | Line 35: | ||
|r1_type=float|r1_name=intensity | |r1_type=float|r1_name=intensity | ||
}} | }} | ||
|examples=< | |examples=<source lang="lsl2">//Each time the prim is touched, the intensity of the glow is increased (until it maxes out and cycles back to zero). | ||
integer steps = 10; | integer steps = 10; | ||
integer counter = 0; | integer counter = 0; | ||
Line 45: | Line 46: | ||
counter = (counter + 1) % steps; | counter = (counter + 1) % steps; | ||
} | } | ||
}</ | }</source><source lang="lsl2">//Each time the prim is touched, the intensity of the glow is decreased (until it hits zero and cycles back to one). | ||
integer steps = 10; | integer steps = 10; | ||
integer counter = 0; | integer counter = 0; | ||
Line 56: | Line 57: | ||
counter = (counter + steps - 1) % steps; | counter = (counter + steps - 1) % steps; | ||
} | } | ||
}</ | }</source> | ||
|constants= | |constants= | ||
{{LSL ConstRow/ja|CHANGED_TEXTURE}} | {{LSL ConstRow/ja|CHANGED_TEXTURE}} |
Latest revision as of 06:40, 25 February 2016
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer PRIM_GLOW = 25;The integer constant PRIM_GLOW has the value 25
PRIM_GLOWは側面のグローステータスを取得あるいは設定するのに用いられます。コンパイラが命名された定数を受け付けない場合は、25の数値を使います。
llSetPrimitiveParams
[ PRIM_GLOW, integer face, float intensity ]• integer | face | – | 面 番号もしくは ALL_SIDES | |
• float | intensity | – | 0.0から1.0の範囲 |
llSetPrimitiveParamsとllSetLinkPrimitiveParamsを実行する時に用いられます。
llGetPrimitiveParams
llGetPrimitiveParams([ PRIM_GLOW, integer face ]);Caveats
Related Articles
Constants
• | CHANGED_TEXTURE |
Functions
• | llSetPrimitiveParams | |||
• | llSetLinkPrimitiveParams | |||
• | llGetPrimitiveParams |
Events
• | changed |
Examples
//Each time the prim is touched, the intensity of the glow is increased (until it maxes out and cycles back to zero).
integer steps = 10;
integer counter = 0;
default
{
touch_start(integer total_number)
{
llSetPrimitiveParams( [ PRIM_GLOW, ALL_SIDES, counter / (steps - 1.0) ]);
counter = (counter + 1) % steps;
}
}
//Each time the prim is touched, the intensity of the glow is decreased (until it hits zero and cycles back to one).
integer steps = 10;
integer counter = 0;
default
{
touch_start(integer total_number)
{
llSetPrimitiveParams( [ PRIM_GLOW, ALL_SIDES, counter / (steps - 1.0) ]);
counter = (counter + steps - 1) % steps;
}
}