Documentation ¶
Index ¶
- Variables
- func CalcCurrentFrame(difftick int64, fps float64) int
- func InitApp()
- type Viewport
- func (vp *Viewport) AddEventListener(evt string, fn func(this js.Value, args []js.Value) interface{})
- func (vp *Viewport) Draw(tick int64)
- func (vp *Viewport) DrawTitle()
- func (vp *Viewport) Focus()
- func (vp *Viewport) Hide()
- func (vp *Viewport) Resized()
- func (vp *Viewport) Show()
- func (vp *Viewport) ThreeJsNew(name string, args ...interface{}) js.Value
- func (vp *Viewport) Zoom(state int)
- type WasmClient
- func (app *WasmClient) CanUseCmd(cmd w2d_idcmd.CommandID) bool
- func (app *WasmClient) Cleanup()
- func (app *WasmClient) DisplayTextInfo()
- func (app *WasmClient) GetEstServerTick() int64
- func (app *WasmClient) NetInit(ctx context.Context) (*w2d_obj.RspLogin_data, error)
- func (app *WasmClient) ReqWithRspFn(cmd w2d_idcmd.CommandID, body interface{}, fn w2d_pid2rspfn.HandleRspFn) error
- func (app *WasmClient) ReqWithRspFnWithAuth(cmd w2d_idcmd.CommandID, body interface{}, fn w2d_pid2rspfn.HandleRspFn) error
- func (app *WasmClient) ResizeCanvas()
Constants ¶
This section is empty.
Variables ¶
View Source
var DemuxNoti2ObjFnMap = [...]func(me interface{}, hd w2d_packet.Header, body interface{}) error{ w2d_idnoti.Invalid: objRecvNotiFn_Invalid, w2d_idnoti.StageInfo: objRecvNotiFn_StageInfo, w2d_idnoti.StatsInfo: objRecvNotiFn_StatsInfo, w2d_idnoti.StageChat: objRecvNotiFn_StageChat, }
Functions ¶
func CalcCurrentFrame ¶
Types ¶
type Viewport ¶
type Viewport struct { ViewWidth int ViewHeight int RefSize int Canvas js.Value // contains filtered or unexported fields }
func NewViewport ¶
func NewViewport() *Viewport
func (*Viewport) AddEventListener ¶
func (*Viewport) ThreeJsNew ¶
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) 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) (*w2d_obj.RspLogin_data, error)
func (*WasmClient) ReqWithRspFn ¶
func (app *WasmClient) ReqWithRspFn(cmd w2d_idcmd.CommandID, body interface{}, fn w2d_pid2rspfn.HandleRspFn) error
func (*WasmClient) ReqWithRspFnWithAuth ¶
func (app *WasmClient) ReqWithRspFnWithAuth(cmd w2d_idcmd.CommandID, body interface{}, fn w2d_pid2rspfn.HandleRspFn) error
func (*WasmClient) ResizeCanvas ¶
func (app *WasmClient) ResizeCanvas()
Click to show internal directories.
Click to hide internal directories.