BlueGit

timfa questward

Enlarge spell projectile placeholders to 16×16.

Keeps the centred magenta diamond; extra margin for tip/tail art. Right side remains the facing direction.

timfa Tim Falken · pushed by timfa

Authored 2026-08-31 · 2 months ago

Hash
b20000c6eb574279caf35f4d36650b12ff0dd5b0
Parent
018233a2
52 files changed +15 −9
client/assets/fx/projectile/spell-airbolt.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-blaze.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-blight.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-boulder.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-cataclysm.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-cyclone.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-dark.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-darkbolt.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-deluge.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-drain.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-earthbolt.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-eclipse.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-fireball.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-firebolt.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-flare.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-gale.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-gloom.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-hellfire.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-hurricane.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-inferno.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-judgment.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-landslide.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-light.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-lightbolt.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-maelstrom.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-magic-missile.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-mana-bullet.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-oblivion.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-plague.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-poison.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-poisonbolt.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-quake.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-radiance.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-revitalize.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-shade.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-sprite-bolt-air.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-sprite-bolt-dark.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-sprite-bolt-earth.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-sprite-bolt-fire.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-sprite-bolt-light.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-sprite-bolt-poison.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-sprite-bolt-water.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-sunbeam.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-tempest.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-tinders.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-torrent.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-toxinburst.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-venomcloud.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-voidlance.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-waterbolt.png Binary file +0 −0

The contents of this binary file are not shown.

client/assets/fx/projectile/spell-waterspout.png Binary file +0 −0

The contents of this binary file are not shown.

