From c930d4705d3a81a37f8f71a1ccefa37d4dd10f7d Mon Sep 17 00:00:00 2001 From: tolelom <98kimsungmin@naver.com> Date: Wed, 25 Mar 2026 18:31:03 +0900 Subject: [PATCH] feat: add PNG decoder, query3/4, Capsule+GJK/EPA, friction, Lua engine API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PNG decoder with self-contained Deflate decompressor (RGB/RGBA) - ECS query3 and query4 for multi-component queries - Capsule collider + GJK/EPA narrow phase for convex shapes - Coulomb friction in physics solver - Lua engine API bindings (spawn, position, entity_count) Tests: 255 → 286 (+31) Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/settings.local.json | 4 ++- Cargo.lock | 2 ++ .../specs/2026-03-25-png-decoder.md | 33 +++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 docs/superpowers/specs/2026-03-25-png-decoder.md diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 3f280eb..f36025e 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -47,7 +47,9 @@ "Read(//c/tmp/**)", "Bash(tar xzf:*)", "Bash(cp lua-5.4.7/src/*.c lua-5.4.7/src/*.h C:/Users/SSAFY/Desktop/projects/voltex/crates/voltex_script/lua/)", - "Bash(cd:*)" + "Bash(cd:*)", + "Bash(git status:*)", + "Bash(git push:*)" ] } } diff --git a/Cargo.lock b/Cargo.lock index f81b5c9..577443b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2152,6 +2152,8 @@ name = "voltex_script" version = "0.1.0" dependencies = [ "cc", + "voltex_ecs", + "voltex_math", ] [[package]] diff --git a/docs/superpowers/specs/2026-03-25-png-decoder.md b/docs/superpowers/specs/2026-03-25-png-decoder.md new file mode 100644 index 0000000..7daae6c --- /dev/null +++ b/docs/superpowers/specs/2026-03-25-png-decoder.md @@ -0,0 +1,33 @@ +# PNG Decoder — Design Spec + +## Overview + +voltex_renderer에 PNG 디코더를 추가한다. Deflate(Huffman+LZ77) 자체 구현으로 외부 의존 없이 PNG 파일을 파싱. + +## Scope + +- PNG 시그니처 + 청크 파싱 (IHDR, IDAT, IEND) +- 8-bit RGB (color_type=2), 8-bit RGBA (color_type=6) +- Deflate 디코더 (zlib wrapper + fixed/dynamic Huffman + LZ77) +- PNG 필터 복원 (None, Sub, Up, Average, Paeth) + +## Out of Scope + +- 인터레이스 (Adam7) +- 16-bit depth +- 팔레트 (color_type=3) +- 그레이스케일 (color_type=0, 4) +- Adler32 검증 + +## Files + +- `crates/voltex_renderer/src/deflate.rs` — inflate (Create) +- `crates/voltex_renderer/src/png.rs` — parse_png (Create) +- `crates/voltex_renderer/src/lib.rs` — 모듈 등록 (Modify) + +## Test Plan + +- deflate: inflate fixed Huffman compressed data +- png filters: each filter type reconstruction +- parse_png: manually crafted 2x2 PNG roundtrip +- RGB→RGBA conversion