import { Sprite, Texture } from 'pixi.js';
import { applyAllImageModifiers, parseImagePath } from '@datamoc/mw_games/two-d/render';
const sprite = new Sprite(Texture.EMPTY);
applyAllImageModifiers(sprite, parseImagePath('hero.png~BLEND(ff0000,50%)~FL(horizontal)'));
// sprite.texture carries the exact per-pixel blend; sprite.scale.x is flipped
The two-step recipe
applyImageModifiers's own doc comment names but leaves a caller to drive by hand (item 310): bakesapplyTextureModifiers's exact pixel-level result (~RC/~PAL/~BLIT/~MASK/~BLEND/~ROTATE) intosprite.texturefirst, then applies the sprite-property/filter modifiers (~FL/~SCALE/~GS/~CS/~R/~G/~B/~O/~CHAN) on top - the same split those two functions already have, run together so a caller with a~BLEND/~ROTATEpath never getsapplyImageModifiers's silent no-op for them.probeisapplyTextureModifiers's own, needed only when the path uses~BLIT/~MASK/~RC/~PALwith a named colour.