mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 12:59:39 +02:00
- apps/bauntown: Developer community website (Astro landing) - apps/presi: Presentation project - games/voxel-lava: Voxel lava game (SvelteKit) - games/whopixels: Whopixels game 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
68 lines
2.4 KiB
HTML
68 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Create Placeholder Images</title>
|
|
</head>
|
|
<body>
|
|
<h1>Creating placeholder images...</h1>
|
|
<canvas id="backgroundCanvas" width="800" height="600" style="display: none;"></canvas>
|
|
<canvas id="playerCanvas" width="32" height="32" style="display: none;"></canvas>
|
|
<canvas id="tileCanvas" width="32" height="32" style="display: none;"></canvas>
|
|
|
|
<div id="downloadLinks"></div>
|
|
|
|
<script>
|
|
// Create background image
|
|
const bgCanvas = document.getElementById('backgroundCanvas');
|
|
const bgCtx = bgCanvas.getContext('2d');
|
|
bgCtx.fillStyle = '#222233';
|
|
bgCtx.fillRect(0, 0, 800, 600);
|
|
|
|
// Add some pattern to background
|
|
bgCtx.fillStyle = '#1a1a2a';
|
|
for (let i = 0; i < 100; i++) {
|
|
const x = Math.random() * 800;
|
|
const y = Math.random() * 600;
|
|
const size = Math.random() * 5 + 2;
|
|
bgCtx.fillRect(x, y, size, size);
|
|
}
|
|
|
|
// Create player image
|
|
const playerCanvas = document.getElementById('playerCanvas');
|
|
const playerCtx = playerCanvas.getContext('2d');
|
|
playerCtx.fillStyle = '#ff0000';
|
|
playerCtx.fillRect(0, 0, 32, 32);
|
|
playerCtx.fillStyle = '#ff5555';
|
|
playerCtx.fillRect(8, 8, 16, 16);
|
|
|
|
// Create tile image
|
|
const tileCanvas = document.getElementById('tileCanvas');
|
|
const tileCtx = tileCanvas.getContext('2d');
|
|
tileCtx.fillStyle = '#ffffff';
|
|
tileCtx.fillRect(0, 0, 32, 32);
|
|
tileCtx.strokeStyle = '#cccccc';
|
|
tileCtx.lineWidth = 1;
|
|
tileCtx.strokeRect(0.5, 0.5, 31, 31);
|
|
|
|
// Create download links
|
|
const downloadDiv = document.getElementById('downloadLinks');
|
|
|
|
function createDownloadLink(canvas, filename) {
|
|
const link = document.createElement('a');
|
|
link.download = filename;
|
|
link.href = canvas.toDataURL('image/png');
|
|
link.textContent = `Download ${filename}`;
|
|
link.style.display = 'block';
|
|
link.style.margin = '10px';
|
|
downloadDiv.appendChild(link);
|
|
|
|
// Auto-click to download
|
|
setTimeout(() => link.click(), 500);
|
|
}
|
|
|
|
createDownloadLink(bgCanvas, 'background.png');
|
|
createDownloadLink(playerCanvas, 'player.png');
|
|
createDownloadLink(tileCanvas, 'tile.png');
|
|
</script>
|
|
</body>
|
|
</html>
|