GitHubНачать

Справочник API собран из Go doc-комментариев в исходном коде и написан на английском языке.

package weather

import "github.com/nsgo-dev/game/pkg/pixelfx/weather"

Обзор

Package weather is pixelfx's weather category: aurora, blizzard, cherry blossoms, clouds, falling leaves, fireflies, fog, god rays, rain, shooting stars, snow and storm, each a pixelfx.Effect registered as "weather/<name>" when the package is imported.

Указатель

Переменные

var Aurora = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Aurora",
		Desc:     "Rippling curtains of green-to-violet light over a starfield: folding hems burn bright, rays shimmer up into violet, and the whole sky slowly breathes.",
		Tags:     []string{"weather", "aurora", "northern lights", "sky", "night", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 180},
		Duration: auroraDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#081a1e", "#0d3a36", "#13664e", "#1fa06a", "#3fd88e", "#9af7bf", "#e6fff0")},
			{Name: "upper", Default: pixelfx.Palette("#120b2a", "#26164f", "#41208a", "#6a34c0", "#9c62e8", "#d2b4ff", "#f6eeff")},
			{Name: "seed", Default: pixelfx.Num(3)},
		},
	},
	New: newAurora,
}

Aurora is rippling curtains of green-to-violet light over a starfield: folding hems burn bright, rays shimmer up into violet, and the whole sky slowly breathes. It is registered as "weather/aurora".

var Blizzard = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Blizzard",
		Desc:     "Snow driven almost flat by a gale: streaks at three depths race past, gusts throw translucent sheets of snow across the sky and spindrift streams off the drifts.",
		Tags:     []string{"weather", "blizzard", "snow", "wind", "storm", "winter", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 170},
		Duration: blizzardDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#0d111f", "#182035", "#27324d", "#3e4d6e", "#64779c", "#9cb0d0", "#d8e4f6", "#ffffff")},
			{Name: "seed", Default: pixelfx.Num(9)},
		},
	},
	New: newBlizzard,
}

Blizzard is snow driven almost flat by a gale: streaks at three depths race past, gusts throw translucent sheets of snow across the sky and spindrift streams off the drifts. It is registered as "weather/blizzard".

var CherryBlossoms = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Cherry blossoms",
		Desc:     "Pink petals flutter down on a spring breeze, tumbling in little spirals and flashing as they catch the light, with a few whole blossoms spinning among them.",
		Tags:     []string{"weather", "cherry blossom", "sakura", "petals", "spring", "wind", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 170},
		Duration: cherryDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#4a1832", "#8e3460", "#d26a94", "#f2a2c0", "#ffd2e2", "#fff4f8")},
			{Name: "seed", Default: pixelfx.Num(12)},
		},
	},
	New: newCherryBlossoms,
}

CherryBlossoms is pink petals fluttering down on a spring breeze, tumbling in little spirals and flashing as they catch the light, with a few whole blossoms spinning among them. It is registered as "weather/cherry-blossoms".

var Clouds = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Clouds",
		Desc:     "Layers of clouds drift past a bright moon at night: silver-lit tops, dark bellies, edges that flare where they cross the moon, forming and thinning as they go.",
		Tags:     []string{"weather", "clouds", "moon", "night", "sky", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 180},
		Duration: cloudsDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#0c0c18", "#16172a", "#232540", "#363a5a", "#545a80", "#8088ae", "#bcc4e2", "#f2f4ff")},
			{Name: "seed", Default: pixelfx.Num(7)},
		},
	},
	New: newClouds,
}

Clouds is layers of clouds drifting past a bright moon at night: silver-lit tops, dark bellies, edges that flare where they cross the moon, forming and thinning as they go. It is registered as "weather/clouds".

var FallingLeaves = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Falling leaves",
		Desc:     "Autumn leaves swing down through the air, tilting and flipping to show their pale backs, ride a gust, land flat in the litter and fade.",
		Tags:     []string{"weather", "leaves", "autumn", "fall", "wind", "nature", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 170},
		Duration: leavesDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#4a1d0c", "#8a3a14", "#c8621e", "#f0982e", "#ffcf72", "#fff0c4")},
			{Name: "reds", Default: pixelfx.Palette("#40101a", "#7c1c22", "#b8302a", "#e85a3c", "#ff9a72", "#ffd8c4")},
			{Name: "golds", Default: pixelfx.Palette("#3e300c", "#7a5c14", "#b8901e", "#e8c23a", "#fff09a", "#fffbe0")},
			{Name: "seed", Default: pixelfx.Num(8)},
		},
	},
	New: newFallingLeaves,
}

FallingLeaves is autumn leaves swinging down through the air, tilting and flipping to show their pale backs, riding a gust, landing flat in the litter and fading. It is registered as "weather/falling-leaves".

var Fireflies = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Fireflies",
		Desc:     "Fireflies wander over a meadow at night, each glowing up and fading on its own rhythm, trailing light and lighting the grass tips beneath them.",
		Tags:     []string{"weather", "fireflies", "night", "glow", "meadow", "nature", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 170},
		Duration: firefliesDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#2a3a10", "#5a7a1a", "#9ad02a", "#d6ff5a", "#f4ffb8", "#ffffff")},
			{Name: "grass", Default: pixelfx.Palette("#070f0b", "#0c1a12", "#13281a", "#1d3a24", "#2b5232", "#3f6e40")},
			{Name: "seed", Default: pixelfx.Num(2)},
		},
	},
	New: newFireflies,
}

