evt

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2022 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(e Event, opts ...Opt)

func WithAlpha

func WithAlpha(a float64) withAlphaOpt

func WithBOffset

func WithBOffset(o float64) withBeatOffsetOpt

func WithBeat

func WithBeat(b float64) withBeatOpt

func WithColor

func WithColor(c color.Color) withColorOpt

func WithCounterSpin

func WithCounterSpin(c bool) withCounterSpinOpt

WithCounterSpin causes the smaller ring to spin in the opposite direction

func WithDirectionalLaser

func WithDirectionalLaser(dl DirectionalLaser) withDirectionalLaserOpt

func WithDuration added in v0.0.3

func WithDuration(beats float64) withDurationOpt

func WithEasing added in v0.0.3

func WithEasing(easeFn ease.Func) withEasingOpt

func WithEndColor added in v0.0.3

func WithEndColor(c color.Color) withEndColorOpt

func WithIntValue

func WithIntValue(v int) withIntValueOpt

func WithLaserDirection

func WithLaserDirection(d chroma.SpinDirection) withDirectionOpt

WithLaserDirection set the spin direction

func WithLaserSpeed

func WithLaserSpeed(v int) withLaserSpeedOpt

func WithLight

func WithLight(l LightType) withLightOpt

func WithLightID

func WithLightID(id lightid.ID) withLightIDOpt

func WithLightValue

func WithLightValue(v LightValue) withLightValueOpt

func WithLockPosition

func WithLockPosition(b bool) withLockPositionOpt

WithLockPosition will not reset laser positions when true

func WithNameFilter

func WithNameFilter(filter string) withNameFilterOpt

WithNameFilter causes event to only affect rings with the name filter (e.g. SmallTrackLaneRings, BigTrackLaneRings).

func WithPreciseLaserSpeed

func WithPreciseLaserSpeed(s float64) withPreciseLaserSpeedOpt

WithPreciseLaserSpeed is identical to just setting value, but allows for decimals. Will overwrite value (Because the game will randomize laser position on anything other than value 0, a small trick you can do is set value to 1 and _preciseSpeed to 0, creating 0 s lasers with a randomized position).

func WithProp

func WithProp(p float64) withPropOpt

WithProp dictates the rate at which rings behind the first one have physics applied to them. High value makes all rings move simultaneously, low value gives them significant delay.

func WithReset

func WithReset(r bool) withResetOpt

WithReset resets the rings when set to true (overwrites other values below)

func WithRotation

func WithRotation(r float64) withRotationOpt

WithRotation dictates how far the first ring will spin

func WithRotationDirection

func WithRotationDirection(d chroma.SpinDirection) withRotationDirectionOpt

WithRotationDirection dictates the direction to spin the rings

func WithRotationSpeed

func WithRotationSpeed(s float64) withRotationSpeedOpt

WithRotationSpeed dictates the s multiplier of the rings

func WithRotationStep

func WithRotationStep(s float64) withRotationStepOpt

WithRotationStep dictates how much rotation is added between each ring

func WithStartColor added in v0.0.3

func WithStartColor(c color.Color) withStartColorOpt

func WithTag added in v0.0.6

func WithTag(tag ...string) withTagOpt

func WithZoomSpeed added in v0.0.15

func WithZoomSpeed(s float64) withZoomSpeedOpt

WithZoomSpeed dictates how quickly each ring will move to its new position

func WithZoomStep

func WithZoomStep(s float64) withZoomStepOpt

WithZoomStep dictates how much position offset is added between each ring

Types

type Base

type Base struct {
	// contains filtered or unexported fields
}

func NewBase

func NewBase(opts ...BaseOpt) Base

func (Base) Beat

func (e Base) Beat() float64

func (*Base) ClearTag added in v0.0.6

func (e *Base) ClearTag(tag string)

func (*Base) HasTag added in v0.0.6

func (e *Base) HasTag(tag ...string) bool

HasTag returns true if the event is tagged with any one of tag.

func (*Base) SetBeat

func (e *Base) SetBeat(b float64)

func (*Base) SetTag added in v0.0.6

func (e *Base) SetTag(tag string)

func (*Base) SetType

func (e *Base) SetType(t beatsaber.EventType)

func (*Base) SetValue

func (e *Base) SetValue(v beatsaber.EventValue)

func (Base) Type

func (e Base) Type() beatsaber.EventType

func (Base) Value

func (e Base) Value() beatsaber.EventValue

type BaseOpt

type BaseOpt interface {
	// contains filtered or unexported methods
}

func WithInvalidDefaults

func WithInvalidDefaults() BaseOpt

func WithRGBLightingDefaults

func WithRGBLightingDefaults() BaseOpt

func WithType

func WithType(t beatsaber.EventType) BaseOpt

func WithValue

func WithValue(t beatsaber.EventValue) BaseOpt

type ChromaGradient added in v0.0.3

type ChromaGradient struct {
	Base
	chroma.Gradient
}

func NewChromaGradient added in v0.0.3

func NewChromaGradient(opts ...ChromaGradientOpt) ChromaGradient

func (*ChromaGradient) Apply added in v0.0.3

func (e *ChromaGradient) Apply(opts ...ChromaGradientOpt)

type ChromaGradientOpt added in v0.0.3

type ChromaGradientOpt interface {
	// contains filtered or unexported methods
}

type DirectionalLaser

type DirectionalLaser int
const (
	LeftLaser  DirectionalLaser = 0
	RightLaser DirectionalLaser = 1
)

type Event

type Event interface {
	Beat() float64
	SetBeat(float64)
	Type() beatsaber.EventType
	SetType(beatsaber.EventType)
	Value() beatsaber.EventValue
	SetValue(value beatsaber.EventValue)

	HasTag(tag ...string) bool
	SetTag(tag string)
	ClearTag(tag string)

	CustomData() (json.RawMessage, error)
}

