Something went wrong. Try again.
r/place on the atmosphere, targeting cloudflare's free tier
Something went wrong. Try again.
12345678910111213141516171819202122232425// Per-deployment limits, set in wrangler.jsonc vars. They protect the operator's// quota from whatever a canvas record asks for.
export interface Limits { maxWidth: number; maxHeight: number; maxPaletteSize: number; minCooldownSeconds: number; allowlist: string[];}
export function limitsFromEnv(env: Env): Limits { return { maxWidth: Number(env.MAX_WIDTH), maxHeight: Number(env.MAX_HEIGHT), // Pixels are stored as one byte each. maxPaletteSize: Math.min(Number(env.MAX_PALETTE_SIZE), 256), minCooldownSeconds: Number(env.MIN_COOLDOWN_SECONDS), allowlist: String(env.CANVAS_ALLOWLIST) .split(",") .map((s) => s.trim()) .filter(Boolean), };}