shimmer

package module
v0.0.0-...-d08fb87 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: MIT Imports: 7 Imported by: 0

README

shimmer

“The shimmer is a prism but it refracts everything.”- Annihilation (2018)

Image transformation in wasm using Go.

screenshot

LIVE DEMO at https://agniva.me/shimmer/

Just a demo project done on a weekend to play with images inside the browser using WASM. Performance lag is noticeable for images over 100KB.

Setup
  • Run make build-prod
  • Serve the files using any HTTP server. (Note that .wasm files need to be served with application/wasm mime type. So the server must be capable of doing that.)
Benchmarks
name         time/op
AdjustImage   249ms ± 4%

name         alloc/op
AdjustImage  2.44MB ± 0%

name         allocs/op
AdjustImage    62.0 ± 0%

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shimmer

type Shimmer struct {
	// contains filtered or unexported fields
}

func New

func New() *Shimmer

New returns a new instance of shimmer

func (*Shimmer) Start

func (s *Shimmer) Start()

Start sets up all the callbacks and waits for the close signal to be sent from the browser.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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