chroma

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color []float64

func ColorFromColor

func ColorFromColor(c color.Color) Color

func (Color) MarshalJSON

func (c Color) MarshalJSON() ([]byte, error)

func (*Color) UnmarshalJSON

func (c *Color) UnmarshalJSON(raw []byte) error

type Gradient added in v0.0.3

type Gradient struct {
	LightGradient struct {
		Duration   float64     `json:"_duration"`
		StartColor color.Color `json:"_startColor"`
		EndColor   color.Color `json:"_endColor"`
		Easing     string      `json:"_easing"`
	} `json:"_lightGradient"`
}

func (Gradient) CustomData added in v0.0.3

func (g Gradient) CustomData() (json.RawMessage, error)

type LightID

type LightID []int

func (LightID) Has

func (l LightID) Has(t int) bool

func (LightID) MarshalJSON

func (l LightID) MarshalJSON() ([]byte, error)

func (*LightID) UnmarshalJSON

func (l *LightID) UnmarshalJSON(raw []byte) error

type PreciseLaser

type PreciseLaser struct {
	LockPosition bool          `json:"_lockPosition"`
	Speed        float64       `json:"_speed"`
	Direction    SpinDirection `json:"_direction"`
}

func (*PreciseLaser) CustomData

func (pl *PreciseLaser) CustomData() (json.RawMessage, error)

type PreciseRotation

type PreciseRotation struct {
	NameFilter  string        `json:"_nameFilter,omitempty"`
	Reset       bool          `json:"_reset,omitempty"`
	Rotation    float64       `json:"_rotation,omitempty"`
	Step        float64       `json:"_step"`
	Prop        float64       `json:"_prop,omitempty"`
	Speed       float64       `json:"_speed,omitempty"`
	Direction   SpinDirection `json:"_direction"`
	CounterSpin bool          `json:"_counterSpin,omitempty"`
}

func (PreciseRotation) CustomData

func (r PreciseRotation) CustomData() (json.RawMessage, error)

type PreciseZoom

type PreciseZoom struct {
	Step  float64 `json:"_step"`
	Speed float64 `json:"_speed,omitempty"`
}

func (*PreciseZoom) CustomData

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

type RGB

type RGB struct {
	LightID LightID     `json:"_lightID,omitempty"`
	Color   color.Color `json:"_color,omitempty"`
}

func (RGB) CustomData

func (r RGB) CustomData() (json.RawMessage, error)

type SpinDirection

type SpinDirection int
const (
	CounterClockwise SpinDirection = 0
	Clockwise        SpinDirection = 1
)

func (SpinDirection) Reverse

func (d SpinDirection) Reverse() SpinDirection

func (SpinDirection) ReverseIf

func (d SpinDirection) ReverseIf(b bool) SpinDirection

Jump to

Keyboard shortcuts

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