Include these two functions
function loadPixels() {
const imageData = ctx().getImageData(0, 0, W, H);
const pixels = imageData.data
pixels.parent = imageData
return pixels
const date = () => { | |
const offset = (new Date()).getTimezoneOffset() | |
return new Date(Date.now() - (offset*60*1000)).toISOString().split('T')[0] | |
} |
litecanvas(); | |
use(pluginDoubleTap) | |
const actor = {} | |
function init() { | |
actor.x = W/2 | |
actor.y = H/2 |
litecanvas(); | |
const taps = new Map() | |
const actor = {} | |
function init() { | |
actor.x = W/2 | |
actor.y = H/2 | |
// on "swipe" move our actor |
litecanvas() | |
const DURATION = 2 // cooldown duration in seconds | |
let cooldown = 0 // current cooldown (0 = off) | |
let buttonSize | |
function init() { | |
buttonSize = W/8 | |
} |
<?php | |
/** | |
* Multiple administrator emails | |
* @author Luiz Bills | |
*/ | |
add_filter( 'option_admin_email', function ( $value ) { | |
global $pagenow; | |
$ignored_pages = [ 'options-general.php' ]; | |
if ( in_array( $pagenow, $ignored_pages, true ) ) { |
litecanvas({ | |
width: 240, | |
height: 360, | |
// autoscale: false | |
}); | |
let bird, pipes, score, gameOver, gravity, frames; | |
function reset() { | |
bird = { x: 50, y: H/2, vy: 0, size: 12 }; |
// based on https://play.kaplayjs.com/?example=confetti | |
litecanvas({}) | |
function tapped(tapx, tapy) { | |
addConfetti({ | |
pos: vec(tapx, tapy), | |
heading: 0 | |
}) | |
} |
Create a new bookmark in your browser:
Javascript code decoded:
// based on https://fabiensanglard.net/doom_fire_psx/ | |
const FIRE_WIDTH = 128; | |
const FIRE_HEIGHT = 128; | |
litecanvas({ | |
width: FIRE_WIDTH, | |
}) | |
const firePalette = [0,0,0,0,0,0,10,10,10,10,10,10,10,10,4,4,4,4,4,4,4,4,5,5,5,5,5,5,3,3,3,3], |