Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Room = &room.Room{
Name: "REx Demo",
Service: "_rexdemo._tcp.",
}
Room is the room used by clients and servers for the demo.
Functions ¶
This section is empty.
Types ¶
type Demo ¶
type Demo struct { Mut *sync.Mutex `json:"-"` X float64 `json:"x"` Y float64 `json:"y"` Counter int `json:"counter"` Last time.Time `json:"last"` }
Demo is the state of a demo a copy of the state is present in the server and all clients.
type RemotePoint ¶
RemotePoint is a touch event from another client
type State ¶
type State interface {
State() *Demo
}
State is an interface satisfied by other Demo types.
type StatusPainter ¶
type StatusPainter struct {
// contains filtered or unexported fields
}
StatusPainter is an object responsible for rendering the demo status at the top of the client UI.
func NewStatusPainter ¶
func NewStatusPainter(demo State, font *truetype.Font, bg color.Color, images *glutil.Images) *StatusPainter
NewStatusPainter initializes and returns a StatusPainter.
func (*StatusPainter) Release ¶
func (p *StatusPainter) Release()
Release calls Release on underlying gl elements.
Click to show internal directories.
Click to hide internal directories.