client

package
v0.0.0-...-c6ab6a7 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cuboid

func Cuboid(size mgl32.Vec3) gogl.Object

func NewWorldState

func NewWorldState() *worldState

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(listenAddr string) *Client

func (*Client) Start

func (c *Client) Start() error

Connects to the server and starts running the loops which handle the rest of the logic

type ObjectCache

type ObjectCache map[ObjectKey]*gogl.Object

func (ObjectCache) GetOrCreate

func (c ObjectCache) GetOrCreate(key ObjectKey) (*gogl.Object, error)

func (ObjectCache) String

func (c ObjectCache) String() string

type ObjectInstance

type ObjectInstance struct {
	Parent      *gogl.Object
	ModelMatrix mgl32.Mat4
}

func (ObjectInstance) String

func (o ObjectInstance) String() string

type ObjectKey

type ObjectKey struct {
	ObjectType string
	Params     ObjectParameters
}

func (ObjectKey) String

func (o ObjectKey) String() string

type ObjectParameters

type ObjectParameters struct {
	// All parameters that any object uses will be in here.
	// Only set the ones relevant to the object being used.
	Size1 float32
	Size3 mgl32.Vec3
}

func (ObjectParameters) String

func (o ObjectParameters) String() string

Jump to

Keyboard shortcuts

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