API 레퍼런스는 소스 코드의 Go 문서 주석에서 추출되며 영어로 작성되어 있습니다.
package arcane
import "github.com/nsgo-dev/game/pkg/pixelfx/arcane"개요
Package arcane is pixelfx's arcane category: arcane beam, arcane missiles, arcane orb, blink in, blink out, magic circle cast, mana burst, portal, rune circle, spell charge, star fall and time stop, each a pixelfx.Effect registered as "arcane/<name>" when the package is imported.
색인
변수
var ArcaneBeam = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Arcane beam",
Desc: "A beam fires right from the hand: a white core, strands twisting round it, pulses running down it, a flaring source and an end that sprays sparks.",
Tags: []string{"arcane", "beam", "laser", "ray", "magic", "directional", "loop"},
Size: [2]int{264, 100},
Origin: [2]int{26, 84},
Duration: beamD,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(10)},
},
},
Act: &pixelfx.Act{
Targets: []float64{186},
Poses: []pixelfx.Key{
{T: -0.62, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
{T: -0.3, Pose: beamPull},
{T: -0.04, Pose: beamPull.With(pixelfx.Crouch.Is(5), pixelfx.Lean.Is(-4))},
{T: 0, Pose: beamAim.With(pixelfx.Crouch.Is(3)), How: "snap"},
{T: 0.3, Pose: beamAim},
{T: 0.6, Pose: beamAim.With(pixelfx.Crouch.Is(5), pixelfx.Lean.Is(3))},
{T: 0.9, Pose: beamAim},
{T: 1.2, Pose: beamAim.With(pixelfx.Crouch.Is(3))},
},
Hits: []pixelfx.Hit{
{T: 0.1, Push: pixelfx.Val(0.5), Straw: pixelfx.Val(3), Flash: pixelfx.Val(0.02), Y: pixelfx.Val(-24)},
{T: 0.7, Push: pixelfx.Val(0.5), Straw: pixelfx.Val(3), Flash: pixelfx.Val(0.02), Y: pixelfx.Val(-24)},
},
Dust: []pixelfx.DustKick{{T: 0, X: -10, N: 5, Dir: -1}},
},
New: func(o *pixelfx.Options) pixelfx.Instance {
return &pixelfx.Funcs{DrawFunc: func(p *pixelfx.Painter, t float64) { drawArcaneBeam(p, t, o) }}
},
}ArcaneBeam fires a beam right from the hand: a white core, strands twisting round it, pulses running down it, a flaring source and an end that sprays sparks. It is registered as "arcane/arcane-beam".
var ArcaneMissiles = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Arcane missiles",
Desc: "A volley of violet bolts fans out of the hand, curls round on twisting ribbons and pops on the target one after another.",
Tags: []string{"arcane", "missile", "projectile", "homing", "volley", "magic", "directional", "one-shot"},
Size: [2]int{240, 116},
Origin: [2]int{26, 88},
Duration: 1.75,
Loop: false,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(3)},
},
},
Act: &pixelfx.Act{
Targets: []float64{152},
Poses: []pixelfx.Key{
{T: -0.52, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
{T: -0.24, Pose: missGather},
{T: 0, Pose: missGather.With(pixelfx.Crouch.Is(5))},
{T: 0.05, Pose: missKick, How: "snap"},
{T: 0.1, Pose: missOpen, How: "snap"},
{T: 0.15, Pose: missKick, How: "snap"},
{T: 0.2, Pose: missOpen, How: "snap"},
{T: 0.25, Pose: missKick, How: "snap"},
{T: 0.29, Pose: missOpen, How: "snap"},
{T: 0.33, Pose: missKick, How: "snap"},
{T: 0.38, Pose: missOpen, How: "snap"},
{T: 0.43, Pose: missKick, How: "snap"},
{T: 0.48, Pose: missOpen, How: "snap"},
{T: 1.2, Pose: missOpen.With(pixelfx.Crouch.Is(3))},
{T: 1.7, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
},
Hits: []pixelfx.Hit{
missHit(0.77),
missHit(0.85),
missHit(0.95),
missHit(1.08),
{T: 1.2, Stop: 0.07, Shake: 0.14, Amp: pixelfx.Val(1), Push: pixelfx.Val(1.4), Straw: pixelfx.Val(9), Y: pixelfx.Val(-24)},
},
},
New: newArcaneMissiles,
}ArcaneMissiles fans a volley of violet bolts out of the hand; they curl round on twisting ribbons and pop on the target one after another. It is registered as "arcane/arcane-missiles".
var ArcaneOrb = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Arcane orb",
Desc: "A floating orb of smoky violet glass with a swirl turning round a white-hot heart, two tilted rings of light orbiting behind and in front.",
Tags: []string{"arcane", "orb", "sphere", "magic", "floating", "loop"},
Size: [2]int{136, 112},
Origin: [2]int{68, 104},
Duration: orbD,
Loop: true,
FPS: 30,
BG: "ground",
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(6)},
},
},
New: func(o *pixelfx.Options) pixelfx.Instance {
return &pixelfx.Funcs{
DrawBackFunc: func(p *pixelfx.Painter, t float64) { drawBackArcaneOrb(p, t, o) },
DrawFunc: func(p *pixelfx.Painter, t float64) { drawArcaneOrb(p, t, o) },
}
},
}ArcaneOrb floats an orb of smoky violet glass with a swirl turning round a white-hot heart, two tilted rings of light orbiting behind and in front. It is registered as "arcane/arcane-orb".
var BlinkIn = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Blink in",
Desc: "Glittering bits spiral in to a point of light that opens into a line, then into a white silhouette that cools into the caster.",
Tags: []string{"arcane", "blink", "teleport", "appear", "movement", "magic", "one-shot"},
Size: [2]int{136, 96},
Origin: [2]int{68, 80},
Duration: 1.4,
Loop: false,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(12)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: blinkInLanded},
{T: 0.48, Pose: blinkInLanded},
{T: 0.56, Pose: blinkInLanded.With(pixelfx.Crouch.Is(6)), How: "snap"},
{T: 0.95, Pose: pixelfx.Ready},
{T: 1.4, Pose: pixelfx.Ready},
},
Hits: []pixelfx.Hit{{T: 0.48, Stop: 0.03, Shake: 0.1, Amp: pixelfx.Val(1)}},
Dust: []pixelfx.DustKick{{T: 0.48, X: 0, N: 7}},
},
ActorAlpha: func(t float64, _ *pixelfx.Options) float64 {
if t < blinkInArrive {
return 0
}
return 1
},
New: newBlinkIn,
}BlinkIn spirals glittering bits in to a point of light that opens into a line, then into a white silhouette that cools into the caster. The stand-in character appears once the silhouette has opened. It is registered as "arcane/blink-in".
var BlinkOut = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Blink out",
Desc: "The caster crackles with gathering light, flashes white, squeezes into a line of light that collapses and pops away in sparks.",
Tags: []string{"arcane", "blink", "teleport", "vanish", "movement", "magic", "one-shot"},
Size: [2]int{136, 96},
Origin: [2]int{68, 80},
Duration: 1.6,
Loop: false,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(11)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: -0.36, Pose: pixelfx.Ready},
{T: -0.1, Pose: blinkOutIn},
{T: 0.2, Pose: blinkOutIn.With(pixelfx.Crouch.Is(5))},
{T: 0.32, Pose: blinkOutIn.With(pixelfx.Crouch.Is(0)), How: "snap"},
{T: 1.6, Pose: blinkOutIn.With(pixelfx.Crouch.Is(0))},
},
},
ActorAlpha: func(t float64, _ *pixelfx.Options) float64 {
if t < blinkOutOut {
return 1
}
return 0
},
New: newBlinkOut,
}BlinkOut makes the caster crackle with gathering light, flash white and squeeze into a line of light that collapses and pops away in sparks. The stand-in character is hidden from the flash on, when the effect draws it itself. It is registered as "arcane/blink-out".
var MagicCircleCast = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Magic circle cast",
Desc: "A circle draws itself on the floor, runes ignite one by one, it flashes, and a column of light fires up and breaks apart into glints.",
Tags: []string{"arcane", "magic", "circle", "rune", "cast", "column", "summon", "ground", "one-shot"},
Size: [2]int{200, 220},
Origin: [2]int{100, 192},
Duration: mcEnd,
Loop: false,
FPS: 30,
BG: "ground",
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(6)},
},
},
New: newMagicCircleCast,
}MagicCircleCast draws a circle on the floor, lights its runes one by one, flashes, and fires a column of light that breaks apart into glints. It is registered as "arcane/magic-circle-cast".
var ManaBurst = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Mana burst",
Desc: "Energy rushes into a point and blows out in a white flash and rings, flinging glowing runes that flare and pop into sparks one after another.",
Tags: []string{"arcane", "burst", "mana", "rune", "nova", "magic", "ground", "one-shot"},
Size: [2]int{208, 150},
Origin: [2]int{104, 124},
Duration: 1.8,
Loop: false,
FPS: 30,
BG: "ground",
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(9)},
},
},
New: newManaBurst,
}ManaBurst rushes energy into a point that blows out in a white flash and rings, flinging glowing runes that flare and pop into sparks one after another. It is registered as "arcane/mana-burst".
var Portal = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Portal",
Desc: "An upright rift: fibrous spiral arms wind down into the dark, a lit rim wobbles, motes and streaks are pulled in, the floor glows.",
Tags: []string{"arcane", "portal", "rift", "teleport", "magic", "ground", "loop"},
Size: [2]int{152, 116},
Origin: [2]int{76, 106},
Duration: portalD,
Loop: true,
FPS: 30,
BG: "ground",
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "width", Default: pixelfx.Num(17)},
{Name: "height", Default: pixelfx.Num(29)},
{Name: "seed", Default: pixelfx.Num(4)},
},
},
New: func(o *pixelfx.Options) pixelfx.Instance {
return &pixelfx.Funcs{
DrawBackFunc: func(p *pixelfx.Painter, t float64) { portalFloor(p, portalSetup(t, o)) },
DrawFunc: func(p *pixelfx.Painter, t float64) { drawPortal(p, t, o) },
}
},
}Portal opens an upright rift: fibrous spiral arms wind down into the dark, a lit rim wobbles, motes and streaks are pulled in, the floor glows. Its width and height options are the rift's half width and half height. It is registered as "arcane/portal".
var RuneCircle = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Rune circle",
Desc: "A rune circle turns on the floor in perspective: a carousel of runes lit by chasing light, a turning square, ticks, motes rising off it.",
Tags: []string{"arcane", "rune", "circle", "magic", "aura", "ground", "loop"},
Size: [2]int{136, 100},
Origin: [2]int{68, 80},
Duration: rcD,
Loop: true,
FPS: 30,
BG: "ground",
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(8)},
},
},
New: func(o *pixelfx.Options) pixelfx.Instance {
return &pixelfx.Funcs{
DrawBackFunc: func(p *pixelfx.Painter, t float64) { drawBackRuneCircle(p, t, o) },
DrawFunc: func(p *pixelfx.Painter, t float64) { drawRuneCircle(p, t, o) },
}
},
}RuneCircle turns a rune circle on the floor in perspective: a carousel of runes lit by chasing light, a turning square, ticks, motes rising off it. It is registered as "arcane/rune-circle".
var SpellCharge = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Spell charge",
Desc: "Energy gathers in the caster's hand: streaks and motes spiral in, rings collapse into a swelling orb that crackles with arcs, ready to fire.",
Tags: []string{"arcane", "charge", "spell", "orb", "cast", "magic", "loop"},
Size: [2]int{120, 86},
Origin: [2]int{44, 80},
Duration: chargeD,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(5)},
},
},
Act: &pixelfx.Act{
Poses: []pixelfx.Key{
{T: -0.46, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
{T: -0.12, Pose: chargeHold.With(pixelfx.Crouch.Is(3))},
{T: 0, Pose: chargeHold},
{T: 0.4, Pose: chargeHold.With(pixelfx.Crouch.Is(5))},
{T: 0.8, Pose: chargeHold.With(pixelfx.Lean.Is(3))},
{T: 1.2, Pose: chargeHold.With(pixelfx.Crouch.Is(5))},
{T: 1.6, Pose: chargeHold},
},
},
New: func(o *pixelfx.Options) pixelfx.Instance {
return &pixelfx.Funcs{DrawFunc: func(p *pixelfx.Painter, t float64) { drawSpellCharge(p, t, o) }}
},
}SpellCharge gathers energy in the caster's hand: streaks and motes spiral in, rings collapse into a swelling orb that crackles with arcs, ready to fire. It is registered as "arcane/spell-charge".
var StarFall = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Star fall",
Desc: "Stars streak down on long trails across an area, each landing with a white flash, a ring across the floor and a kick of sparks.",
Tags: []string{"arcane", "star", "meteor", "rain", "aoe", "magic", "ground", "one-shot"},
Size: [2]int{232, 172},
Origin: [2]int{124, 150},
Duration: 2.5,
Loop: false,
FPS: 30,
BG: "ground",
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(13)},
},
},
New: newStarFall,
}StarFall streaks stars down on long trails across an area, each landing with a white flash, a ring across the floor and a kick of sparks. It is registered as "arcane/star-fall".
var TimeStop = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Time stop",
Desc: "A clock face springs open, ticks slower and slower, freezes drained of colour, cracks, then shatters into falling shards.",
Tags: []string{"arcane", "time", "clock", "freeze", "stop", "shatter", "magic", "one-shot"},
Size: [2]int{196, 136},
Origin: [2]int{98, 118},
Duration: 3.6,
Loop: false,
FPS: 30,
BG: "ground",
Options: []pixelfx.Option{
{Name: "palette", Default: arcanePalette()},
{Name: "seed", Default: pixelfx.Num(14)},
},
},
New: newTimeStop,
}TimeStop springs a clock face open; it ticks slower and slower, freezes drained of colour, cracks, then shatters into falling shards. It is registered as "arcane/time-stop".