Repository navigation
PixelForge AI v0.9.7
What's New in v0.9.7
Accurate Pixel Conversion & Auto-Centering (External AI Agents, IDEs & Imports)
- Dark Outlines Preserved on Transparent PNGs: Added
detectOpaqueBorderColor()innormalizeV2so already-transparent PNGs never fall back to[0, 0, 0]black and accidentally strip dark 1px pixel-art outlines; threadedalphaThresholdand true pre-removalborderColorthrough every pipeline stage. - No More Slightly-Oversized Half-Size Cliff: Sprites slightly larger than canvas bounds (e.g.,
34×34on32×32) now fit cleanly and centered instead of halving to17×17, and large downscale blocks are gated against single-pixel silhouette bloat. - Auto-Convert & Auto-Center Across AI/IDE Tools:
import_image_as_layernow defaults tofit="auto"(1:1 verbatim on exact match; automatic pixel conversion + aspect-preserving centering on mismatched dimensions; passfit="exact"to reject mismatches).import_and_normalize_imageenablesstrayCleanup="normal"by default and exposesalphaThresholdandstrayCleanup.resize_canvas, UIresizeCanvas(now fully undoable viacanvas.resize), andscale_spriteall default toanchor="center".center_contentalso accounts for and shifts editablecel.vectors.
- Broader PNG & VFX Accuracy:
decodePngnow supports 1/2/4/8/16-bit indexed & grayscale PNGs plus RGB/grayscaletRNStransparency; drag-and-drop image import runs deterministicnormalizeV2; VFX downsampling preserves aspect ratio, centers cleanly, and uses premultiplied alpha in soft mode.
Dynamic Viewport Scaling & Safe-Area Centering (0 / Ctrl+0)
- Unobstructed Safe-Area Fit: Added pure viewport math (
src/lib/pixelforge/viewport.ts) that fits and centers canvases cleanly clear ofPalettePaneland HUD bars insideuseLayoutEffect(zero 1-frame stale-zoom flash). - Smooth Scaling for Small & Large Canvases: Removed the
Math.floor(< 1) === 0 → 0.25×collapse on large canvases (256×256/512×512) and added quarter-step zoom (1×–2×) alongside crisp integer zoom (≥ 2×). - Smarter Zoom & Auto-Pan: Preserves user zoom/pan when resizing docks or windows, anchors keyboard
+/-zoom at safe-area center, anchors touch pinch-zoom at the two-finger midpoint, adds0/Ctrl+0Fit & Center shortcut, and prevents Smart AI Auto-Pan from pushing centered visible canvases off-screen.
High-Performance Canvas, Tiles & AI Drawing
- Viewport-Bounded GPU Canvas: Clipped
CanvasStagebacking store to the visible viewport when scaled dimensions exceed2048pxand cappedAiLiveCanvasOverlay(≤ 2048px), keeping GPU memoryO(viewport)even at256×256 @ 64×zoom, with visible-range grid culling, low-zoom tile grids, cached tile-stamp ghost canvases, and aligned Mirror X/Y tile stamping. - Single-Canvas Tileset Picker & Fast Level Mockup: Replaced up to 1,024 individual
<TileThumb>DOM<canvas>elements with a single-canvasTilesetSheetCanvas, paused background compositing/animation when hidden, switched to single-frame compositing +preSlicedreuse, addedpatchLevelMockupCell, cached room base & ghost canvases, and fixed nestedsetStateinapplyRoomCell. - Faster AI Agent Drawing: Coalesced
store,timelapse, andmcp-bridgeupdates insidebus.inTransaction, skipped redundant per-step SHA-256/buildCraftGate/localStoragework on inner batch steps, reused composited buffers for Auto-Eyes PNGs, fixed the asyncfinishToolReviewrace, and rewrotediffChangedPixelswith a zero-allocationUint32Arrayserpentine pass.
Bug Prevention & Full Documentation Sync
- Preserved
cel.vectorsacrossreplaceCelBufferand brush strokes; fixed out-of-bounds ellipse squashing indrawEllipsePixels; fixedselectionScaleToorigin-only drags; fixedmcp-followclip-switch frame index; fixedrenderFrameScalednon-square thumbnail stretching. - Audited and updated
README.mdand all 10 guides indocs/to accurately reflectv0.9.7(111 Full / 28 Compact tools, L0/L1/L2 tier counts, all 15 previously undocumented tools, 13 tools & shortcuts,8–64pxtiles, multi-OS releases, and current test suites).
Desktop installers (Windows .exe, macOS .dmg/.zip, Linux .AppImage) and update manifests are built automatically by GitHub Actions and attached to this release.