@pixi/graphics-extras
v7.4.3
Published
Additional Graphics functions for drawing special shapes.
Downloads
17,450
Readme
@pixi/graphics-extras
Adds the follow methods to Graphics:
drawTorus
drawChamferRect
drawFilletRect
drawRegularPolygon
Installation
npm install @pixi/graphics-extras
Usage
import { Graphics } from '@pixi/graphics';
import '@pixi/graphics-extras';
const shapes = new Graphics()
.beginFill(0xffffff)
.drawTorus(0, 0, 20, 100);
CDN Install
Via jsDelivr:
<!-- This script tag should be placed after pixi.min.js -->
<script src="https://cdn.jsdelivr.net/npm/@pixi/graphics-extras@7.x/dist/graphics-extras.min.js"></script>
Or via unpkg:
<!-- This script tag should be placed after pixi.min.js -->
<script src="https://unpkg.com/@pixi/graphics-extras@7.x/dist/graphics-extras.min.js"></script>