Skip to content

Procedurally generate a simple grid of hexadecimal characters

License

Notifications You must be signed in to change notification settings

moebrowne/hex-grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hex Grid

Procedurally draws a random set of 'sectors' to a canvas. Designed to be a sort of active background.

Use

Add the following HTML to your document body. The library will automatically size the canvas so that it fills the window

<canvas id="cont" style="position: fixed;"></canvas>

<script src="app.js"></script>

<script>
    hexGrid.init(document.getElementById("cont"));
</script>

Options

There is an options property of the hexGrid object that contains a number of variables that can be used to change the way the grid is rendered

Screen Shot

Hex Grid In Action