draw_entities path-1 reads an optional sprite_scale (number, default
1.0) and applies it as uniform scaleX/scaleY in
draw_sprite_transform around the visual center. Lets templates whose
native sprite resolution (e.g. TC_Basics 300×300 bed) doesn't match
the project tile-scale (~/sporel_tile_scale.md: 64 px = 0.5 m via the
puppet shoulder anchor) render at credible real-world sizes without
re-baking the atlas.
Consumers compute their per-atlas scale from
atlas_meta.pixels_per_meter (atlas-baker v0.4.0+ output) divided into
their project canonical px/m — one line in M.init, no per-entity
constants in the template.
Unset sprite_scale preserves v0.2.0 behavior — spine-prototype,
map-editor, vagrant's pre-TC_Basics items unaffected.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase A.2: draw_entities(filter) iterates composition.list_by_tag and
renders each entity per its sprite-properties. Three paths:
1. sprite_atlas + sprite_uv.{x,y,w,h} → atlas sub-rect via
engine.render.draw_sprite_transform (with texture-handle cache)
2. sprite_color + sprite_w + sprite_h → engine.render.draw_rect
3. magenta 16x16 fallback rect for entities without sprite-properties
position.x/position.y is treated as visual-CENTER for all paths.
Filter shape: {tag = "..."} — anything else is loud-error
(template-id / property-predicate filters deferred per A-Q3).
New dep: lib-core.composition v0.1.0.
draw_map (v0.1) unverändert.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>