This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var asset = { | |
bitmap: [ | |
`A A A B B B`, | |
`A . . . . B`, | |
`A . 1 1 . B`, | |
`D . 2 2 . C`, | |
`D . . . . C`, | |
`D D D C C C` | |
].map(row => row.split(' ')), | |
size: 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="canvas"></canvas> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* It takes an expression and a handler object | |
* that consists of potential actual values of | |
* the given expression. | |
* | |
* The function calls either the | |
* matching method or the default defined in | |
* handler object (if defined). | |
*/ | |
function take(expression, handler) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rootTemplate(categories) { | |
return ` | |
<div class="root-container"> | |
${ getCategoryMarkup(categories) } | |
</div> | |
` | |
} | |
function itemsTemplate(items, level) { | |
return ` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="canvas"></canvas> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
function nArray(n, mapperFn) { | |
return new Array(n).join(' ').split(' ').map(mapperFn) | |
} | |
function getRandomString(length) { | |
return nArray(length, e => | |
String.fromCharCode(Math.round(Math.random() * 126)) | |
).join('') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nnoremap <silent> <leader>s :<C-u>call system('espeak ' . expand('<cword>'))<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nnoremap <silent> <leader>s :<C-u>call system('say ' . expand('<cword>'))<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<C-r>s |