added claps
This commit is contained in:
parent
9f47b066db
commit
3dab222c48
29
claps.go
Normal file
29
claps.go
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package yay
|
||||||
|
|
||||||
|
type Claps struct {
|
||||||
|
Sequence
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewClaps() *Dance {
|
||||||
|
d := &Dance{
|
||||||
|
Sequence{
|
||||||
|
Frames: [][]rune{
|
||||||
|
[]rune(`\\o`),
|
||||||
|
[]rune(`\o/`),
|
||||||
|
[]rune(`\o/`),
|
||||||
|
[]rune(`\o/`),
|
||||||
|
|
||||||
|
[]rune(`\\o`),
|
||||||
|
[]rune(`\o/`),
|
||||||
|
[]rune(`\\o`),
|
||||||
|
[]rune(`\o/`),
|
||||||
|
|
||||||
|
[]rune(`\o/`),
|
||||||
|
[]rune(`\o/`),
|
||||||
|
[]rune(`\o/`),
|
||||||
|
[]rune(`\o/`),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return d
|
||||||
|
}
|
@ -41,6 +41,15 @@ func main() {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
claps := &cobra.Command{
|
||||||
|
Use: "claps",
|
||||||
|
Short: "clap it, clap it!!",
|
||||||
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
t := yay.NewViewPort(yay.NewClaps(), time.Duration(frameRate)*time.Millisecond)
|
||||||
|
t.Run()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
version := &cobra.Command{
|
version := &cobra.Command{
|
||||||
Use: "version",
|
Use: "version",
|
||||||
Short: "prints the version to stdout",
|
Short: "prints the version to stdout",
|
||||||
@ -50,6 +59,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
main.AddCommand(shrug)
|
main.AddCommand(shrug)
|
||||||
main.AddCommand(dance)
|
main.AddCommand(dance)
|
||||||
|
main.AddCommand(claps)
|
||||||
main.AddCommand(version)
|
main.AddCommand(version)
|
||||||
main.Execute()
|
main.Execute()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user