bigtimebuddy/pixi-svg
SVG to Graphics DisplayObject for pixi.js
🎨 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àonew 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
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.
Design editor including Graphic editor, Presentation editor, Video editor
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.
Write PixiJS applications using React declarative style.
一个可运行于微信小程序的PIXI引擎,通过模拟window环境,有些功能小程序无法模拟,就直接修改了PIXI引擎代码,最终使得PIXI引擎正常运行在小程序上