wonder

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

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 9 Imported by: 0

README

wonder

wonder is intended to increase your desire to see the world around you.

What is there to wonder about?

Your brain is smart. It takes shortcuts. For example, you likely don't need to think about how to start your car and drive to work: your brain has trained you to do that without hardly thinking. Another shortcut your brain takes is with color. Science tells us each color is a different wavelength. White light is different: it contains all of the wavelengths of the visible spectrum. However, when we look at white light, our brains don't say "I see red, orange, yellow, green, blue, indigo, and purple" but rather say "I see white". It's a shortcut that our brains take.

How does this matter in my day to day life?

One way to interpret this shortcut is to realize that our lives and the world around us have so much more information than we are able to interpret or perceive. Another thing to keep in mind is that screens may do a good job of mimicking the real world, but most screens only have red/green/blue pixels to show you. That means they operate because of the shortcuts your brain takes. It also means the next time you see a yellow banana, that's scientifically impossible for your phone to capture and relay that image back to you (at the same wavelength).

To me, this also was enough inspiration to dig into golang + WebAssembly and build a weekend project to filter out the colors that your screen displays back to you. This project is an attempt to wonder at the world around us and to learn a little more code.

How to run
  1. Clone this repo.
  2. Run make build-prod serve. This builds the wasm output and then serves the minimal html locally.
  3. Go to http://localhost:3434/.
  4. This will ask for access to your webcam. Now you can change the radio buttons to modify the color of the video.
    • Additionally, there's currently an option to "upload an image" which will apply the effect once to that image.
Many thanks to the internet

This work started as a copy of shimmer, and then I mixed it with the tutorial here to learn about webcam interaction.

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wonder

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

func New

func New() *Wonder

New returns a new instance of shimmer

func (*Wonder) Start

func (w *Wonder) 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