PURPOSE
Declares the target pixel resolutions used when sprite art is downsampled at load time. Two constants only: one for player art, one for enemy art. Centralizes the size budget so loaders and renderers agree on the post-downsample dimensions of cached sprite atlases.
OWNS
SPRITE_TARGET_PLAYER— target side length in pixels for player sprite downsample (192).SPRITE_TARGET_ENEMY— target side length in pixels for enemy sprite downsample (96).
Both are exported const numeric literals. The module owns no functions, no state, no side effects.
READS FROM
Nothing. The file has no imports.
PUSHES TO
Anything that imports SPRITE_TARGET_PLAYER or SPRITE_TARGET_ENEMY. These are read at sprite-load time by the runtime downsampler to compute the post-load bitmap size, and at draw time by any code that needs to know the canonical asset resolution.
DOES NOT
- Does not perform downsampling itself — only declares the targets.
- Does not load, decode, cache, or render sprites.
- Does not handle atlas packing, mipmaps, or DPR-aware scaling.
- Does not branch on enemy type, biome, or device class — both constants are global flat values.
- Does not expose a setter, tuner, or runtime-mutable knob — values are compile-time constants.
Signals
None. This is a pure constants module; it neither emits nor subscribes to events.
Entry points
There are no callable entry points. Consumers reach the module by named import:
import { SPRITE_TARGET_PLAYER } from '.../engine/core/config/_sprites'import { SPRITE_TARGET_ENEMY } from '.../engine/core/config/_sprites'
Pattern notes
- Underscore-prefixed filename (
_sprites.ts) marks it as a leaf config module underengine/core/config/, sibling to other primitive constant sheets. - Numbers are powers-of-two friendly (192, 96) with a 2:1 player-to-enemy ratio, matching the convention that player art carries roughly twice the linear resolution of enemy art.
- Follows the project rule “every number traces to a named constant” — call sites should never inline 192 or 96 for sprite-size purposes; they import these symbols.
- Behavior in code, content in data: this file is the data side of the sprite-size contract; the downsample logic lives in whichever loader consumes these constants.