Fireflies is fireflies wandering over a meadow at night, each glowing up and fading on its own rhythm, trailing light and lighting the grass tips beneath them. It is registered as "weather/fireflies".

var Fog = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Fog",
		Desc:     "Slow banks of moonlit fog at three depths drift past each other, crests catching the light, while thin streaks of mist slide by in front.",
		Tags:     []string{"weather", "fog", "mist", "haze", "night", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 170},
		Duration: fogDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#14121e", "#24213a", "#363250", "#4f4a6c", "#6d688b", "#918cab", "#bdb8d4", "#ece8f6")},
			{Name: "seed", Default: pixelfx.Num(5)},
		},
	},
	New: newFog,
}

Fog is slow banks of moonlit fog at three depths drifting past each other, crests catching the light, while thin streaks of mist slide by in front. It is registered as "weather/fog".

var GodRays = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "God rays",
		Desc:     "Shafts of light slant down from high on the left, breathing and swaying, pooling on the floor, as drifting dust motes light up whenever they cross a beam.",
		Tags:     []string{"weather", "god rays", "light", "sunbeam", "dust", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 170},
		Duration: godRaysDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#1a1208", "#3a2810", "#7a5a24", "#c89a44", "#f2d27a", "#fff2c4", "#ffffff")},
			{Name: "seed", Default: pixelfx.Num(3)},
		},
	},
	New: newGodRays,
}

GodRays is shafts of light slanting down from high on the left, breathing and swaying, pooling on the floor, as drifting dust motes light up whenever they cross a beam. It is registered as "weather/god-rays".

var Rain = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Rain",
		Desc:     "Slanted rain at four depths: far drops fade into the dark, near ones glint and splash, drops ring the puddles and a low mist drifts over the wet floor.",
		Tags:     []string{"weather", "rain", "storm", "water", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 170},
		Duration: rainDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#0e1322", "#1a2440", "#283a5e", "#3a5482", "#5674a8", "#84a6d6", "#c0dcf8", "#f2f8ff")},
			{Name: "density", Default: pixelfx.Num(1)},
			{Name: "seed", Default: pixelfx.Num(4)},
		},
	},
	New: newRain,
}

Rain is slanted rain at four depths: far drops fade into the dark, near ones glint and splash, drops ring the puddles and a low mist drifts over the wet floor. It is registered as "weather/rain".

var ShootingStars = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Shooting stars",
		Desc:     "Meteors burn across a starry sky, white heads trailing gold and rose; the big ones flare and break up, and each leaves a glowing train that twists and fades.",
		Tags:     []string{"weather", "meteor", "shooting star", "night", "sky", "stars", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 180},
		Duration: shootingStarsDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#3a1e5a", "#7a3a8a", "#e0607a", "#ffa86a", "#ffe6a8", "#ffffff")},
			{Name: "sky", Default: pixelfx.Palette("#141428", "#2a2a4a", "#4c4c7c", "#8e8ec4", "#dcdcff")},
			{Name: "seed", Default: pixelfx.Num(4)},
		},
	},
	New: newShootingStars,
}

ShootingStars is meteors burning across a starry sky, white heads trailing gold and rose; the big ones flare and break up, and each leaves a glowing train that twists and fades. It is registered as "weather/shooting-stars".

var Snow = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Snow",
		Desc:     "Snow at three depths in a gusty breeze: far specks, drifting flakes, big near crystals that spin and glow; they settle on a sparkling drift and melt away.",
		Tags:     []string{"weather", "snow", "winter", "cold", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 170},
		Duration: snowDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#0c1020", "#161d36", "#24304f", "#3a4a72", "#5f74a3", "#93abd6", "#cfe0fa", "#ffffff")},
			{Name: "seed", Default: pixelfx.Num(6)},
		},
	},
	New: newSnow,
}

Snow is snow at three depths in a gusty breeze: far specks, drifting flakes, big near crystals that spin and glow; they settle on a sparkling drift and melt away. It is registered as "weather/snow".

var Storm = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Storm",
		Desc:     "Driving rain at two depths under a churning cloud deck; a forked bolt strikes in a double flash that lights the sky and the rain, then sheet lightning glows in the clouds.",
		Tags:     []string{"weather", "storm", "rain", "lightning", "thunder", "ambient", "loop"},
		Size:     [2]int{320, 180},
		Origin:   [2]int{160, 170},
		Duration: stormDuration,
		Loop:     true,
		FPS:      30,
		BG:       "sky",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#09080f", "#121120", "#1b1a30", "#262541", "#363a5c", "#4f5d8c", "#7790c6", "#c2d6ff")},
			{Name: "bolt", Default: pixelfx.Palette("#2a1a6e", "#4835c2", "#6a6cff", "#78b8ff", "#c6ebff", "#ffffff")},
			{Name: "seed", Default: pixelfx.Num(5)},
		},
	},
	New: newStorm,
}

Storm is driving rain at two depths under a churning cloud deck; a forked bolt strikes in a double flash that lights the sky and the rain, then sheet lightning glows in the clouds. It is registered as "weather/storm".