Jump to content

circles are not round


Recommended Posts

Versions below and including 5.0.0-alpha.3: round graphics objects appear smooth and actually round.

Versions above 5.0.0-alpha.3:round graphics objects appear like octagons, it gets worse the smaller they are.

What could be causing this?


<!doctype html>
        margin: 0;

        display: block;
        background: blue;
        <canvas id="mycanvas"></canvas>
        <script src="pixi/pixi.js"></script>
        <script type="text/javascript">
            const canvas = document.getElementById('mycanvas');

            const app = new PIXI.Application({
              view: canvas, width: 800, height: 600, backgroundColor: 0x000000, resolution: 1,
            	autoDensity: true, antialias: true

            const graphic = new PIXI.Graphics();
            graphic.x = app.renderer.width / 2;
            graphic.y = app.renderer.height / 2;

            graphic.lineStyle(2, 0xFF0000, 1, 1, true);
            graphic.arc(0, 0, 10, 0, 2 * Math.PI);


            function animate() {
                // graphic.rotation += 0.1;


Link to comment
Share on other sites

Adaptive number of points.



"PIXI.GRAPHICS_CURVES.adaptive = false" will switch it off. If you dont want to switch it off because you also use big arcs, maybe "maxLength=5" will make it better.

Link to comment
Share on other sites


switching it off does the job, but now I can't change the arc width using graphic.lineStyle(x, 0xFF0000, 1, 1, true), it appears as it doesn't matter what x I pass in, it's always thin.


EDIT: Fixed it, I was passing the parameters wrong. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...