You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-conway

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-conway

Conway's Game of Life in react

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

react-conway

npm Build Status Maintainability Test Coverage

Demo

Usage

import React from 'react'
import { render } from 'react-dom'
import Life from '../../lib/life'

render(
    <Life/>,
    document.getElementById('react-root')
)

Check out /example to see it in action!

Properties

className: string

When set, it will be appended to the list of class names on the display element.

seed: string

When set, it this value will determine the initial state of the simulation (also known as a seed). Otherwise, the initial state will be random.

scale: number = 4

The ratio of pixels to cell. For instance, when scale is set to 4, each cell will be 4 pixels wide and 4 pixels tall.

running: bool = true

When set to true, the simulation will progress.

framerate: number = 60

Determines how many frames should be drawn in one second. Most screens these days are running at 60fps, so there's usually no need to change it. If you're expecting to run the simulation on low-power devices, you may want to set a lower framerate.

Keywords

conway

FAQs

Package last updated on 04 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts