Documentation ¶
Index ¶
- func WithLight(parent Context, l Light, callback func(ctx LightContext))
- func WithRange(parent Context, r timer.Ranger, callback func(ctx Context))
- func WithSequence(parent Context, s timer.Sequencer, callback func(ctx Context))
- type Context
- type Eventer
- type Light
- type LightContext
- type LightEventer
- type LightRGBLightingContext
- type MockLight
- type MockProject
- func (p *MockProject) AddEvents(events ...evt.Event)
- func (p *MockProject) AddRefTimingFromCtx(ctx Context)
- func (p *MockProject) Cmp(t []RefTiming)
- func (p *MockProject) Events() *[]evt.Event
- func (p *MockProject) FilterEvents(f func(e evt.Event) bool) *[]evt.Event
- func (p *MockProject) MapEvents(f func(e evt.Event) evt.Event)
- func (p *MockProject) MaxLightID(t evt.LightType) int
- func (p *MockProject) MockLight() MockLight
- func (p *MockProject) Range(r timer.Ranger, callback func(ctx Context))
- func (p *MockProject) RefTimings() []RefTiming
- func (p *MockProject) Sequence(s timer.Sequencer, callback func(ctx Context))
- type Project
- type RefTiming
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLight ¶
func WithLight(parent Context, l Light, callback func(ctx LightContext))
Types ¶
type Context ¶
type Context interface { timer.Sequence timer.Range FixedRand() float64 Eventer MaxLightID(t evt.LightType) int BOffset(float64) Context Sequence(s timer.Sequencer, callback func(ctx Context)) Range(r timer.Ranger, callback func(ctx Context)) // Beat is syntax sugar for Sequence(timer.Beat()) Beat(beat float64, callback func(ctx Context)) // BeatSequence is syntax sugar for Sequence(timer.Sequence()) BeatSequence(seq []float64, ghostBeat float64, callback func(ctx Context)) // BeatRange is syntax sugar for Range(timer.Rng()) BeatRange(startB, endB float64, steps int, easeFn ease.Func, callback func(ctx Context)) // BeatRangeInterval is syntax sugar for Range(timer.RngInterval()) BeatRangeInterval(startB, endB, interval float64, easeFn ease.Func, callback func(ctx Context)) Light(l Light, callback func(ctx LightContext)) MapEvents(func(e evt.Event) evt.Event) FilterEvents(func(e evt.Event) bool) *[]evt.Event // contains filtered or unexported methods }
func WithBOffset ¶
type Eventer ¶
type Eventer interface { NewLighting(opts ...evt.LightingOpt) *evt.Lighting NewRGBLighting(opts ...evt.RGBLightingOpt) *evt.RGBLighting NewLaser(opts ...evt.LaserOpt) *evt.Laser NewPreciseLaser(opts ...evt.PreciseLaserOpt) *evt.PreciseLaser NewRotation(opts ...evt.RotationOpt) *evt.Rotation NewPreciseRotation(opts ...evt.PreciseRotationOpt) *evt.PreciseRotation NewZoom(opts ...evt.ZoomOpt) *evt.Zoom NewPreciseZoom(opts ...evt.PreciseZoomOpt) *evt.PreciseZoom NewChromaGradient(opts ...evt.ChromaGradientOpt) *evt.ChromaGradient EZLighting(typ evt.LightType, val evt.LightValue) *evt.Lighting EZRGBLighting(color colorful.Color) *evt.RGBLighting EZLaser(laser evt.DirectionalLaser, speed int) *evt.Laser EZPreciseLaser(laser evt.DirectionalLaser, speed float64) *evt.PreciseLaser EZRotation() *evt.Rotation EZPreciseRotation(rotation, step, prop, speed float64, direction chroma.SpinDirection) *evt.PreciseRotation EZZoom() *evt.Zoom EZPreciseZoom(step float64) *evt.PreciseZoom }
type Light ¶
type Light interface { NewRGBLighting(ctx LightRGBLightingContext) evt.RGBLightingEvents LightIDLen() int Name() []string }
type LightContext ¶
type LightEventer ¶
type LightEventer interface { NewRGBLighting(opts ...evt.RGBLightingOpt) evt.RGBLightingEvents EZRGBLighting(color colorful.Color) evt.RGBLightingEvents }
type LightRGBLightingContext ¶
type LightRGBLightingContext interface { timer.Sequence timer.Range timer.Light FixedRand() float64 NewRGBLighting(opts ...evt.RGBLightingOpt) *evt.RGBLighting }
func WithLightTimer ¶ added in v0.0.7
func WithLightTimer(ctx LightRGBLightingContext, t timer.Light) LightRGBLightingContext
type MockLight ¶
type MockLight struct {
*MockProject
}
func (MockLight) LightIDLen ¶
func (MockLight) NewRGBLighting ¶
func (l MockLight) NewRGBLighting(ctx LightRGBLightingContext) evt.RGBLightingEvents
type MockProject ¶
type MockProject struct {
// contains filtered or unexported fields
}
func NewMockProject ¶
func NewMockProject(t *testing.T, maxLightID int) *MockProject
func (*MockProject) AddEvents ¶
func (p *MockProject) AddEvents(events ...evt.Event)
func (*MockProject) AddRefTimingFromCtx ¶
func (p *MockProject) AddRefTimingFromCtx(ctx Context)
func (*MockProject) Cmp ¶
func (p *MockProject) Cmp(t []RefTiming)
func (*MockProject) Events ¶ added in v0.0.2
func (p *MockProject) Events() *[]evt.Event
func (*MockProject) FilterEvents ¶ added in v0.0.6
func (*MockProject) MapEvents ¶ added in v0.0.6
func (p *MockProject) MapEvents(f func(e evt.Event) evt.Event)
func (*MockProject) MaxLightID ¶
func (p *MockProject) MaxLightID(t evt.LightType) int
func (*MockProject) MockLight ¶
func (p *MockProject) MockLight() MockLight
func (*MockProject) RefTimings ¶
func (p *MockProject) RefTimings() []RefTiming
Click to show internal directories.
Click to hide internal directories.