Skip to content

Instantly share code, notes, and snippets.

@noomz
Last active October 11, 2015 17:02
Show Gist options
  • Save noomz/778910516e2c1982f708 to your computer and use it in GitHub Desktop.
Save noomz/778910516e2c1982f708 to your computer and use it in GitHub Desktop.
console.log('Ex 1: Simple');
draw(pyramid, { height: 5, fill: true });
console.log('Ex 2: Simple custom char');
draw(pyramid, { height: 5, fill: true, fillChar: '#' });
console.log('Ex 3: Apply filter');
draw(pyramid, { height: 5, fill: true, filters: [ filterBlock ] });
console.log('Ex 4: Apply more filters');
draw(pyramid, { height: 5, fill: true, filters: [ filterBlock, filterShadow ] });
console.log('Ex 5: Simple custom char (w/ border)');
draw(pyramid, { height: 5, fill: false });
console.log('Ex 6: Apply filter (w/ border)');
draw(pyramid, { height: 5, fill: false, filters: [ filterBlock ] });
console.log('Ex 7: Apply more filters (w/ border)');
draw(pyramid, { height: 5, fill: false, filters: [ filterBlock, filterShadow ] });
console.log('Ex 8: Change renderer');
draw(square, { size: 5, filters: [ filterBlock, filterShadow ] });
Ex 1: Simple
*
***
*****
*******
*********
Ex 2: Simple custom char
#
###
#####
#######
#########
Ex 3: Apply filter
▓▓▓
▓▓▓▓▓
▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
Ex 4: Apply more filters
▓░
▓▓▓░
▓▓▓▓▓░
▓▓▓▓▓▓▓░
▓▓▓▓▓▓▓▓▓░
░░░░░░░░░
Ex 5: Simple custom char (w/ border)
*
* *
* *
* *
*********
Ex 6: Apply filter (w/ border)
▓ ▓
▓ ▓
▓ ▓
▓▓▓▓▓▓▓▓▓
Ex 7: Apply more filters (w/ border)
▓░
▓░▓░
▓░ ▓░
▓░ ▓░
▓▓▓▓▓▓▓▓▓░
░░░░░░░░░
Ex 8: Change renderer
▓▓▓▓▓░
▓▓▓▓▓░
▓▓▓▓▓░
▓▓▓▓▓░
▓▓▓▓▓░
░░░░░
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment