160x144 pixels (10:9 aspect ratio)
240x160 pixels (3:2 aspect ratio)
/** | |
* @version 1.1.1 | |
*/ | |
class SceneManager { | |
constructor(engine = globalThis) { | |
this.list = {} | |
const events = [ | |
'update', | |
'draw', | |
'tap', |
/** | |
* @version 0.1.2 | |
*/ | |
function tilemap(map, { tileWidth = 32, tileHeight = 32, tiles, engine = globalThis }) { | |
let cols = 1, | |
rows = map.length, | |
result = {}, | |
tilegrid | |
for(const line of map) { |
let particles = [], | |
colors = [3,5,7,9] | |
litecanvas({ | |
width: 256, | |
pixelart: true, | |
}) | |
function explosion(x, y, size = 64, color = 3) { | |
const max = 16 |
services: | |
memos: | |
image: neosmemo/memos:stable | |
container_name: memos | |
volumes: | |
- memos:/var/opt/memos | |
environment: | |
- SERVICE_FQDN_MEMOS_5230 |
litecanvas() | |
function init() { | |
i = 0 | |
} | |
function update(dt) { | |
// animation | |
// i += 45 * dt | |
} |
<?php | |
/** | |
* @param string[] $cols | |
* @return string[] | |
*/ | |
add_filter( 'woocommerce_account_orders_columns', function ( $cols ) { | |
$enabled = apply_filters( 'woocommerce_correios_enable_tracking_history', false ); | |
if ( $enabled ) { | |
$new_cols = []; |
// requires https://github.com/litecanvas/utils | |
import { tween } from '@litecanvas/utils' | |
/** | |
* @param {Actor} target | |
* @param {Function} callback | |
*/ | |
function wobble(target, callback = null) { | |
tween(target.scale, 'x', 1.5, 0.3, BACK_IN) | |
.chain( |
let bg, tile | |
litecanvas() | |
function init() { | |
loadImage('https://placehold.co/128', (res) => { | |
tile = res | |
bg = paint(W, H, () => { | |
// cache the tiled image | |
tiled(0, 0, W, H, tile) |
litecanvas() | |
function draw () { | |
cls(0) | |
text(0, 0, 'Hello World') | |
} |