1.2.2 • Published 3 years ago

react-gol v1.2.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Game of Life component for react

A simple React component adds Conway's Game of Life to your website.

Installation

Install react-gol from NPM

npm i react-gol

Usage

Import ReactGol and add it to your project like so

import ReactGol from 'react-gol'

function App() {
  return (
    <div>
      <ReactGol />
    </div>
  );
}

Config

Avaliable props

    cellSize: Number        // (default: 12);
    minFrameTime: Number    // (default: 100);
    fillStyle: String       // (default: '#EEEEEE');
    motionBlur: Number      // (default: 50);
    initialCoverage: Number // (default: .125);

To customise this component, pass in props like so

import ReactGol from 'react-gol'

function App() {
  return (
    <div>
      <ReactGol cellSize={4} motionBlur={0} fillStyle={'red'} />
    </div>
  );
}
1.2.2

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago