Noah Petherbridge
6def8f7625
* Fix collision detection to allow actors to walk up slopes smoothly, without losing any horizontal velocity. * Fix scrolling a level canvas so that chunks near the right or bottom edge of the viewpoint were getting culled prematurely. * Centralize JavaScript exception catching logic to attach Go and JS stack traces where possible to be more useful for debugging. * Performance: flush all SDL2 textures from memory between scene transitions in the app. Also add a `flush-textures` dev console command to flush the textures at any time - they all should regenerate if still needed based on underlying go.Images which can be garbage collected.
32 lines
520 B
Go
32 lines
520 B
Go
//go:build js && wasm
|
|
// +build js,wasm
|
|
|
|
package native
|
|
|
|
import (
|
|
"errors"
|
|
"image"
|
|
|
|
"git.kirsle.net/go/render"
|
|
)
|
|
|
|
func HasTouchscreen(e render.Engine) bool {
|
|
return false
|
|
}
|
|
|
|
func TextToImage(e render.Engine, text render.Text) (image.Image, error) {
|
|
return nil, errors.New("not supported on WASM")
|
|
}
|
|
|
|
func CopyToClipboard(text string) error {
|
|
return errors.New("not supported on WASM")
|
|
}
|
|
|
|
func CountTextures(e render.Engine) string {
|
|
return "n/a"
|
|
}
|
|
|
|
func FreeTextures() {}
|
|
|
|
func MaximizeWindow(e render.Engine) {}
|