1.0.12 • Published 10 years ago

tt-grid v1.0.12

Weekly downloads
1
License
ISC
Repository
-
Last release
10 years ago

Grid

TODOS

REVEAL -> transform

query

help

  • showColorHelp(bool, num)
  • showFillHelp(bool, num) (if num is provided, toggles back that many milliseconds later)

timer

  • getTime
  • setTime
  • reduceTime
  • pause

transform

  • translate
  • rotate
  • reflect
  • invert
  • for a particular color

Grid Initialisation

  • valid tilees (needs to fit with customisation options...)
  • reset (initialises with the last initialisation method, must have both color and pattern initialised)

Color Initialisation

  • uniform rows,
  • uniform columns
  • diagonals bl tr
  • diagonal tl br
  • random colors
  • color list (must be correct length)

Pattern Initialisation ( requires numInPattern )

  • random
  • list of positions (must not contain duplicates and be valid length)
  • initialise grid
  • default arrangements
  • randomised
  • copy from existing grid

API

Grid function that takes configuration options and returns and object

The object will contain

{ Grid: (component),

getStatus: (returns bool indicating if the grid is valid given the config options),

transformation: {
	shift: (move grid in a direction with wrapping),
	rotate: (rotate grid),
	
}

allowInteraction: (function, toggles interation with grid)

initialiseGrid: (takes an entire grid description, OR some simpler descriptions, ie randomPattern, randomColor, numInPattern)

}

state = { allowInteraction: bool,

height,
width,
numInPattern,


showColorHelp: bool
showFillHelp: bool


tiles: [[tiles]],

}

tile { filled: patternFilled: filledStatus:

color:
patternColor:
colorStatus:

}

Testing github markup

const markup = 75

const wow = function() {
	return 'a cow'
}

console.log(() => 'Hello')

MOVES/MANIPULATIONS

@@@ Colors

@@@ Transformations

@@@ Filled

1.0.12

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago