Documentation ¶
Index ¶
- func GenerateImage(in *pb.ImageRequest, generator ImageGenerator, seed int64) (*pb.ImageResponse, error)
- func Init()
- type Bounce
- func (s *Bounce) Draw(ctx *gg.Context) (image.Image, error)
- func (s *Bounce) GetContextDimensions() (int, int)
- func (s *Bounce) GetFramesAmount() int
- func (s *Bounce) GetPostURL() string
- func (s Bounce) GetQueueCapacity() int
- func (s *Bounce) Init(seed int64) (ImageGenerator, error)
- func (s *Bounce) Update() error
- type Fluid
- func (s *Fluid) Draw(ctx *gg.Context) (image.Image, error)
- func (s *Fluid) GetContextDimensions() (int, int)
- func (s *Fluid) GetFramesAmount() int
- func (s *Fluid) GetPostURL() string
- func (s Fluid) GetQueueCapacity() int
- func (s *Fluid) Init(seed int64) (ImageGenerator, error)
- func (s *Fluid) Update() error
- type ImageGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateImage ¶
func GenerateImage(in *pb.ImageRequest, generator ImageGenerator, seed int64) (*pb.ImageResponse, error)
Generates the image from the passed generator
Types ¶
type Bounce ¶
type Bounce struct {
// contains filtered or unexported fields
}
func (*Bounce) GetContextDimensions ¶
func (*Bounce) GetFramesAmount ¶
func (*Bounce) GetPostURL ¶
func (Bounce) GetQueueCapacity ¶
type Fluid ¶
type Fluid struct {
// contains filtered or unexported fields
}
func (*Fluid) GetContextDimensions ¶
func (*Fluid) GetFramesAmount ¶
func (*Fluid) GetPostURL ¶
func (Fluid) GetQueueCapacity ¶
type ImageGenerator ¶
type ImageGenerator interface { // Initialise the generator Init(int64) (ImageGenerator, error) // Gets called sequentially once per frame Update() error Draw(*gg.Context) (image.Image, error) // Getters for constants GetFramesAmount() int GetContextDimensions() (int, int) // Width x Height GetPostURL() string // How many jobs of this generator can run at once GetQueueCapacity() int }
Click to show internal directories.
Click to hide internal directories.