Documentation
¶
Overview ¶
Package worldsky defines project-owned, bounded skydome textures and presentation.
Index ¶
Constants ¶
const ( Version = uint16(1) EntryName = "@world/sky.bin" Feature = cartridge.FeatureWorldSkyV1 BinaryMagic = "KSK1" MaxDimension = 4096 MaxPixels = 4 * 1024 * 1024 MaxPackedImageBytes = MaxPixels*4 + 64*1024 MaxEncodedSize = 24 * 1024 * 1024 MaxDecodedBytes = 64 * 1024 * 1024 )
Variables ¶
Functions ¶
func Validate ¶
Validate checks the complete resource, including every gzip checksum, using bounded decompression scratch rather than allocating expanded panoramas.
func ValidateSettings ¶
ValidateSettings checks finite, bounded authored presentation values.
Types ¶
type Document ¶
type Document struct {
Version uint16
Settings Settings
CloudSparse *Image
CloudDense *Image
Background *Image
Horizon *Image
}
Document is independent of the frozen compiled world/environment@1 payload. Any image may be omitted, including all images for an asset-free sky.
type Image ¶
Image contains exactly one gzip member of linear, premultiplied RGBA8 pixels. Producers own PNG decoding and the sRGB-to-linear conversion.
type Settings ¶
type Settings struct {
CloudUVScale [2]float64 `yaml:"cloud_uv_scale"`
CloudDenseScrollScale float64 `yaml:"cloud_dense_scroll_scale"`
CloudDenseOffset [2]float64 `yaml:"cloud_dense_offset"`
CloudParallax [2]float64 `yaml:"cloud_parallax"`
HorizonUVScale float64 `yaml:"horizon_uv_scale"`
HorizonParallax float64 `yaml:"horizon_parallax"`
HorizonHaze float64 `yaml:"horizon_haze"`
HorizonEmission [3]float64 `yaml:"horizon_emission"`
}
Settings describes artwork mapping and decoration, without changing lighting.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings uses unmodified panorama mapping and no decorative effects.