Documentation
¶
Index ¶
- func IsLightingEvent(e EventType) bool
- type BPMChange
- type Beatmap
- type BeatmapDifficulty
- type BeatmapSet
- type Characteristic
- type CustomData
- type CutDirection
- type Difficulty
- type DifficultyCustomData
- type EnvColor
- type EnvColorScheme
- type EnvPosition
- type EnvProfile
- type EnvProp
- type EnvironmentName
- type Event
- type EventType
- type EventTypeSet
- type EventTyper
- type EventValue
- type EventValueSet
- type Info
- type Map
- func (m *Map) ActiveDifficulty() *Difficulty
- func (m *Map) ActiveDifficultyProfile() *EnvProfile
- func (m *Map) AppendEvents(events []Event) error
- func (m *Map) Events() []Event
- func (m *Map) SaveEvents(events []Event) error
- func (m *Map) SetActiveDifficulty(characteristic Characteristic, difficulty BeatmapDifficulty) error
- func (m *Map) UnscaleTime(beat float64) Time
- type MockMap
- func (m MockMap) ActiveDifficulty() *Difficulty
- func (m MockMap) ActiveDifficultyProfile() *EnvProfile
- func (MockMap) AppendEvents(events []Event) error
- func (MockMap) Events() []Event
- func (MockMap) SaveEvents(events []Event) error
- func (m MockMap) SetActiveDifficulty(c Characteristic, d BeatmapDifficulty) error
- func (m MockMap) UnscaleTime(beat float64) Time
- type Note
- type NoteType
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLightingEvent ¶
Types ¶
type Beatmap ¶
type Beatmap struct { Difficulty BeatmapDifficulty `json:"_difficulty"` DifficultyRank int `json:"_difficultyRank"` Filename string `json:"_beatmapFilename"` NJS float64 `json:"_noteJumpMovementSpeed"` Offset float64 `json:"_noteJumpStartBeatOffset"` }
type BeatmapDifficulty ¶
type BeatmapDifficulty string
const ( BeatmapDifficultyEasy BeatmapDifficulty = "Easy" BeatmapDifficultyNormal BeatmapDifficulty = "Normal" BeatmapDifficultyHard BeatmapDifficulty = "Hard" BeatmapDifficultyExpert BeatmapDifficulty = "Expert" BeatmapDifficultyExpertPlus BeatmapDifficulty = "ExpertPlus" )
type BeatmapSet ¶
type BeatmapSet struct { Characteristic Characteristic `json:"_beatmapCharacteristicName"` Beatmaps []Beatmap `json:"_difficultyBeatmaps"` }
type Characteristic ¶
type Characteristic string
const ( CharacteristicStandard Characteristic = "Standard" CharacteristicNoArrows Characteristic = "NoArrows" CharacteristicOneSaber Characteristic = "OneSaber" Characteristic360Degree Characteristic = "360Degree" Characteristic90Degree Characteristic = "90Degree" CharacteristicLightshow Characteristic = "Lightshow" CharacteristicLawless Characteristic = "Lawless" )
type CustomData ¶
type CutDirection ¶
type CutDirection int
type Difficulty ¶
type Difficulty struct { Version string `json:"_version"` Notes []Note `json:"_notes"` Events []Event `json:"_events"` CustomData DifficultyCustomData `json:"_customData"` Extra map[string]*json.RawMessage `json:"-"` }
func (Difficulty) MarshalJSON ¶
func (d Difficulty) MarshalJSON() ([]byte, error)
func (*Difficulty) UnmarshalJSON ¶
func (d *Difficulty) UnmarshalJSON(raw []byte) error
type DifficultyCustomData ¶
type DifficultyCustomData struct { BPMChanges []BPMChange `json:"_BPMChanges"` Extra map[string]*json.RawMessage `json:"-"` }
func (DifficultyCustomData) MarshalJSON ¶
func (dcd DifficultyCustomData) MarshalJSON() ([]byte, error)
func (*DifficultyCustomData) UnmarshalJSON ¶
func (dcd *DifficultyCustomData) UnmarshalJSON(raw []byte) error
type EnvColorScheme ¶
type EnvColorScheme struct { ColorLeft EnvColor `json:"_colorLeft"` ColorRight EnvColor `json:"_colorRight"` EnvColorLeft EnvColor `json:"_envColorLeft"` EnvColorRight EnvColor `json:"_envColorRight"` ObstacleColor EnvColor `json:"_obstacleColor"` EnvColorLeftBoost EnvColor `json:"_envColorLeftBoost"` EnvColorRightBoost EnvColor `json:"_envColorRightBoost"` }
type EnvPosition ¶
type EnvProfile ¶
type EnvProfile struct { ColorScheme EnvColorScheme `json:"colorScheme"` Props map[string][]EnvProp `json:"props"` PropGroup map[int]map[int][]int `json:"-"` }
func LoadEnv ¶
func LoadEnv(envName string) (*EnvProfile, error)
func (*EnvProfile) MaxLightID ¶
func (p *EnvProfile) MaxLightID(eventType EventType) int
type EnvProp ¶
type EnvProp struct { Type int `json:"_type"` PropID int `json:"_propId"` LightID int `json:"_lightId"` Name string `json:"name"` Position EnvPosition `json:"position"` }
type EnvironmentName ¶
type EnvironmentName string
const ( EnvironmentBigMirror EnvironmentName = "BigMirrorEnvironment" EnvironmentBTS EnvironmentName = "BTSEnvironment" EnvironmentCrabRave EnvironmentName = "CrabRaveEnvironment" EnvironmentDefault EnvironmentName = "DefaultEnvironment" EnvironmentDragons EnvironmentName = "DragonsEnvironment" EnvironmentFitBeat EnvironmentName = "FitBeatEnvironment" EnvironmentGlassDesert EnvironmentName = "GlassDesertEnvironment" EnvironmentGreenDay EnvironmentName = "GreenDayEnvironment" EnvironmentGreenDayGrenade EnvironmentName = "GreenDayGrenadeEnvironment" EnvironmentInterscope EnvironmentName = "InterscopeEnvironment" EnvironmentKaleidoscope EnvironmentName = "KaleidoscopeEnvironment" EnvironmentKDA EnvironmentName = "KDAEnvironment" EnvironmentLinkinPark EnvironmentName = "LinkinParkEnvironment" EnvironmentMonstercat EnvironmentName = "MonstercatEnvironment" EnvironmentNice EnvironmentName = "NiceEnvironment" EnvironmentOrigins EnvironmentName = "OriginsEnvironment" EnvironmentPanic EnvironmentName = "PanicEnvironment" EnvironmentRocket EnvironmentName = "RocketEnvironment" EnvironmentTimbaland EnvironmentName = "TimbalandEnvironment" EnvironmentTriangle EnvironmentName = "TriangleEnvironment" )
type Event ¶
type Event struct { Time Time `json:"_time"` Type EventType `json:"_type"` Value EventValue `json:"_value"` CustomData json.RawMessage `json:"_customData,omitempty"` Extra map[string]*json.RawMessage `json:"-"` }
func (Event) MarshalJSON ¶
func (*Event) UnmarshalJSON ¶
type EventType ¶
type EventType int
const ( EventTypeInvalid EventType = -1 EventTypeBackLasers EventType = 0 EventTypeRingLights EventType = 1 EventTypeLeftRotatingLasers EventType = 2 EventTypeRightRotatingLasers EventType = 3 EventTypeCenterLights EventType = 4 EventTypeBoostLights EventType = 5 EventTypeInterscopeLeftLights EventType = 6 EventTypeInterscopeRightLights EventType = 7 EventTypeRingSpin EventType = 8 EventTypeRingZoom EventType = 9 EventTypeBPMChange EventType = 10 EventTypeUnused11 EventType = 11 EventTypeLeftRotatingLasersRotationSpeed EventType = 12 EventTypeRightRotatingLasersRotationSpeed EventType = 13 EventTypeEarlyRotation EventType = 14 EventTypeLateRotation EventType = 15 EventTypeInterscopeLowerHydraulics EventType = 16 EventTypeInterscopeRaiseHydraulics EventType = 17 )
type EventTypeSet ¶
type EventTypeSet []EventType
func NewEventTypeSet ¶
func NewEventTypeSet(eventTypes ...EventType) EventTypeSet
func (*EventTypeSet) Add ¶
func (s *EventTypeSet) Add(eventTypes ...EventType)
func (EventTypeSet) Has ¶
func (s EventTypeSet) Has(et EventType) bool
func (EventTypeSet) Pick ¶
func (s EventTypeSet) Pick(n int) EventType
func (EventTypeSet) Union ¶
func (s EventTypeSet) Union(sets ...EventTypeSet) EventTypeSet
type EventTyper ¶
type EventTyper interface {
EventType() EventType
}
type EventValue ¶
type EventValue float64
const ( EventValueInvalid EventValue = -1 EventValueLightOff EventValue = 0 EventValueLightBlueOn EventValue = 1 EventValueLightBlueFlash EventValue = 2 EventValueLightBlueFade EventValue = 3 EventValueLightUnused4 EventValue = 4 EventValueLightRedOn EventValue = 5 EventValueLightRedFlash EventValue = 6 EventValueLightRedFade EventValue = 7 )
type EventValueSet ¶
type EventValueSet []EventValue
func NewEventValueSet ¶
func NewEventValueSet(eventValues ...EventValue) EventValueSet
func (EventValueSet) Pick ¶
func (s EventValueSet) Pick(n int) EventValue
type Info ¶
type Info struct { BPM float64 `json:"_beatsPerMinute"` BeatmapSets []BeatmapSet `json:"_difficultyBeatmapSets"` EnvironmentName EnvironmentName `json:"_environmentName"` Extra map[string]*json.RawMessage `json:"-"` }
func (Info) MarshalJSON ¶
func (*Info) UnmarshalJSON ¶
type Map ¶
type Map struct { Info *Info // contains filtered or unexported fields }
func (*Map) ActiveDifficulty ¶
func (m *Map) ActiveDifficulty() *Difficulty
func (*Map) ActiveDifficultyProfile ¶
func (m *Map) ActiveDifficultyProfile() *EnvProfile
func (*Map) AppendEvents ¶
func (*Map) SaveEvents ¶
func (*Map) SetActiveDifficulty ¶
func (m *Map) SetActiveDifficulty(characteristic Characteristic, difficulty BeatmapDifficulty) error
func (*Map) UnscaleTime ¶
type MockMap ¶
type MockMap struct {
// contains filtered or unexported fields
}
func NewMockMap ¶
func NewMockMap(envName EnvironmentName, bpm float64, bpmRegionsJSON string) (MockMap, error)
func (MockMap) ActiveDifficulty ¶
func (m MockMap) ActiveDifficulty() *Difficulty
func (MockMap) ActiveDifficultyProfile ¶
func (m MockMap) ActiveDifficultyProfile() *EnvProfile
func (MockMap) AppendEvents ¶
func (MockMap) SaveEvents ¶
func (MockMap) SetActiveDifficulty ¶
func (m MockMap) SetActiveDifficulty(c Characteristic, d BeatmapDifficulty) error
func (MockMap) UnscaleTime ¶
type Note ¶
type Note struct { Time Time `json:"_time"` LineIndex int `json:"_lineIndex"` LineLayer int `json:"_lineLayer"` Type NoteType `json:"_type"` CutDirection CutDirection `json:"_cutDirection"` Extra map[string]*json.RawMessage `json:"-"` }
Click to show internal directories.
Click to hide internal directories.