A referência da API é gerada a partir dos comentários de documentação Go no código-fonte e está escrita em inglês.
package transitions
import "github.com/nsgo-dev/game/pkg/pixelfx/transitions"Visão geral
Package transitions is pixelfx's transitions category: full-screen 320 x 180 wipes, irises, dissolves, blinds, CRT switch, glitch, burn and glass shatter effects, each a pixelfx.Effect registered as "transitions/<name>" when the package is imported.
Índice
Constantes
const (
// W is the screen width in pixels.
W = 320
// H is the screen height in pixels.
H = 180
)Variáveis
var Blinds = &pixelfx.Effect{
Meta: screenMeta(
"Blinds",
"Slats catch the light edge-on, then tilt shut top to bottom, lit rims glinting as warm light squeezes through the closing gaps with dust in it; then they tilt open and fade.",
[]string{"blinds", "slats", "light", "wipe"},
2.0,
pixelfx.Option{Name: "palette", Default: pixelfx.Palette("#1a120c", "#33241a", "#5a4030", "#8a6848", "#c09a6a", "#e8cc98", "#fff0cc", "#ffffff")},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(1)},
),
New: newBlinds,
}Blinds is a venetian-blinds screen transition: slats tilt shut top to bottom with warm light and dust squeezing through the closing gaps, then tilt open and fade. It is registered as "transitions/blinds".
var BurnAway = &pixelfx.Effect{
Meta: screenMeta(
"Burn away",
"The screen burns in from its edges behind a ragged ember line of licking flames, embers and smoke; then the black smoulders and burns open from the middle.",
[]string{"burn", "fire", "embers", "smoke", "wipe"},
3,
pixelfx.Option{Name: "palette", Default: pixelfx.Palette("#4a1712", "#8a1f17", "#c9281f", "#f2561d", "#ff8a2a", "#ffc23d", "#ffe26b", "#fff3a6", "#ffffff")},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(3)},
),
New: newBurnAway,
}BurnAway is a fire screen transition: the screen burns in from its edges behind a ragged ember line of licking flames, embers and smoke, then smoulders and burns open from the middle. It is registered as "transitions/burn-away".
var CRTOff = &pixelfx.Effect{
Meta: screenMeta(
"CRT off",
"The picture squeezes into a white-hot glowing line, the line into a dot that lingers as a fading afterglow; then it switches back on, dot to line to picture, with a warm-up glow.",
[]string{"crt", "tv", "retro", "switch", "wipe"},
2.0,
pixelfx.Option{Name: "palette", Default: pixelfx.Palette("#060a14", "#0e1a33", "#1a3360", "#2a5a9a", "#4a8fd0", "#8cc4f0", "#d4ecff", "#ffffff")},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(1)},
),
New: newCRTOff,
}CRTOff is a retro CRT power-off/on screen transition: the picture squeezes into a glowing line and lingering dot, then switches back on with a warm-up glow. It is registered as "transitions/crt-off".
var DiamondWipe = &pixelfx.Effect{
Meta: screenMeta(
"Diamond wipe",
"A wave of faceted diamonds swells across the screen, rims bright and ridges lit, cooling to black as they lock; then they rise as gems again and shrink away with glints.",
[]string{"diamond", "lattice", "geometric", "wipe"},
2.0,
pixelfx.Option{Name: "palette", Default: pixelfx.RampOf(pixelfx.Ramps["arcane"])},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(1)},
),
New: newDiamondWipe,
}DiamondWipe is a faceted-diamond lattice screen transition: a slanted wave of diamonds swells across the screen, cools to black as they lock, then rises and shrinks away with glints. It is registered as "transitions/diamond-wipe".
var GlitchWipe = &pixelfx.Effect{
Meta: screenMeta(
"Glitch wipe",
"Torn bands of black stutter across the screen, freezing and jerking back, their ragged edges split into magenta and cyan ghosts spitting data slivers; then they tear on through.",
[]string{"glitch", "digital", "rgb", "bands", "wipe"},
1.8,
pixelfx.Option{Name: "palette", Default: pixelfx.RampOf(pixelfx.Ramps["cyber"])},
pixelfx.Option{Name: "split", Default: pixelfx.Color("#ff2d6f")},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(1)},
),
New: newGlitchWipe,
}GlitchWipe is a digital glitch screen transition: torn bands of black stutter across the screen with RGB ghosts, data slivers and corrupted blocks, then tear on through. It is registered as "transitions/glitch-wipe".
var Iris = &pixelfx.Effect{
Meta: screenMeta(
"Iris",
"A lit iris closes onto a warm spotlight where dust drifts, holds as its rim twinkles, snaps shut into a glint, then pops open from a flash with a white-hot rim throwing sparks.",
[]string{"iris", "circle", "spotlight", "wipe"},
2.2,
pixelfx.Option{Name: "palette", Default: pixelfx.Palette("#1c140c", "#3b2a18", "#6e5233", "#a8875a", "#d9bd8a", "#f3e2bd", "#fff7e8", "#ffffff")},
pixelfx.Option{Name: "focus", Default: pixelfx.Nums(160, 100)},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(1)},
),
New: newIris,
}Iris is a circular iris screen transition: a lit iris closes onto a warm spotlight where dust drifts, snaps shut into a glint, then pops open from a flash with sparks. It is registered as "transitions/iris".
var PixelDissolve = &pixelfx.Effect{
Meta: screenMeta(
"Pixel dissolve",
"Clumps of blocks wink in, each drawn in a white outline that fills black and cools, with glints; then they wink out, outlines collapsing, the last small ones sparkling away.",
[]string{"dissolve", "pixel", "blocks", "glint"},
2.2,
pixelfx.Option{Name: "palette", Default: pixelfx.RampOf(pixelfx.Ramps["neon"])},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(1)},
),
New: newPixelDissolve,
}PixelDissolve is a blocky pixel-dissolve screen transition: clumps of blocks wink in with cooling neon outlines and glints, then collapse and sparkle away. It is registered as "transitions/pixel-dissolve".
var ShatterWipe = &pixelfx.Effect{
Meta: screenMeta(
"Shatter wipe",
"A dark glass pane drops over the screen and bounces; cracks race out from an impact with a flash, then it bursts into tumbling glass shards with lit edges that fall away.",
[]string{"shatter", "glass", "break", "shards", "wipe"},
2.8,
pixelfx.Option{Name: "palette", Default: pixelfx.Palette("#0c1430", "#162c5c", "#1f4f94", "#2f7fcc", "#58b4ec", "#9bdcff", "#d8f4ff", "#ffffff")},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(2)},
),
New: newShatterWipe,
}ShatterWipe is a glass-shatter screen transition: a dark glass pane drops and bounces, cracks race out from an impact flash, then it bursts into tumbling glass shards that fall away. It is registered as "transitions/shatter-wipe".
var SlashWipe = &pixelfx.Effect{
Meta: screenMeta(
"Slash wipe",
"A white-hot blade edge slices across the screen, light ahead of it and sparks spraying back over the cover; a second cut flashes through and the cover splits apart.",
[]string{"slash", "blade", "cut", "sparks", "wipe"},
1.7,
pixelfx.Option{Name: "palette", Default: pixelfx.Palette("#151a3d", "#212f6b", "#2c58aa", "#3a8bd8", "#62c8f4", "#b8c9e8", "#e8f1ff", "#ffffff")},
pixelfx.Option{Name: "sparks", Default: pixelfx.Palette("#fff3a6", "#ffe26b", "#ff8a2a", "#f2561d")},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(2)},
),
New: newSlashWipe,
}SlashWipe is a blade-cut screen transition: a white-hot edge slices across the screen spraying sparks, then a second diagonal cut flashes through and the cover splits apart. It is registered as "transitions/slash-wipe".
var StarIris = &pixelfx.Effect{
Meta: screenMeta(
"Star iris",
"A five-point star iris spins shut on the middle of the screen, its gold rim lit and its tips twinkling and shedding motes; it closes on a glint and spins open again from a flash.",
[]string{"iris", "star", "gold", "wipe"},
2.2,
pixelfx.Option{Name: "palette", Default: pixelfx.RampOf(pixelfx.Ramps["gold"])},
pixelfx.Option{Name: "focus", Default: pixelfx.Nums(160, 96)},
pixelfx.Option{Name: "seed", Default: pixelfx.Num(1)},
),
New: newStarIris,
}StarIris is a spinning five-point star iris screen transition: a gold-rimmed star spins shut onto the middle of the screen shedding motes, closes on a glint, and spins open again from a flash. It is registered as "transitions/star-iris".