rojo/.cursor/rules/roblox/reference/engine/classes/Sky.yaml
2026-02-02 12:08:47 -06:00

452 lines
11 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# This file is automatically generated. Please don't edit it manually.
# To submit a bug report on the content, see
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
name: Sky
type: class
memory_category: Instances
summary: |
Changes the default appearance of the experience's sky.
description: |
The `Sky` object, when placed inside `Class.Lighting`, changes the default
appearance of the experience's sky. This object's
[skybox](../../../environment/skybox.md) is composed of six sides, like a
cube. Rotation of the skybox can be changed through
`Class.Sky.SkyboxOrientation|SkyboxOrientation`.
The skybox sun, moon, and other celestial objects remain visible unless you
turn off the `Class.Sky.CelestialBodiesShown|CelestialBodiesShown` property.
By adjusting the `Class.Sky.StarCount|StarCount` property, you can change how
many stars appear in the sky at night.
This object can also be used as a cubemap for reflections in
`Class.ViewportFrame|ViewportFrames`, in which case only the `Class.Sky`
object's six‑side `Skybox[…]` properties are used. For details, see
[viewport frames](../../../ui/viewport-frames.md).
code_samples: []
inherits:
- Instance
descendants: []
tags: []
deprecation_message: ''
properties:
- name: Sky.CelestialBodiesShown
summary: |
Sets whether the sun, moon, and stars will show.
description: |
Sets whether the sun, moon, and stars will show.
code_samples: []
type: boolean
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.MoonAngularSize
summary: |
The perceived angular size of the moon while using this skybox, in
degrees.
description: |
The perceived angular size of the moon while using this skybox, in
degrees.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.MoonTextureContent
summary: ''
description: ''
code_samples: []
type: Content
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.MoonTextureId
summary: |
The texture of the moon while using this skybox.
description: |
The texture of the moon while using this skybox.
code_samples: []
type: ContentId
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxBackContent
summary: ''
description: ''
code_samples: []
type: Content
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxBk
summary: |
The URL link to a picture for the back surface of the sky.
description: |
The URL link to a picture for the back surface of the sky.
code_samples: []
type: ContentId
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxDn
summary: |
Asset ID for the bottom surface of the skybox.
description: |
Asset ID for the bottom surface of the skybox.
code_samples: []
type: ContentId
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxDownContent
summary: ''
description: ''
code_samples: []
type: Content
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxFrontContent
summary: ''
description: ''
code_samples: []
type: Content
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxFt
summary: |
Asset ID for the front surface of the skybox.
description: |
Asset ID for the front surface of the skybox.
code_samples: []
type: ContentId
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxLeftContent
summary: ''
description: ''
code_samples: []
type: Content
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxLf
summary: |
Asset ID for the left surface of the skybox.
description: |
Asset ID for the left surface of the skybox.
code_samples: []
type: ContentId
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxOrientation
summary: |
Angle of the skybox, in degrees, with rotation order of **Y**, **X**,
**Z**.
description: |
Changes the orientation of the skybox surfaces. This property takes a
`Datatype.Vector3` of degree values in the typical **XYZ** order, but
applies rotation **first** around the **Y** axis. After applying the Y
axis rotation, the orientation is applied to the **X** and **Z** axes to
allow for predictable control over complex movements. Your camera and
object orientation can affect how this rotation appears to be applied.
An easy way to script an orientation animation is to spin around the **Y**
axis (keeping the horizon level), then tilt this axis by setting **X** and
**Z** to a fixed value:
```lua
local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")
local sky = Lighting:FindFirstChild("Sky")
local ROTATION_SPEED = 5 -- In degrees per second
RunService.Heartbeat:Connect(function(deltaTime)
sky.SkyboxOrientation = Vector3.new(
30,
(sky.SkyboxOrientation.Y + ROTATION_SPEED * deltaTime) % 360,
0
)
end)
```
See [here](../../../environment/skybox.md#orientation) for further info
and limitations.
code_samples:
- Skybox-Orientation
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxRightContent
summary: ''
description: ''
code_samples: []
type: Content
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxRt
summary: |
Asset ID for the right surface of the skybox.
description: |
Asset ID for the right surface of the skybox.
code_samples: []
type: ContentId
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxUp
summary: |
Asset ID for the top surface of the skybox.
description: |
Asset ID for the top surface of the skybox.
code_samples: []
type: ContentId
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SkyboxUpContent
summary: ''
description: ''
code_samples: []
type: Content
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.StarCount
summary: |
How many stars are shown in the skybox.
description: |
How many stars are shown in the skybox. Only works if
`Class.Sky.CelestialBodiesShown|CelestialBodiesShown` is `true`.
code_samples: []
type: int
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SunAngularSize
summary: |
The perceived angular size of the sun while using this skybox, in degrees.
description: |
The perceived angular size of the sun while using this skybox, in degrees.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SunTextureContent
summary: ''
description: ''
code_samples: []
type: Content
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
- name: Sky.SunTextureId
summary: |
The texture of the sun while using this skybox.
description: |
The texture of the sun while using this skybox.
code_samples: []
type: ContentId
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Environment
methods: []
events: []
callbacks: []