LlGetEnvironment/ja

From Second Life Wiki
Jump to navigation Jump to search

要約

関数: list llGetEnvironment( vector pos, list params );

containing the current environment values for the parcel or region as a list of attributes. Takes a list of attributes to retrieve in params and returns them in the order requested.を list で返します。

• vector pos A position in region coordinates. X and Y are in region coordinates and determine the parcel. If X and Y are both -1, the environment for the region is inspected. Z is the altitude in the region and determines which sky track is accessed.
• list params A list of parameters to retrieve from the current environment.

If an unknown rule is encountered in the parameter list an error is sent to the debug channel.

Parameters

parameter integer value return values description
SKY_TRACKS 15 float sky2, float sky3, float sky4 リージョン内のスカイの遷移の高度。
SKY_AMBIENT 0 vector ambient_color 環境のアンビエントカラー。
SKY_TEXTURE_DEFAULTS 1 integer bloom_is_default, integer halo_is_default, integer rainbow_is_default テクスチャが現在デフォルトに設定されているかどうかをチェックします。デフォルト値の場合、返される整数は1です。テクスチャがデフォルト以外を使用している場合、返される値は0です。
SKY_CLOUDS 2 vector color, float coverage, float scale, float variance, vector scroll, vector density, vector detail, integer is_default 環境雲の情報。
  • color: 雲に使用される色。
  • coverage: カバレッジの割合。
  • scale: 雲のテクスチャに適用されるスケーリング。
  • variance: メインの雲層に適用されるランダム化ファクター。
  • scroll: 雲のスクロール速度。
 * Xは東/西
 * Yは北/南
 * Zは未使用
  • density: 雲の密度を生成するために使用されるX/YおよびDパラメータ。
  • detail: 雲の詳細を生成するために使用されるX/YおよびDパラメータ。
  • is_default: 雲がデフォルトのテクスチャを使用している場合は1。
SKY_DOME 4 float offset, float radius, float max_altitude スカイドームの情報。
  • offset
  • radius
  • 最大の高度
SKY_GAMMA 5 float gamma シーンに適用されるガンマ値。
SKY_GLOW 6 float glow_size, float glow_focus 太陽と月に適用されるグロー。
  • グローエフェクトのサイズ
  • グローエフェクトの焦点
SKY_MOON 9 rotation rot, float scale, float brightness, integer is_default_texture, vector direction, vector ambient_color, vector diffuse_color 詳細な月の情報
  • rot: 月に適用される現在の回転。
  • scale: 月のテクスチャに適用される現在のスケール。
  • brightness: 月の明るさ。
  • is_default_texture: 月のテクスチャがデフォルトに設定されている場合は1。それ以外は0。
  • direction: 月を指す単位ベクトル。
  • ambient_color: 月のアンビエントカラー。
  • diffuse_color: 月に適用される拡散色。
SKY_STAR_BRIGHTNESS 13 float brightness
SKY_SUN 14 rotation rot, float scale, vector sun_color, integer is_default_texture, vector direction, vector ambient_color, vector diffuse_color 詳細な太陽の情報
  • rot: 太陽に適用される現在の回転。
  • scale: 太陽のテクスチャに適用される現在のスケール。
  • sun_color:
  • is_default_texture: 太陽のテクスチャがデフォルトに設定されている場合は1。それ以外は0。
  • direction: 太陽を指す単位ベクトル。
  • ambient_color: 太陽のアンビエントカラー。
  • diffuse_color: 太陽に適用される拡散色。
SKY_PLANET 10 float planet_radius, float sky_bottom_radius, float sky_top_radius スカイのレンダリングに使用される惑星の情報
  • planet_radius
  • sky_bottom_radius
  • sky_top_radius
SKY_REFRACTION 11 float moisture_level, float droplet_radius, float ice_level 虹や光学効果のためのスカイ屈折パラメータ。
  • moisture_level
  • droplet_radius
  • ice_level
SKY_LIGHT 8 vector light_direction, vector fade_color, vector total_ambient その他のライティング値
  • light_direction: 優勢な光源の方向を示す単位ベクトル。
  • fade_color: 優勢な光源から放射される光の現在の色を表すcolorベクトル(sRGB空間)。
  • total_ambient: シーンで使用されている現在のアンビエントカラーを表すcolorベクトル(sRGB空間)。
SKY_REFLECTION_PROBE_AMBIANCE 24 float ambiance すべての反射プローブの最小アンビエント値。

range = [0.0, 10.0]

Caveat: このパラメータは今後のGLTF Materialsプロジェクトでサポートされる予定です。現在はサポートされているテストエリアとサポートされているテストビューアでのみ機能します。

WATER_BLUR_MULTIPLIER 100 float multiplier 水中でシーンをぼかすための乗数。
WATER_FOG 101 vector , float density, float modulation 水中にいるときに適用される霧のパラメータ
  • color: 水中霧の色。
  • density: 霧に適用される密度指数。
  • modulation:
WATER_FRESNEL 102 float offset, float scale 水面に適用されるフレネル散乱。
  • offset
  • scale
WATER_TEXTURE_DEFAULTS 103 integer normal_is_default, integer transparent_is_default テクスチャが現在デフォルトに設定されているかどうかをチェックします。デフォルト値の場合、返される整数は1です。テクスチャがデフォルト以外を使用している場合、この値は0です。
WATER_NORMAL_SCALE 104 vector scale 水の法線マップに適用されるスケーリング。
WATER_REFRACTION 105 float scale_above, float scale_below 水面を通して見るときの屈折率。
  • scale_above
  • scale_below
WATER_WAVE_DIRECTION 106 vector large_wave, vector small_wave 波の方向を示すベクトル Yは南/北、Xは東/西の動きを示します。
  • large_wave: 大きな波の速度と方向。
  • small_wave: 小さな波の速度と方向。
ENVIRONMENT_DAYINFO 200 integer day_length, integer day_offset, float secs_since_midnight 現在の時刻と日にちの情報
  • day_length: 環境の日サイクルの秒数。
  • day_offset: 日サイクルがGMTからオフセットされた秒数。
  • secs_since_midnight: 最後の日サイクルの真夜中から経過した秒数。

警告

  • If the script can not run in the requested parcel, this function returns an empty list and issues a warning in the debug channel.
  • SKY_LIGHT's param fade_color does not return a clamped value, meaning an unusually bright scene will cause it to return an out-of-bounds color. (This can be fixed by clamping the value manually, but this should really return a clamped value).

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   llGetEnvironment - SKY_LIGHT fade_color param returns an unclamped value

サンプル

default
{
    touch_start(integer total_number)
    {
        list environment = llGetEnvironment(llGetPos(), [SKY_TRACKS, SKY_AMBIENT, SKY_CLOUDS]);
        llOwnerSay(llDumpList2String(environment, ", "));
    }
}

特記事項

All Issues

~ Search JIRA for related Issues
   llGetEnvironment - SKY_LIGHT fade_color param returns an unclamped value

Signature

function list llGetEnvironment( vector pos, list params );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。