Skip to main content

Getting started

Browser

For a browser based project, add the folowing script tag to your index.html file

<script src="https://cdn.jsdelivr.net/npm/pretty-grid"></script>

All pretty-grid features can now be accessed from the prettyGrid global object.

const grid = new prettyGrid.Grid(3, 5, 500, 500);
grid.every(point => ...);

A browser example project can be found here

Node

For a nodejs based project, install pretty-grid using:

npm install pretty-grid

How to import features from pretty-grid

import { Grid } from 'pretty-grid';

const grid = new Grid(3, 5, 500, 500);
grid.every(point => ...);

A node based example project can be found here



Now that you got everything ready, visit the Examples or API reference pages to start making Grids!