model

package
v0.0.0-...-dd3fdab Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	HTTPHost    = "http://[::]"
	HTTPAddr    = ":8080"
	HTTPBaseURL = HTTPHost + HTTPAddr
	// Websocket sub protocol.
	WSSubprotocol   = "sdf3ui"
	ShapeEndpoint   = "/" + WSSubprotocol + "/getShape"
	SaveSTLEndpoint = "/createSTL"
	WSTimeout       = 60 * time.Minute

	WSReadLimit = 32 * kilobyte
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerStatus

type ServerStatus struct {
	ShapeSeq  uint
	ShapeName string
}

type Shape3D

type Shape3D struct {

	// Triangles has render data.
	Triangles []r3.Triangle
	// Sequence number of shape.
	Seq uint
	// contains filtered or unexported fields
}

Shape3D contains 3D shape information.

func (*Shape3D) Context

func (s *Shape3D) Context() context.Context

func (*Shape3D) Decode

func (s *Shape3D) Decode(r io.Reader) error

func (*Shape3D) Encode

func (s *Shape3D) Encode(w io.Writer) error

func (*Shape3D) SetContext

func (s *Shape3D) SetContext(ctx context.Context)

func (Shape3D) String

func (s Shape3D) String() string

type ShapeStatus

type ShapeStatus string
const (
	ShapeStale ShapeStatus = "shape is stale"
	ShapeOK    ShapeStatus = "shape is up to date"
)

Jump to

Keyboard shortcuts

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