RepositoryTypeScript
bigtimebuddy

bigtimebuddy/pixi-svg

SVG to Graphics DisplayObject for pixi.js

108stars
13forks
7issues
0views

🎨 Chuyển SVG thành Graphics cho PixiJS

pixi-svg biên dịch SVG thành DisplayObject Graphics của PixiJS, giúp dùng lại SVG trên WebGL mà không cần renderer riêng.

pixi-svg là thư viện TypeScript cho phép chuyển đổi trực tiếp phần tử SVG (hoặc SVG string) thành đối tượng PIXI.SVG, kế thừa từ Graphics. Dự án hỗ trợ tích hợp dễ dàng vào các dự án PixiJS đang dùng WebGL hoặc HTML5 Canvas.

✨ Điểm nổi bật

  • SVG → Graphics DisplayObject: biên dịch SVG thành PIXI.Graphics để dùng trên PixiJS.
  • Hỗ trợ phần tử SVG: <path>, <circle>, <rect>, <polygon>, <polyline>, <g>.
  • Hỗ trợ style: stroke, stroke-width, fill, opacity, stroke-linejoin, stroke-linecap.
  • Cài đặt nhanh: npm install pixi-svg.
  • Dễ dùng: truyền phần tử <svg> vào new SVG(element), thêm vào stage như bất kỳ DisplayObject nào.

💡 Vì sao đáng chú ý

pixi-svg giúp tận dụng SVG đã có sẵn trong pipeline PixiJS mà không cần thay đổi renderer. Tuy nhiên chỉ hỗ trợ tính năng con của SVG — không hỗ trợ transform, text, gradient, hoặc interactivity. Phù hợp cho UI đồ họa đơn giản cần vẽ trên WebGL.


#PixiJS #SVG #TypeScript #WebGL #OpenSource #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
pixijs/pixijs

The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.

48.5k
Oct 26, 2026
RepositoryHTML
rough-stuff/rough

Create graphics with a hand-drawn, sketchy, appearance

21.3k
Jul 28, 2024
RepositoryTypeScript
antvis/G2

📊 The concise and progressive visualization grammar.

12.6k
Oct 22, 2026
RepositoryTypeScript
core7s/react-design-editor

Design editor including Graphic editor, Presentation editor, Video editor

140
Jun 11, 2023
RepositoryJavaScript
egret-labs/egret-core

Egret is a brand new open mobile game and application engine which allows you to quickly build mobile games and apps on Android,iOS and Windows.

4.0k
Jul 20, 2022
RepositoryJavaScript
michalochman/react-pixi-fiber

Write PixiJS applications using React declarative style.

881
Oct 14, 2026
RepositoryJavaScript
skyfish-qc/pixi-miniprogram

一个可运行于微信小程序的PIXI引擎,通过模拟window环境,有些功能小程序无法模拟,就直接修改了PIXI引擎代码,最终使得PIXI引擎正常运行在小程序上

182
Aug 22, 2024
RepositoryHaxe
pixijs-userland/pixi-haxe

Externs of Pixi.js for Haxe

181
Jul 15, 2022
RepositoryJavaScript
edwinwebb/pixi-seed

Pixi.js project seed with ES6 and webpack

150
Jan 6, 2023