RepositoryPythonCNChina
wo1fsea

wo1fsea/PyTexturePacker

A Python Texture Packer (TexturePacker)

141stars
42forks
1issues
0views

🧩 PyTexturePacker — Nén sprite thông minh cho game 2D bằng Python

Dự án mã nguồn mở dùng thuật toán MaxRectsBinPack để đóng gói sprite thành sprite sheet tối ưu.

PyTexturePacker là một gói Python mở nguồn (MIT License), cài đặt qua pip. Dự án cài đặt một phần tính năng của TexturePacker, tập trung vào việc tạo sprite sheet từ các hình ảnh nhỏ.

✨ Điểm nổi bật

  • MaxRectsBinPack: Thuật toán đóng gói texture nhanh và tỉ lệ sử dụng không gian cao.
  • Hỗ trợ xoay sprite: Tự động xoay sprite 90 độ để tối ưu vị trí nếu cần.
  • Cài đặt nền tảng: Tù chỉnh màu nền, độ rộng/cao tối đa, định dịnh dạng texture.
  • Đệm và xử lý viền: Hỗ trợ padding, trim, extrude để giảm lỗi biên khi render.
  • Định dạng atlas tùy chỉnh: Xuất file cấu hình sprite sheet dưới dạng plist, json, csv hoặc tùy chỉnh.

💡 Vì sao đáng chú ý

Khác với cách thủ công sắp xếp sprite, PyTexturePacker tự động tối ưu bố cục nhờ MaxRectsBinPack — một trong những thuật toán hiệu quả nhất hiện nay. Phù hợp cho phát triển game 2D với Unity3D, Cocos2d-x hoặc các framework đòi hỏi sprite sheet.


#PyTexturePacker #SpriteSheet #MaxRectsBinPack #GameDev #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

375.7k
Sep 15, 2026
RepositoryPython
vinta/awesome-python

The definitive list that answers "I want to do X in Python, which tool should I use?"

330.4k
Oct 26, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

288.1k
Oct 26, 2026
RepositoryPython
TheAlgorithms/Python

All Algorithms implemented in Python

225.5k
Oct 20, 2026
RepositoryPython
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

202.5k
Oct 23, 2026
RepositoryPython
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

187.7k
Oct 24, 2026
RepositoryPython
521xueweihan/HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.

184.7k
Sep 28, 2026
RepositoryC#
maxartz15/MA_TextureAtlasser

Texture atlas creator for Unity

502
Sep 14, 2026
RepositoryC#
fidifis/TextureMerge

pack/merge textures into image channels.

148
Apr 13, 2026