Documentation ¶
Index ¶
- Constants
- func Demos(c Canvas, done chan struct{}, keyboardChannel *controller.KeyboardEventChannel)
- type ByNextAnniversary
- type Engine
- type Focus
- type GamePadDemo
- type GamepadDemoController
- func (c *GamepadDemoController) HandleGamepadEvent(event *controller.GamepadEvent, projection *controller.GamepadProjection)
- func (c *GamepadDemoController) HandleKeyboardEvent(event *controller.KeyboardEvent, projection *controller.KeyboardProjection)
- func (c *GamepadDemoController) Update(elapsedBetweenUpdate time.Duration) bool
- type MeteoCurrent
- type MeteoCurrentData
- type MeteoForecast
- type MeteoForecastDailyData
- type MeteoForecastData
- type NextAnniversaries
- type Person
- type Photo
- type PhotoGallery
- type Scene
- func (s *Scene) GamepadControl(gamepad *controller.Gamepad)
- func (s *Scene) KeyboardControl(keyboard *controller.Keyboard)
- func (s *Scene) Render(canvas canvas.Canvas) error
- func (s *Scene) Update(elapsedBetweenUpdate time.Duration) bool
- func (s *Scene) WithController(controller SceneController) *Scene
- func (s *Scene) WithEffect(effect effect.DynamicEffect) *Scene
- func (s *Scene) WithEffects(effects []effect.DynamicEffect) *Scene
- type SceneController
Constants ¶
View Source
const CloudyDay1 = "cloudy-day-1"
View Source
const CloudyDay2 = "cloudy-day-2"
View Source
const CloudyDay3 = "cloudy-day-3"
View Source
const Day = "day"
View Source
const FrameDurationInNanos = 33333333 // 30 FPS approximated in nanos
View Source
const Night = "night"
View Source
const Rainy = "rainy"
View Source
const UpdateDuration = time.Duration(UpdateDurationInNanos)
View Source
const UpdateDurationInNanos = 10000000 // 100 updates per second (to maintain physics & time), independent from FPS
Variables ¶
This section is empty.
Functions ¶
func Demos ¶
func Demos(c Canvas, done chan struct{}, keyboardChannel *controller.KeyboardEventChannel)
Types ¶
type ByNextAnniversary ¶
type ByNextAnniversary []Person
ByNextAnniversary implements sort.Interface based on the Birthday field.
func (ByNextAnniversary) Len ¶
func (a ByNextAnniversary) Len() int
func (ByNextAnniversary) Less ¶
func (a ByNextAnniversary) Less(i, j int) bool
func (ByNextAnniversary) Swap ¶
func (a ByNextAnniversary) Swap(i, j int)
type GamePadDemo ¶
type GamePadDemo struct {
// contains filtered or unexported fields
}
func NewGamePadDemoComponent ¶
func NewGamePadDemoComponent(canvas Canvas) *GamePadDemo
func (*GamePadDemo) Controller ¶
func (f *GamePadDemo) Controller() SceneController
func (*GamePadDemo) Draw ¶
func (f *GamePadDemo) Draw(canvas Canvas) error
type GamepadDemoController ¶
type GamepadDemoController struct {
// contains filtered or unexported fields
}
func NewGamepadDemoController ¶
func NewGamepadDemoController(bounds image.Rectangle, positionable canvas.Positionable) *GamepadDemoController
func (*GamepadDemoController) HandleGamepadEvent ¶
func (c *GamepadDemoController) HandleGamepadEvent(event *controller.GamepadEvent, projection *controller.GamepadProjection)
func (*GamepadDemoController) HandleKeyboardEvent ¶
func (c *GamepadDemoController) HandleKeyboardEvent(event *controller.KeyboardEvent, projection *controller.KeyboardProjection)
type MeteoCurrent ¶
type MeteoCurrent struct {
// contains filtered or unexported fields
}
func NewMeteoCurrentComponent ¶
func NewMeteoCurrentComponent(_ Canvas, insee string) *MeteoCurrent
func (*MeteoCurrent) Draw ¶
func (m *MeteoCurrent) Draw(canvas Canvas) error
type MeteoCurrentData ¶
type MeteoCurrentData struct {
// contains filtered or unexported fields
}
type MeteoForecast ¶
type MeteoForecast struct {
// contains filtered or unexported fields
}
func NewMeteoForecastComponent ¶
func NewMeteoForecastComponent(canvas Canvas, insee string) *MeteoForecast
func (*MeteoForecast) Draw ¶
func (m *MeteoForecast) Draw(canvas Canvas) error
type MeteoForecastDailyData ¶
type MeteoForecastDailyData struct {
// contains filtered or unexported fields
}
type MeteoForecastData ¶
type MeteoForecastData struct {
// contains filtered or unexported fields
}
type NextAnniversaries ¶
type NextAnniversaries struct {
// contains filtered or unexported fields
}
func NewNextAnniversariesComponent ¶
func NewNextAnniversariesComponent(canvas Canvas) *NextAnniversaries
func (NextAnniversaries) Draw ¶
func (na NextAnniversaries) Draw(canvas Canvas) error
type Photo ¶
type Photo struct {
// contains filtered or unexported fields
}
func NewPhotoComponent ¶
func NewPhotoComponent(canvas Canvas) *Photo
type PhotoGallery ¶
type PhotoGallery struct {
// contains filtered or unexported fields
}
func NewPhotoGalleryComponent ¶
func NewPhotoGalleryComponent(_ Canvas) *PhotoGallery
func (PhotoGallery) Draw ¶
func (p PhotoGallery) Draw(canvas Canvas) error
type Scene ¶
type Scene struct {
// contains filtered or unexported fields
}
func (*Scene) GamepadControl ¶
func (s *Scene) GamepadControl(gamepad *controller.Gamepad)
func (*Scene) KeyboardControl ¶
func (s *Scene) KeyboardControl(keyboard *controller.Keyboard)
func (*Scene) WithController ¶
func (s *Scene) WithController(controller SceneController) *Scene
func (*Scene) WithEffect ¶
func (s *Scene) WithEffect(effect effect.DynamicEffect) *Scene
func (*Scene) WithEffects ¶
func (s *Scene) WithEffects(effects []effect.DynamicEffect) *Scene
type SceneController ¶
type SceneController interface { HandleGamepadEvent(event *controller.GamepadEvent, projection *controller.GamepadProjection) HandleKeyboardEvent(event *controller.KeyboardEvent, projection *controller.KeyboardProjection) }
Click to show internal directories.
Click to hide internal directories.