Nascent Plasticine Materialist
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

gof-gpu

1.0.4 • Public • Published

Conway's Game of Life Browserify module GPU

npm version

Install

$ npm install gof-gpu --save-dev

Usage

var GoL = require('gof-gpu');
var world = new GoL(howManyBlocks, speed); // speed:int
world.restart()

function update()
{
    var grid = world.update();
    // +=4 as you just need the first value of the GoL 255 or 0
    for (var i = 0; i < grid.length; i+=4) {
        var line = grid[i];
        // line[a] element true/false
    }
    
    requestAnimationFrame(update);
}

image

Live Demo

install

npm i gof-gpu

Downloadsweekly downloads

0

version

1.0.4

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability