Lightingクラス

クラスサービス(game:GetService("Lighting")で取り出す)Instance.newでは作れない日本語解説あり

ひとことで言うと

ゲームの世界の明るさ・時刻・空の色などを決めるサービスです。

公式の説明(英語):The Lighting service controls global lighting in an experience. It includes a range of adjustable properties that you can use to change how lighting appears and interacts with other objects.

クラスの関係

受け継いでいるクラス:Object → Instance → Lighting

プロパティ(19)

名前と書き方説明
Ambient
Lighting.Ambient: Color3
影の部分の色。The lighting hue applied to areas that are occluded from the sky, such as indoor areas.
Brightness
Lighting.Brightness: float
明るさ。The intensity of illumination in the place.
ClockTime
Lighting.ClockTime: float
ゲームの中の時刻(0〜24)。A numerical representation (in hours) of the current time of day used by Lighting.
ColorShift_Bottom
Lighting.ColorShift_Bottom: Color3
The hue represented in light reflected in the opposite surfaces to those facing the sun or moon.
ColorShift_Top
Lighting.ColorShift_Top: Color3
The hue represented in light reflected from surfaces facing the sun or moon.
EnvironmentDiffuseScale
Lighting.EnvironmentDiffuseScale: float
Ambient light that is derived from the environment.
EnvironmentSpecularScale
Lighting.EnvironmentSpecularScale: float
Specular light derived from environment.
ExposureCompensation
Lighting.ExposureCompensation: float
The exposure compensation value.
ExtendLightRangeTo120
Lighting.ExtendLightRangeTo120: RolloutState
Unused. Light Class.PointLight.Range|Range is always clamped to 120 studs.
FogColor
Lighting.FogColor: Color3
A Color3 value giving the hue of Lighting fog.
FogEnd
Lighting.FogEnd: float
霧が完全に濃くなる距離。The depth from the Workspace.CurrentCamera, in studs, at which fog will be completely opaque.
FogStart
Lighting.FogStart: float
The depth from the Workspace.CurrentCamera, in studs, at which fog begins to show.
GeographicLatitude
Lighting.GeographicLatitude: float
The geographic latitude, in degrees, of the scene, influencing the result of Lighting time on the position of the sun and moon.
GlobalShadows
Lighting.GlobalShadows: boolean
Toggles voxel-based dynamic lighting for the place.
LightingStyle
Lighting.LightingStyle: LightingStyle
The artistic intent behind lighting in the experience.
OutdoorAmbient
Lighting.OutdoorAmbient: Color3
The lighting hue applied to outdoor areas.
PrioritizeLightingQuality
Lighting.PrioritizeLightingQuality: boolean
Indicates whether you prefer lighting/shading quality or view distance to scale down first.
ShadowSoftness
Lighting.ShadowSoftness: float
Controls how blurry the shadows are.
TimeOfDay
Lighting.TimeOfDay: string
A 24-hour string representation of the current time of day used by Lighting.

メソッド(4)

名前と書き方説明
GetMinutesAfterMidnight
Lighting:GetMinutesAfterMidnight(): double
Returns the number of minutes that have passed after midnight for the purposes of lighting.
GetMoonDirection
Lighting:GetMoonDirection(): Vector3
Returns a Vector3 representing the direction of the moon.
GetSunDirection
Lighting:GetSunDirection(): Vector3
Returns a Vector3 representing the direction of the sun.
SetMinutesAfterMidnight
Lighting:SetMinutesAfterMidnight(minutes: double): ()
Sets Class.Lighting.TimeOfDay|TimeOfDay and Class.Lighting.ClockTime|ClockTime to the given number of minutes after midnight.

イベント(1)

名前と書き方説明
LightingChanged
Lighting.LightingChanged(skyChanged: boolean)
This event fires when a Lighting property is changed or a Sky is added or removed from Lighting.

受け継いでいるメンバー

Instance から受け継いでいるもの(46)

Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(Lighting)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む