Skip to content

Celtic Knotwork-inspired fill pattern for web pages in javascript

License

Notifications You must be signed in to change notification settings

mfhholmes/Knotwork

Repository files navigation

Knotwork sample application

Demonstration of Celtic-knotwork-inspired web page fill using javascript Marcus Holmes 2013 http://marcusholmes.biz

The code performs the following:

  • divide the parent div up into a grid of equally-sized cells so that each cell is as near 100x100px as can be
  • randomly position any child divs in the parent div and size them to the grid sizes set by their gridwide and gridtall properties
  • walk the rest of the grid and determine which borders it has, and therefore what type of cell it is
  • populate each cell with the appropriate knotwork image for that cell type

There are two knotwork image sets and two 'template' sets included, and a button to switch between them.

The code and images are copyright Marcus Holmes 2013, permission is granted for any commercial or non-commercial use provided copyright ownership is acknowledged.

About

Celtic Knotwork-inspired fill pattern for web pages in javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published