Skip to content

refactor: viewport를 PixiJS 기반으로 마이그레이션#58

Open
zuhanit wants to merge 5 commits intomasterfrom
refactor/viewport-to-pixijs
Open

refactor: viewport를 PixiJS 기반으로 마이그레이션#58
zuhanit wants to merge 5 commits intomasterfrom
refactor/viewport-to-pixijs

Conversation

@zuhanit
Copy link
Copy Markdown
Owner

@zuhanit zuhanit commented Mar 29, 2026

Summary

  • Canvas 2D 기반 viewport를 pixi.js + @pixi/react + pixi-viewport 선언적 구조로 교체
  • 4개 레이어 클래스 구현: TerrainLayer (CompositeTilemap), UnitLayer, SpriteLayer (AnimatedSprite), LocationLayer (Graphics)
  • pixi-viewport 플러그인으로 줌/패닝/핀치 지원, Application.resizeTo로 자동 리사이즈
  • dnd-kit 에셋 드롭을 viewport.toWorld() 좌표 변환으로 연동 유지
  • 불필요해진 Canvas 2D 관련 코드 삭제 (useDragViewport, useElementResize, entityUtils)

Test plan

  • 맵 로드 후 터레인 타일이 정상 렌더링되는지 확인
  • 유닛/스프라이트가 팀 컬러 적용되어 올바른 위치에 표시되는지 확인
  • 로케이션 영역이 반투명 파란색 사각형 + 라벨로 표시되는지 확인
  • 마우스 드래그/휠로 줌/패닝이 동작하는지 확인
  • 엔티티 클릭 시 선택 테두리가 표시되는지 확인
  • 에셋 탐색기에서 유닛/스프라이트를 viewport로 드래그 앤 드롭 시 올바른 위치에 배치되는지 확인
  • 브라우저 리사이즈 시 canvas가 자동으로 맞춰지는지 확인

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webditor Ready Ready Preview, Comment Mar 29, 2026 3:51pm

@zuhanit zuhanit self-assigned this Mar 29, 2026
@zuhanit zuhanit added the enhancement New feature or request label Mar 29, 2026
@zuhanit zuhanit added this to the 0.1.0 milestone Mar 29, 2026
@zuhanit zuhanit linked an issue Mar 29, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Viewport Refactoring

1 participant