npm

Need private packages and team management tools?Check out npm Orgs. »

heap-grid

1.0.1 • Public • Published

Heap Grid

Demo

Github Demo

Description

Randomly position elements based on heap permutations

Installation

npm install heap-grid

Usage

import HeapGrid from 'heap-grid';
 
var gridEl = document.getElementById('grid');
var grid = new HeapGrid(gridEl, { size: 250 });
 
var elements = [] // GRID ELEMENTS;
                
for (var i = 0; i < elements.length; i++) {
    var style = grid.place();
    for (var s of style) {
        elements[i].style[s] = style[s];
    }
}

Keywords

none

install

npm i heap-grid

Downloadsweekly downloads

3

version

1.0.1

license

ISC

last publish

collaborators

  • avatar
Report a vulnerability