Versions in this module Expand all Collapse all v1 v1.0.3 Nov 6, 2022retracted v1.0.2 Nov 6, 2022retracted v0 v0.6.1 Jul 23, 2023 v0.6.0 Jul 23, 2023 Changes in this version + const Cool + const DelayedModeExp + const DelayedModeLinear + const Good + const Kool + const Miss + const ModeAll + const ModeDrum + const ModePiano + const ModeSing + var DefaultSample = Sample + func BeatTimes(ds []*Dynamic, duration int32, meter int) (times []int32) + func DifficultyPieceTimes(dys []*Dynamic, chartDuration int32) (times []int32, durations []int32) + func Hash(r io.Reader) ([16]byte, error) + func NewComboDrawer(sprites [10]draws.Sprite, src *int, timer *draws.Timer, digitGap float64, ...) func(draws.Image) + func NewScoreSprites(fsys fs.FS, ScreenSize draws.Vector2, scale float64) [13]draws.Sprite + func SetTPS(new float64) + func ToSecond(ms int32) float64 type Chart + Difficulties func() []float64 + Duration func() int32 type ChartHeader + BackgroundFilename string + ChartHash [16]byte + CharterID int32 + MusicHash [16]byte + Tags []string + type Delayed struct + Delayed float64 + Feedback float64 + Mode int + Target float64 + func NewDelayed(src *float64) Delayed + func (d *Delayed) Update() + type Dynamic struct + BPM float64 + Highlight bool + Meter int + NewBeat bool + Next *Dynamic + Position float64 + Prev *Dynamic + Speed float64 + Time int32 + Volume float64 + func NewDynamics(f any) []*Dynamic + func NextDynamics(d *Dynamic, now int32) *Dynamic + func (d Dynamic) BeatDuration(meter int) float64 type Judgment + Weight float64 + func Evaluate(js []Judgment, e int32) Judgment + func (j Judgment) IsBlank() bool type Sample + Filename string + type ScenePlay interface + ChartHeader func() ChartHeader + DebugString func() string + Draw func(screen draws.Image) + Finish func() any + IsPaused func() bool + Now func() int32 + Pause func() + Resume func() + SetMusicOffset func(int32) + SetMusicVolume func(float64) + SetSpeedScale func() + Speed func() float64 + Update func() any + WindowTitle func() string type Timer + func (t *Timer) Pause() + func (t *Timer) Resume() + func (t *Timer) SetMusicOffset(new int32) + func (t *Timer) SetMusicPlayed(now time.Time) + func (t Timer) IsPaused() bool v0.3.1 Nov 28, 2022 Changes in this version + const Acc + const DecayFactor + const Default + const Extra + const Flow + const LevelPower + const LevelScale + const Play + const ScoreComma + const ScoreDot + const ScorePercent + const ScreenSizeX + const ScreenSizeY + const TPS + const Total + const User + const Wait + var ColorBad = color.NRGBA + var ColorCool = color.NRGBA + var ColorGood = color.NRGBA + var ColorKool = color.NRGBA + var ColorMiss = color.NRGBA + var DefaultMaxScores = [4]float64 + var DefaultSkin = &Skin + var MeterMarkColors = []color.NRGBA + var S = &UserSettings + var ToTick = times.ToTick + var ToTime = times.ToTime + var UserSettings = NewSettings() + var UserSkin = &Skin + func BPMs(transPoints []*TransPoint, duration int64) (main, min, max float64) + func Level(c interface{ ... }) (float64, [3]float64) + func LoadReplays(replayRoot string) ([]*osr.Format, error) + func NewBackground(fsys fs.FS, name string) draws.Sprite + func Normalize(v *V, min, max V) + func NormalizeKeys(names []string) []string + type BackgroundDrawer struct + Sprite draws.Sprite + func (d BackgroundDrawer) Draw(dst draws.Image) + type Chart interface + WindowTitle func() string + type ChartHeader struct + Artist string + ArtistUnicode string + ChartName string + Charter string + HolderID int64 + ID int64 + ImageFilename string + Mode int + MusicFilename string + MusicName string + MusicSource string + MusicUnicode string + PreviewTime int64 + SetID int64 + SubMode int + VideoFilename string + VideoTimeOffset int64 + func NewChartHeader(f any) (c ChartHeader) + func (c ChartHeader) WindowTitle() string + type ComboDrawer struct + Bounce float64 + Combo int + DigitGap float64 + DigitWidth float64 + Sprites [10]draws.Sprite + func (d *ComboDrawer) Update(combo int) + func (d ComboDrawer) Draw(dst draws.Image) + type Judgment struct + Acc float64 + Flow float64 + Window int64 + func Judge(js []Judgment, td int64) Judgment + func Verdict(js []Judgment, a input.KeyAction, td int64) Judgment + func (j Judgment) Is(j2 Judgment) bool + func (j Judgment) IsValid() bool + type MeterDrawer struct + Anchor draws.Sprite + Marks []MeterMark + MaxCountdown int + Meter draws.Sprite + Unit draws.Sprite + func NewMeterDrawer(js []Judgment, colors []color.NRGBA) (d MeterDrawer) + func (d *MeterDrawer) AddMark(offset int, colorType int) + func (d *MeterDrawer) Update() + func (d MeterDrawer) Draw(dst draws.Image) + func (d MeterDrawer) MarkAge(m MeterMark) float64 + type MeterMark struct + ColorType int + Countdown int + Offset int + type Number interface + type Result struct + JudgmentCounts []int + MD5 [16]byte + MaxCombo int + PlayedTime time.Time + ScoreFactors [3]float64 + Scores [4]float64 + type Sample struct + Name string + Volume float64 + func NewSample(f any) (s Sample) + func (n Sample) Path(cpath string) (string, bool) + type ScoreDrawer struct + DigitGap float64 + Score draws.Delayed + Sprites []draws.Sprite + ZeroFill int + func NewScoreDrawer(sprites []draws.Sprite) ScoreDrawer + func (d *ScoreDrawer) Update(score float64) + func (d ScoreDrawer) Draw(dst draws.Image) + type Scorer struct + Combo int + Flow float64 + JudgmentCounts []int + MaxCombo int + MaxScores [4]float64 + MaxWeights [3]float64 + Primitives [3]float64 + Ratios [3]float64 + ScoreBounds [4]float64 + ScoreFactors [3]float64 + Scores [4]float64 + Weights [3]float64 + func NewScorer(scoreFactors [3]float64) Scorer + func (s *Scorer) AddCombo() + func (s *Scorer) BreakCombo() + func (s *Scorer) CalcScore(kind int, value, weight float64) + func (s *Scorer) SetMaxScores(maxScores [4]float64) + func (s Scorer) NewResult(md5 [16]byte) Result + type Settings struct + BackgroundBrightness float64 + MeterHeight float64 + MeterUnit float64 + Offset int64 + ScoreDigitGap float64 + ScoreScale float64 + VolumeMusic float64 + VolumeSound float64 + func NewSettings() Settings + func (s *Settings) Load(src Settings) + type Skin struct + DefaultBackground draws.Sprite + Score [13]draws.Sprite + func (skin *Skin) Load(fsys fs.FS) + type Timer struct + MaxTick int + Now int64 + Offset int64 + StartTime time.Time + TPS int + Tick int + func NewTimer(duration int64, offset *int64, tps int) Timer + func (t *Timer) SetDone() + func (t *Timer) Ticker() + func (t Timer) IsDone() bool + type TransPoint struct + BPM float64 + Highlight bool + Meter int + NewBeat bool + Next *TransPoint + Position float64 + Prev *TransPoint + Speed float64 + Time int64 + Volume float64 + func NewTransPoints(f any) []*TransPoint + func (tp *TransPoint) FetchByTime(time int64) *TransPoint + func (tp TransPoint) BeatDuration() float64 v0.2.4 Nov 7, 2022 v0.2.3 Nov 6, 2022 v0.2.2 Oct 24, 2022 v0.2.1 Oct 18, 2022