0.0.20 • Published 8 years ago
react-mosaic v0.0.20
react-mosaic
Generate mosaic images in react.
https://chitchu.github.io/react-mosaic/
Getting started
$ npm install react-mosaic
import React from 'react';
import Mosaic from 'react-mosaic';
const imageSource = 'data:image/png;base64, ...'; //requires base64 encoded image
// If you don't pass a `tileRenderer` function the
// component will render each tile with a boring box.
const tileRenderer = props => (
<circle cx={props.x} cy={props.y} r={6} fill={props.fill} key={props.key} />
);
const App = () => (
<Mosaic src={imageSource} tileSize="12" width="800" height="450" tileRenderer={tileRenderer} />
);
export default App;
0.0.20
8 years ago
0.0.19
8 years ago
0.0.17
8 years ago
0.0.16
8 years ago
0.0.15
9 years ago
0.0.14
9 years ago
0.0.13
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
9 years ago
0.0.9
9 years ago
0.0.8
9 years ago
0.0.7
9 years ago
0.0.6
9 years ago
0.0.5
9 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago