Home
Softono

React Pixel Grid

Open source MIT JavaScript
18
Stars
2
Forks
13
Issues
1
Watchers
7 months
Last Commit

 About React Pixel Grid

Render a grid of squares to a webgl canvas.

Platforms

Web Self-hosted

Languages

JavaScript

Links

Need Help Installing React Pixel Grid?

We provide expert installation service for this software. Our team will install, configure, and secure React Pixel Grid on your server. plans start at just $30.

React Pixel Grid

View on GitHub

react-pixel-grid     Latest Version

A simple component that wraps freeman-lab/pixel-grid.

npm install react-pixel-grid

Demo

Usage

screenshot

import PixelGrid from "react-pixel-grid";

<PixelGrid
  data={Array(64).fill(0).map(Math.random)}
  options={{
    size: 10,
    padding: 2,
    background: [0, 0.5, 1],
  }}
/>

screenshot2

const r = "#f00";
const g = "#0f0";
const b = "#00f";
const x = "#000";

<PixelGrid data={[
    x, r, x, g, x, b, 
    r, x, g, x, b, x, 
    x, r, x, g, x, b, 
    r, x, g, x, b, x, 
    x, r, x, g, x, b, 
    r, x, g, x, b, x,
]} />