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:
<script src="https://cdn.jsdelivr.net/npm/@pixi/graphics-extras@7.x/dist/graphics-extras.min.js"></script>
Or via unpkg:
<script src="https://unpkg.com/@pixi/graphics-extras@7.x/dist/graphics-extras.min.js"></script>