type Events

type Events []Event

func NewEvents

func NewEvents(events ...Event) Events

func (*Events) Add

func (events *Events) Add(newEvents ...Event)

func (Events) Apply

func (events Events) Apply(opts ...Opt)

type Laser

type Laser struct {
	Base
}

func NewLaser

func NewLaser(opts ...LaserOpt) Laser

func (*Laser) Apply

func (e *Laser) Apply(opts ...LaserOpt)

func (Laser) CustomData

func (e Laser) CustomData() (json.RawMessage, error)

type LaserOpt

type LaserOpt interface {
	// contains filtered or unexported methods
}

type LightType

type LightType int
const (
	BackLasers            LightType = 0
	RingLights            LightType = 1
	LeftRotatingLasers    LightType = 2
	RightRotatingLasers   LightType = 3
	CenterLights          LightType = 4
	BoostLights           LightType = 5
	InterscopeLeftLights  LightType = 6
	InterscopeRightLights LightType = 7
)

type LightValue

type LightValue int
const (
	LightOff       LightValue = 0
	LightBlueOn    LightValue = 1
	LightBlueFlash LightValue = 2
	LightBlueFade  LightValue = 3
	LightUnused4   LightValue = 4
	LightRedOn     LightValue = 5
	LightRedFlash  LightValue = 6
	LightRedFade   LightValue = 7
)

type Lighting

type Lighting struct {
	Base
}

func NewLighting

func NewLighting(opts ...LightingOpt) Lighting

func (*Lighting) Apply

func (e *Lighting) Apply(opts ...LightingOpt)

func (*Lighting) CustomData

func (e *Lighting) CustomData() (json.RawMessage, error)

type LightingOpt

type LightingOpt interface {
	// contains filtered or unexported methods
}

type Opt

type Opt interface {
	// contains filtered or unexported methods
}

type Option

type Option interface {
}

type Opts

type Opts []Opt

func NewOpts

func NewOpts(opts ...Opt) Opts

func (*Opts) Add

func (o *Opts) Add(opts ...Opt)

type PreciseLaser

type PreciseLaser struct {
	Base
	chroma.PreciseLaser
}

func NewPreciseLaser

func NewPreciseLaser(opts ...PreciseLaserOpt) PreciseLaser

func (*PreciseLaser) Apply

func (e *PreciseLaser) Apply(opts ...PreciseLaserOpt)

type PreciseLaserOpt

type PreciseLaserOpt interface {
	// contains filtered or unexported methods
}

type PreciseRotation

type PreciseRotation struct {
	Base
	chroma.PreciseRotation
}

func NewPreciseRotation

func NewPreciseRotation(opts ...PreciseRotationOpt) PreciseRotation

func (*PreciseRotation) Apply

func (e *PreciseRotation) Apply(opts ...PreciseRotationOpt)

type PreciseRotationOpt

type PreciseRotationOpt interface {
	// contains filtered or unexported methods
}

type PreciseZoom

type PreciseZoom struct {
	Base
	chroma.PreciseZoom
}

func NewPreciseZoom

func NewPreciseZoom(opts ...PreciseZoomOpt) PreciseZoom

func (*PreciseZoom) Apply

func (e *PreciseZoom) Apply(opts ...PreciseZoomOpt)

type PreciseZoomOpt

type PreciseZoomOpt interface {
	// contains filtered or unexported methods
}

type RGBLighting

type RGBLighting struct {
	Base
	chroma.RGB
}

func NewRGBLighting

func NewRGBLighting(opts ...RGBLightingOpt) RGBLighting

func (*RGBLighting) Alpha

func (e *RGBLighting) Alpha() float64

func (*RGBLighting) Apply

func (e *RGBLighting) Apply(opts ...RGBLightingOpt)

func (*RGBLighting) Color

func (e *RGBLighting) Color() color.Color

func (*RGBLighting) SetAlpha

func (e *RGBLighting) SetAlpha(a float64)

func (*RGBLighting) SetColor

func (e *RGBLighting) SetColor(c color.Color)

func (*RGBLighting) SetLight

func (e *RGBLighting) SetLight(lightType LightType) *RGBLighting

func (*RGBLighting) SetLightID

func (e *RGBLighting) SetLightID(id lightid.ID)

func (*RGBLighting) SetSingleLightID

func (e *RGBLighting) SetSingleLightID(id int)

type RGBLightingEvents

type RGBLightingEvents []*RGBLighting

func (*RGBLightingEvents) Add

func (events *RGBLightingEvents) Add(newEvents ...*RGBLighting)

func (RGBLightingEvents) Apply

func (events RGBLightingEvents) Apply(opts ...RGBLightingOpt)

type RGBLightingOpt

type RGBLightingOpt interface {
	// contains filtered or unexported methods
}

type Rotation

type Rotation struct {
	Base
}

func NewRotation

func NewRotation(opts ...RotationOpt) Rotation

func (Rotation) Apply

func (e Rotation) Apply(opts ...RotationOpt)

func (Rotation) CustomData

func (e Rotation) CustomData() (json.RawMessage, error)

type RotationOpt

type RotationOpt interface {
	// contains filtered or unexported methods
}

type Zoom

type Zoom struct {
	Base
}

func NewZoom

func NewZoom(opts ...ZoomOpt) Zoom

func (*Zoom) Apply

func (e *Zoom) Apply(opts ...ZoomOpt)

func (Zoom) CustomData

func (e Zoom) CustomData() (json.RawMessage, error)

type ZoomOpt

type ZoomOpt interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL