sun

package
v0.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name ...
	Name = "sun"
	// EntitySun ...
	EntitySun = string("sun")
)
View Source
const (
	// StateAboveHorizon ...
	StateAboveHorizon = "aboveHorizon"
	// StateBelowHorizon ...
	StateBelowHorizon = "belowHorizon"
)
View Source
const (
	// AttrHorizonState ...
	AttrHorizonState = "horizonState"
	// AttrPhase ...
	AttrPhase = "phase"
	// AttrAzimuth ...
	AttrAzimuth = "azimuth"
	// AttrElevation ...
	AttrElevation = "elevation"
	// AttrSunrise ...
	AttrSunrise = "sunrise"
	// AttrSunset ...
	AttrSunset = "sunset"
	// AttrSunriseEnd ...
	AttrSunriseEnd = "sunriseEnd"
	// AttrSunsetStart ...
	AttrSunsetStart = "sunsetStart"
	// AttrDawn ...
	AttrDawn = "dawn"
	// AttrDusk ...
	AttrDusk = "dusk"
	// AttrNauticalDawn ...
	AttrNauticalDawn = "nauticalDawn"
	// AttrNauticalDusk ...
	AttrNauticalDusk = "nauticalDusk"
	// AttrNightEnd ...
	AttrNightEnd = "nightEnd"
	// AttrNight ...
	AttrNight = "night"
	// AttrGoldenHourEnd ...
	AttrGoldenHourEnd = "goldenHourEnd"
	// AttrGoldenHour ...
	AttrGoldenHour = "goldenHour"
	// AttrSolarNoon ...
	AttrSolarNoon = "solarNoon"
	// AttrNadir ...
	AttrNadir = "nadir"

	// AttrLat ...
	AttrLat = "lat"
	// AttrLon ...
	AttrLon = "lon"
)
View Source
const (
	// Sunrise ...
	Sunrise = "sunrise"
	// Sunset ...
	Sunset = "sunset"

	// SunriseEnd ...
	SunriseEnd = "sunriseEnd"
	// SunsetStart ...
	SunsetStart = "sunsetStart"

	// Dawn ...
	Dawn = "dawn"
	// Dusk ...
	Dusk = "dusk"

	// NauticalDawn ...
	NauticalDawn = "nauticalDawn"
	// NauticalDusk ...
	NauticalDusk = "nauticalDusk"

	// NightEnd ...
	NightEnd = "nightEnd"
	// Night ...
	Night = "night"

	// GoldenHourEnd ...
	GoldenHourEnd = "goldenHourEnd"
	// GoldenHour ...
	GoldenHour = "goldenHour"

	// SolarNoon ...
	SolarNoon = "solarNoon"
	// Nadir ...
	Nadir = "nadir"
)

Variables

This section is empty.

Functions

func New

func New() plugins.Plugable

New ...

func NewAttr

func NewAttr() m.Attributes

NewAttr ...

func NewSettings

func NewSettings() m.Attributes

NewSettings ...

func NewStates

func NewStates() (states map[string]entity_manager.ActorState)

NewStates ...

Types

type Actor

type Actor struct {
	entity_manager.BaseActor
	// contains filtered or unexported fields
}

Actor ...

func NewActor

func NewActor(entity *m.Entity,
	entityManager entity_manager.EntityManager,
	eventBus bus.Bus) *Actor

NewActor ...

func (*Actor) Spawn

func (e *Actor) Spawn() entity_manager.PluginActor

Spawn ...

func (*Actor) UpdateSunPosition

func (e *Actor) UpdateSunPosition(now time.Time)

UpdateSunPosition ...

type DayTime

type DayTime struct {
	MorningName string
	Time        time.Time
}

DayTime ...

type DayTimes

type DayTimes []DayTime

DayTimes ...

func (DayTimes) Len

func (l DayTimes) Len() int

Len ...

func (DayTimes) Less

func (l DayTimes) Less(i, j int) bool

Less ...

func (DayTimes) Swap

func (l DayTimes) Swap(i, j int)

Swap ...

Jump to

Keyboard shortcuts

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