wasmclient

package
v0.0.0-...-4fbace2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DemuxNoti2ObjFnMap = [...]func(me interface{}, hd gos_packet.Header, body interface{}) error{
	gos_idnoti.Invalid:   objRecvNotiFn_Invalid,
	gos_idnoti.StageInfo: objRecvNotiFn_StageInfo,
	gos_idnoti.StageChat: objRecvNotiFn_StageChat,
}

Functions

func CalcCurrentFrame

func CalcCurrentFrame(difftick int64, fps float64) int

func InitApp

func InitApp()

func ReplacePathFromHref

func ReplacePathFromHref(s string) string

Types

type Viewport

type Viewport struct {
	Canvas js.Value
	// contains filtered or unexported fields
}

func NewViewport

func NewViewport() *Viewport

func (*Viewport) AddEventListener

func (vp *Viewport) AddEventListener(evt string, fn func(this js.Value, args []js.Value) interface{})

func (*Viewport) DrawTitle

func (vp *Viewport) DrawTitle()

func (*Viewport) Focus

func (vp *Viewport) Focus()

func (*Viewport) Resized

func (vp *Viewport) Resized()

type WasmClient

type WasmClient struct {
	DoClose func()

	ServerJitter         *actjitter.ActJitter
	ClientJitter         *actjitter.ActJitter
	PingDur              int64
	ServerClientTictDiff int64

	DispInterDur *intervalduration.IntervalDuration

	KeyboardPressedMap *jskeypressmap.KeyPressMap
	// contains filtered or unexported fields
}

func (*WasmClient) CanUseCmd

func (app *WasmClient) CanUseCmd(cmd gos_idcmd.CommandID) bool

func (*WasmClient) Cleanup

func (app *WasmClient) Cleanup()

func (*WasmClient) DisplayTextInfo

func (app *WasmClient) DisplayTextInfo()

func (*WasmClient) GetEstServerTick

func (app *WasmClient) GetEstServerTick() int64

func (*WasmClient) NetInit

func (app *WasmClient) NetInit(ctx context.Context) (*gos_obj.RspLogin_data, error)

func (*WasmClient) ReqWithRspFn

func (app *WasmClient) ReqWithRspFn(cmd gos_idcmd.CommandID, body interface{},
	fn gos_pid2rspfn.HandleRspFn) error

func (*WasmClient) ReqWithRspFnWithAuth

func (app *WasmClient) ReqWithRspFnWithAuth(cmd gos_idcmd.CommandID, body interface{},
	fn gos_pid2rspfn.HandleRspFn) error

func (*WasmClient) ResizeCanvas

func (app *WasmClient) ResizeCanvas()

Jump to

Keyboard shortcuts

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