client/scripts/write-spell-projectile-template.mjs +15 −9
@@ -3,6 +3,9 @@
3 3 * Magenta placeholder projectile art: one PNG per spell under
4 4 * client/assets/fx/projectile/spell-<spellId>.png
5 5 *
6 * Canvas is 16×16. Facing: the RIGHT side (+X) is the front/tip — the same
7 * convention as arrow.png. Runtime rotates with atan2(dy, dx) so 0° = flying east.
8 *
6 9 * Magenta (R≈B, G < R) is recolored at runtime via spellProjectileTint(element).
7 10 * Replace any file with hand-drawn art; keep magenta for tintable regions.
8 11 *
@@ -14,7 +17,10 @@ import { fileURLToPath } from "node:url";
14 17 import { writeRgbaPng, makeRgba, fillRect } from "../../server/src/assets/placeholderPng.js";
15 18 import { SPELL_DEFINITIONS } from "../../shared/definitions/spells.js";
16 19
17 const SIZE = 8;
20 const SIZE = 16;
21 /** Offset so the original 8×8 diamond sits centred on the 16×16 canvas. */
22 const OX = 4;
23 const OY = 4;
18 24 const OUT_DIR = join(dirname(fileURLToPath(import.meta.url)), "..", "assets", "fx", "projectile");
19 25
20 26 /** Pure magenta mask + a lighter magenta highlight (G channel → white at runtime). */
@@ -44,16 +50,16 @@ for (const def of Object.values(SPELL_DEFINITIONS))
44 50 {
45 51 const file = join(OUT_DIR, `spell-${def.spellId}.png`);
46 52 const image = makeRgba(SIZE, SIZE, [0, 0, 0, 0]);
47 // Diamond body
48 fillRect(image, 3, 1, 2, 1, MAGENTA);
49 fillRect(image, 2, 2, 4, 1, MAGENTA);
50 fillRect(image, 1, 3, 6, 2, MAGENTA);
51 fillRect(image, 2, 5, 4, 1, MAGENTA);
52 fillRect(image, 3, 6, 2, 1, MAGENTA);
53 // Diamond body (same pixels as the old 8×8 art, centred)
54 fillRect(image, OX + 3, OY + 1, 2, 1, MAGENTA);
55 fillRect(image, OX + 2, OY + 2, 4, 1, MAGENTA);
56 fillRect(image, OX + 1, OY + 3, 6, 2, MAGENTA);
57 fillRect(image, OX + 2, OY + 5, 4, 1, MAGENTA);
58 fillRect(image, OX + 3, OY + 6, 2, 1, MAGENTA);
53 59 // Center highlight
54 fillRect(image, 3, 3, 2, 2, MAGENTA_HI);
60 fillRect(image, OX + 3, OY + 3, 2, 2, MAGENTA_HI);
55 61 writeRgbaPng(file, SIZE, SIZE, image.pixels);
56 62 wrote += 1;
57 63 }
58 64
59 console.log(`Wrote ${wrote} magenta spell projectile placeholders in ${OUT_DIR}`);
65 console.log(`Wrote ${wrote} magenta spell projectile placeholders (${SIZE}×${SIZE}) in ${OUT_DIR}`);
@@ -3,6 +3,9 @@
3 * Magenta placeholder projectile art: one PNG per spell under
3 * Magenta placeholder projectile art: one PNG per spell under
4 * client/assets/fx/projectile/spell-<spellId>.png
4 * client/assets/fx/projectile/spell-<spellId>.png
5 *
5 *
6 * Canvas is 16×16. Facing: the RIGHT side (+X) is the front/tip — the same
7 * convention as arrow.png. Runtime rotates with atan2(dy, dx) so 0° = flying east.
8 *
6 * Magenta (R≈B, G < R) is recolored at runtime via spellProjectileTint(element).
9 * Magenta (R≈B, G < R) is recolored at runtime via spellProjectileTint(element).
7 * Replace any file with hand-drawn art; keep magenta for tintable regions.
10 * Replace any file with hand-drawn art; keep magenta for tintable regions.
8 *
11 *
@@ -14,7 +17,10 @@ import { fileURLToPath } from "node:url";
14import { writeRgbaPng, makeRgba, fillRect } from "../../server/src/assets/placeholderPng.js";
17import { writeRgbaPng, makeRgba, fillRect } from "../../server/src/assets/placeholderPng.js";
15import { SPELL_DEFINITIONS } from "../../shared/definitions/spells.js";
18import { SPELL_DEFINITIONS } from "../../shared/definitions/spells.js";
16
19
17const SIZE = 8;
20const SIZE = 16;
21/** Offset so the original 8×8 diamond sits centred on the 16×16 canvas. */
22const OX = 4;
23const OY = 4;
18const OUT_DIR = join(dirname(fileURLToPath(import.meta.url)), "..", "assets", "fx", "projectile");
24const OUT_DIR = join(dirname(fileURLToPath(import.meta.url)), "..", "assets", "fx", "projectile");
19
25
20/** Pure magenta mask + a lighter magenta highlight (G channel → white at runtime). */
26/** Pure magenta mask + a lighter magenta highlight (G channel → white at runtime). */
@@ -44,16 +50,16 @@ for (const def of Object.values(SPELL_DEFINITIONS))
44{
50{
45 const file = join(OUT_DIR, `spell-${def.spellId}.png`);
51 const file = join(OUT_DIR, `spell-${def.spellId}.png`);
46 const image = makeRgba(SIZE, SIZE, [0, 0, 0, 0]);
52 const image = makeRgba(SIZE, SIZE, [0, 0, 0, 0]);
47 // Diamond body
53 // Diamond body (same pixels as the old 8×8 art, centred)
48 fillRect(image, 3, 1, 2, 1, MAGENTA);
54 fillRect(image, OX + 3, OY + 1, 2, 1, MAGENTA);
49 fillRect(image, 2, 2, 4, 1, MAGENTA);
55 fillRect(image, OX + 2, OY + 2, 4, 1, MAGENTA);
50 fillRect(image, 1, 3, 6, 2, MAGENTA);
56 fillRect(image, OX + 1, OY + 3, 6, 2, MAGENTA);
51 fillRect(image, 2, 5, 4, 1, MAGENTA);
57 fillRect(image, OX + 2, OY + 5, 4, 1, MAGENTA);
52 fillRect(image, 3, 6, 2, 1, MAGENTA);
58 fillRect(image, OX + 3, OY + 6, 2, 1, MAGENTA);
53 // Center highlight
59 // Center highlight
54 fillRect(image, 3, 3, 2, 2, MAGENTA_HI);
60 fillRect(image, OX + 3, OY + 3, 2, 2, MAGENTA_HI);
55 writeRgbaPng(file, SIZE, SIZE, image.pixels);
61 writeRgbaPng(file, SIZE, SIZE, image.pixels);
56 wrote += 1;
62 wrote += 1;
57}
63}
58
64
59console.log(`Wrote ${wrote} magenta spell projectile placeholders in ${OUT_DIR}`);
65console.log(`Wrote ${wrote} magenta spell projectile placeholders (${SIZE}×${SIZE}) in ${OUT_DIR}`);