Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduces optional Graphics Extras Package #6613

Merged
merged 4 commits into from
May 15, 2020
Merged

Conversation

bigtimebuddy
Copy link
Member

@bigtimebuddy bigtimebuddy commented May 9, 2020

Overview

This introduces a new package: @pixi/graphics-extras to provide some convenience drawing functions for various shapes. Ideally this would've been the place where drawStar was included too.

This PR was inspired by some draw experiments I did over the past year with Graphics. I thought these would be useful as a package. I added this package as opt-in (i.e., not included in the default bundles pixi.js or pixi.js-legacy).

Demos

Regular Polygon:
https://jsfiddle.net/bigtimebuddy/rqpbnj6d/

Torus:
https://jsfiddle.net/bigtimebuddy/mzq0yLv8/

Fillet and Chamfer Rectangles:
https://jsfiddle.net/bigtimebuddy/jzsgep42/

Links

Documentation
https://pixijs.download/dev-graphics-extras/packages/graphics-extras.js

@ivanpopelyshev
Copy link
Collaborator

That was mentioned in many topics on forums and here

packages/graphics-extras/src/drawChamferRect.ts Outdated Show resolved Hide resolved
packages/graphics-extras/src/drawFilletRect.ts Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented May 11, 2020

Codecov Report

Merging #6613 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #6613   +/-   ##
=======================================
  Coverage   82.34%   82.34%           
=======================================
  Files          38       38           
  Lines        1903     1903           
=======================================
  Hits         1567     1567           
  Misses        336      336           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf714ca...d448b88. Read the comment docs.

@bigtimebuddy bigtimebuddy added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label May 12, 2020
@bigtimebuddy bigtimebuddy merged commit 238d345 into dev May 15, 2020
@bigtimebuddy bigtimebuddy deleted the dev-graphics-extras branch May 15, 2020 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants