Log inGet started
Package

sky.module

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

sky Module

Public Luau surface over the __sky Internal FFI namespace — sky type, time of day, day/night cycle, procedural parameters, presets, explicit sun direction.

Purpose

Wrap the raw __sky.* FFI namespace in a typed Luau table that gets auto-injected as _G.sky via the prelude. Set queues sky-config mutations into the scripting mutation queue; get reads back via the sky-snapshot bridge.

Usage

sky.preset("clear_day")
sky.set({ time_of_day = 14, sync_sun_to_light = true })
print(sky.getTimeOfDay())                 -- 14
sky.setSunDirection({ 0.5, -1, 0.3 })

local cfg = sky.get()
print(cfg.type, cfg.material_name, cfg.solid_color)

Exports

  • sky.set(opts) / sky.get() -> table
  • sky.setTimeOfDay(t) / sky.getTimeOfDay() -> number
  • sky.preset(name)
  • sky.setSunDirection(dir)