@pixi/graphics-extras
TypeScript icon, indicating that this package has built-in type declarations

7.4.2 • Public • Published

@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>

Readme

Keywords

none

Package Sidebar

Install

npm i @pixi/graphics-extras

Homepage

pixijs.com/

Weekly Downloads

5,169

Version

7.4.2

License

MIT

Unpacked Size

140 kB

Total Files

48

Last publish

Collaborators

  • zyie
  • bigtimebuddy