mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41:55 +00:00
Define lighting and clouds in studio directory
g
This commit is contained in:
49
src/server/Studio/Lighting/Sky.lua
Normal file
49
src/server/Studio/Lighting/Sky.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
local function Sky(): Sky
|
||||
local SkyBox = Instance.new("Sky")
|
||||
SkyBox.MoonAngularSize = 8
|
||||
SkyBox.MoonTextureId = "rbxassetid://62326944"
|
||||
SkyBox.SkyboxBk = "rbxassetid://9544505500"
|
||||
SkyBox.SkyboxDn = "rbxassetid://9544547905"
|
||||
SkyBox.SkyboxFt = "rbxassetid://9544504852"
|
||||
SkyBox.SkyboxLf = "rbxassetid://9544547694"
|
||||
SkyBox.SkyboxRt = "rbxassetid://9544547542"
|
||||
SkyBox.SkyboxUp = "rbxassetid://9544547398"
|
||||
SkyBox.SunTextureId = "rbxassetid://5392574622"
|
||||
SkyBox.StarCount = 200
|
||||
SkyBox.SunAngularSize = 9
|
||||
|
||||
return SkyBox
|
||||
end
|
||||
|
||||
local function Atmosphere(): Atmosphere
|
||||
local Atmosp = Instance.new("Atmosphere")
|
||||
Atmosp.Density = .25
|
||||
Atmosp.Offset = 0
|
||||
Atmosp.Color = Color3.fromRGB(199, 199, 199)
|
||||
Atmosp.Decay = Color3.fromRGB(106, 112, 125)
|
||||
|
||||
return Atmosp
|
||||
end
|
||||
|
||||
local function Clouds(): Clouds
|
||||
local _Clouds = Instance.new("Clouds")
|
||||
_Clouds.Cover = .7
|
||||
_Clouds.Density = .15
|
||||
_Clouds.Color = Color3.fromRGB(180,180,180)
|
||||
|
||||
return _Clouds
|
||||
end
|
||||
|
||||
export type exports = {
|
||||
Sky: Sky,
|
||||
Atmosphere: Atmosphere,
|
||||
Clouds: Clouds,
|
||||
}
|
||||
|
||||
local export: exports = {
|
||||
Sky = Sky,
|
||||
Atmosphere = Atmosphere,
|
||||
Clouds = Clouds
|
||||
}
|
||||
|
||||
return export
|
||||
@@ -1,18 +1,21 @@
|
||||
local Lighting = game:GetService("Lighting")
|
||||
local Terrain = workspace:WaitForChild("Terrain")
|
||||
|
||||
local Sky = require(script:WaitForChild("Sky"))
|
||||
|
||||
type LightingProps = { [string]: Color3 | number | boolean | string }
|
||||
|
||||
local Lighting_PropsTree: LightingProps = {
|
||||
["Ambient"] = Color3.fromRGB(70, 70, 70),
|
||||
["Brightness"] = 0,
|
||||
["Ambient"] = Color3.fromRGB(40,40,40),
|
||||
["Brightness"] = 3,
|
||||
["ColorShift_Bottom"] = Color3.new(0,0,0),
|
||||
["ColorShift_Top"] = Color3.new(0,0,0),
|
||||
["EnvironmentDiffuseScale"] = 1,
|
||||
["EnvironmentSpecularScale"] = .7,
|
||||
["GlobalShadows"] = true,
|
||||
["OutdoorAmbient"] = Color3.fromRGB(70,70,70),
|
||||
["OutdoorAmbient"] = Color3.fromRGB(50,50,50),
|
||||
["ShadowSoftness"] = 1,
|
||||
["ClockTime"] = 0,
|
||||
["ClockTime"] = 7,
|
||||
["GeographicLatitude"] = 0,
|
||||
["Name"] = "Lighting",
|
||||
["ExposureCompensation"] = 0,
|
||||
@@ -26,7 +29,10 @@ export type Effects = {
|
||||
}
|
||||
|
||||
return function(): Effects
|
||||
--Effects
|
||||
Lighting:ClearAllChildren()
|
||||
Terrain:ClearAllChildren()
|
||||
|
||||
--VFX Effects for later
|
||||
local ColorCorrection = Instance.new("ColorCorrectionEffect")
|
||||
ColorCorrection.Parent = Lighting
|
||||
|
||||
@@ -39,6 +45,10 @@ return function(): Effects
|
||||
end
|
||||
end
|
||||
|
||||
Sky.Sky().Parent = Lighting
|
||||
Sky.Atmosphere().Parent = Lighting
|
||||
Sky.Clouds().Parent = Terrain
|
||||
|
||||
return {
|
||||
ColorCorrection = ColorCorrection
|
||||
}
|
||||
3
src/server/Studio/Workspace.lua
Normal file
3
src/server/Studio/Workspace.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return function()
|
||||
workspace.Gravity = 150
|
||||
end
|
||||
@@ -13,7 +13,10 @@ EditorEntities.Name = "StudioIndexedEntities"
|
||||
EditorEntities.Parent = ServerStorage
|
||||
|
||||
local StudioEntities = HideEditorEntities.indexAll(not RS:IsStudio())
|
||||
Lighting()
|
||||
|
||||
StarterPlayer_Stuff()
|
||||
Lighting_Stuff()
|
||||
Workspace_Stuff()
|
||||
|
||||
EditorEntities.OnInvoke = function(): HideEditorEntities.Entities
|
||||
return StudioEntities.IndexedEntities
|
||||
|
||||
Reference in New Issue
Block a user