wasmgraph5

command module
v0.0.0-...-f0db3ac Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

Another simple example using Go Wasm with the HTML5 Canvas (2D)

Online demo: https://justinclift.github.io/wasmGraph5/

This renders points of a basic 2D equation, and it's first derivative, onto the canvas. It uses an external library for doing the math, which seems to both bloat the resulting .wasm file, and slow things down to an extreme level. Previously this demo loaded in under a second, now it's taking 10-15+ seconds after loading to start. 😦

Use the wasd, arrow, and numpad keys (including + and -) to rotate the graph around the origin. Use the mouse wheel to zoom in and out.

The code for this started from https://github.com/stdiopt/gowasm-experiments, and has been fairly radically reworked from there. 😄

Documentation

Overview

Wasming compile: GOOS=js GOARCH=wasm go build -o main.wasm ./main.go

Jump to

Keyboard shortcuts

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