|
This example documents all the possible options for the methods that create Chroma events. For Chroma specific details on what the options do, please refer to https://github.com/Aeroluna/Chroma. |
![]()
package main |
import ( "github.com/shasderias/ilysa" "github.com/shasderias/ilysa/beatsaber" "github.com/shasderias/ilysa/colorful" "github.com/shasderias/ilysa/context" "github.com/shasderias/ilysa/ease" "github.com/shasderias/ilysa/evt" "github.com/shasderias/ilysa/light" "github.com/shasderias/ilysa/timer" ) |
|
var ( Red = colorful.MustParseHex("#FF0000") ) |
|
func main() { m, _ := beatsaber.NewMockMap(beatsaber.EnvironmentOrigins, 120, "[]") p := ilysa.New(m) |
|
l := light.NewBasic(p, evt.BackLasers) |
|
p.Sequence(timer.Seq([]float64{0, 1, 2, 4}, 5), func(ctx context.Context) { |
|
|
|
ctx.SeqT()
|
|
|
ctx.SeqOrdinal()
|
|
|
ctx.SeqLen()
|
|
|
ctx.SeqNextB()
|
|
|
ctx.SeqNextBOffset()
|
|
|
ctx.SeqPrevB()
|
|
|
ctx.SeqPrevBOffset()
|
|
|
ctx.SeqFirst()
|
|
|
ctx.SeqLast()
|
ctx.Range(timer.Rng(0, 0.5, 6, ease.Linear), func(ctx context.Context) { |
|
|
|
ctx.B()
|
|
|
ctx.T()
|
|
|
ctx.Ordinal()
|
|
|
ctx.StartB()
|
|
|
ctx.EndB()
|
|
|
ctx.Duration()
|
|
|
ctx.First()
|
|
|
ctx.Last()
|
ctx.Light(l, func(ctx context.LightContext) { |
|
|
|
ctx.LightIDT()
|
|
|
ctx.LightIDOrdinal()
|
|
|
ctx.LightIDLen()
|
|
|
ctx.LightIDCur()
|
}) }) }) p.Dump() } |