Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vector-devtools

vector formatter for chrome devtools. inspired by immutable-devtools

install

$ npm install vector-devtools

example

class Vec2D {
    constructor(x, y) {
        this.x = x;
        this.y = y;
    }
}

window.devtoolsFormatters = [ new vectorDevTools.VectorFormatter(Vec2D) ];

setInterval(() => {
    const t = Date.now() / 1000;
    const len = Math.sin(t * 2);
    console.log(new Vec2D(Math.cos(t) * len, Math.sin(t) * len));
}, 100);

example

how to use

  1. open chrome devtools settings
  2. check "Enable custom formatters"
  3. write and run above example

example

license

zlib

About

vector formatter for chrome devtools

Resources

Stars

46 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages