wasmclient

package
v0.0.0-...-948f7eb 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: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DemuxNoti2ObjFnMap = [...]func(me interface{}, hd w3d_packet.Header, body interface{}) error{
	w3d_idnoti.Invalid:   objRecvNotiFn_Invalid,
	w3d_idnoti.StageInfo: objRecvNotiFn_StageInfo,
	w3d_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

func SetPosition

func SetPosition(jso js.Value, pos ...interface{})

Types

type LightNHelper

type LightNHelper struct {
	Light  js.Value
	Helper js.Value
}

type Viewport

type Viewport struct {
	ViewWidth  int
	ViewHeight int
	RefSize    int

	CanvasGL js.Value

	Type2Radius [gameobjtype.GameObjType_Count]float64
	// 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) Draw

func (vp *Viewport) Draw()

func (*Viewport) Focus

func (vp *Viewport) Focus()

func (*Viewport) Hide

func (vp *Viewport) Hide()

func (*Viewport) ResizeCanvas

func (vp *Viewport) ResizeCanvas(title bool)

func (*Viewport) Show

func (vp *Viewport) Show()

func (*Viewport) ThreeJsNew

func (vp *Viewport) ThreeJsNew(name string, args ...interface{}) js.Value

func (*Viewport) Zoom

func (vp *Viewport) Zoom(state int)

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 w3d_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, stageUUID string) (*w3d_obj.RspLogin_data, error)

func (*WasmClient) ReqWithRspFn

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

func (*WasmClient) ReqWithRspFnWithAuth

func (app *WasmClient) ReqWithRspFnWithAuth(cmd w3d_idcmd.CommandID, body interface{},
	fn w3d_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