0.0.4 • Published 8 years ago

mosaic.js v0.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Mosaic JS

NPM version Bower version License

Real time Delaunay triangulation! Shaded, shaped and plotted! Live Demo. Written in TypeScript, for the strict sexiness it offers. Uses Google Closure Compiler compilation passed through Rollup.js for the tree shaking love they offer.

Installation

via npm

npm i mosaic.js

via bower

bower i mosaic.js

Usage

/**
 * Mosaic is global. 
 * 
 * @param {HTMLElement} arg1 The element to which you which to render.
 * @param {Array<number>} arg2 The diffuse rgb Array
 * @param {Array<number>} arg3 The ambient rgb Array
 * @param {number} arg4 Number of triangles
 */
new Mosaic.Vandal.Mosaic(document.getElementById('vandal'), [86, 200, 148], [25, 52, 65], 250);

Build

  • npm i tsc -g
  • npm i
  • npm run build

License

MIT

Copyright(c) 2016 Marais Rossouw