script editor

This commit is contained in:
2023-10-06 13:15:19 +02:00
parent 13da56009e
commit e06cf1ae34
35 changed files with 776 additions and 68 deletions
+3 -3
View File
@@ -7,9 +7,9 @@ import (
)
type Solid struct {
States []device.State `json:"states,omitempty"`
AnimationMS int64 `json:"animationMs,omitempty"`
Interleave int `json:"interleave,omitempty"`
States []device.State `json:"states"`
AnimationMS int64 `json:"animationMs"`
Interleave int `json:"interleave"`
}
func (e Solid) State(_, length, round int) device.State {
+4 -4
View File
@@ -7,10 +7,10 @@ import (
)
type Gradient struct {
States []device.State `json:"states,omitempty"`
AnimationMS int64 `json:"animationMs,omitempty"`
Reverse bool `json:"reverse,omitempty"`
Interpolate bool `json:"interpolate,omitempty"`
States []device.State `json:"states"`
AnimationMS int64 `json:"animationMs"`
Reverse bool `json:"reverse"`
Interpolate bool `json:"interpolate"`
}
func (e Gradient) State(index, length, round int) device.State {
+2 -2
View File
@@ -7,8 +7,8 @@ import (
)
type Pattern struct {
States []device.State `json:"states,omitempty"`
AnimationMS int64 `json:"animationMs,omitempty"`
States []device.State `json:"states"`
AnimationMS int64 `json:"animationMs"`
}
func (e Pattern) State(index, _, round int) device.State {
+3 -3
View File
@@ -8,9 +8,9 @@ import (
)
type Random struct {
States []device.State `json:"states,omitempty"`
Interpolate bool `json:"interpolate,omitempty"`
AnimationMS int64 `json:"animationMs,omitempty"`
States []device.State `json:"states"`
Interpolate bool `json:"interpolate"`
AnimationMS int64 `json:"animationMs"`
}
func (e Random) State(_, _, _ int) device.State {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
)
type VRange struct {
States []device.State `json:"states,omitempty"`
States []device.State `json:"states"`
Variable string `json:"variable"`
Min float64 `json:"min"`
Max float64 `json:"max"`