Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelAnimationFrame ¶
func CancelAnimationFrame(id int, f ...func())
CancelAnimationFrame provides a cover for RAF using the js api cancelAnimationFrame.
func RequestAnimationFrame ¶
RequestAnimationFrame provides a cover for RAF using the js api for requestAnimationFrame.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock defines an interface which exposes methods which allow a timeloop run.
func (*Clock) Pause ¶
func (c *Clock) Pause()
Pause disabbles the clocks ticking if it has been paused.
func (*Clock) Resume ¶
func (c *Clock) Resume()
Resume enables the clocks ticking if it has been paused.
func (*Clock) Start ¶
func (c *Clock) Start(f ...func())
Start registers the clock with the animation call loop. Calls all passed in functions once the clock has being successfully registered.
func (*Clock) Stop ¶
func (c *Clock) Stop(f ...func())
Stop deregisters the clock and stops all loop calls and calls the passed in functions.
Click to show internal directories.
Click to hide internal directories.