gerardAlbin Posted June 16, 2019 Share Posted June 16, 2019 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? https://imgur.com/a/rQfFHGi <!doctype html> <html> <head> <style> body{ margin: 0; } canvas{ display: block; background: blue; } </style> </head> <body> <canvas id="mycanvas"></canvas> <script src="pixi/pixi.js"></script> <script type="text/javascript"> console.log(PIXI.settings); 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; app.stage.addChild(graphic); graphic.lineStyle(2, 0xFF0000, 1, 1, true); graphic.arc(0, 0, 10, 0, 2 * Math.PI); app.ticker.add(animate); function animate() { // graphic.rotation += 0.1; } </script> </body> </html> Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 16, 2019 Share Posted June 16, 2019 Adaptive number of points. https://github.com/pixijs/pixi.js/blob/dev/packages/graphics/src/utils/ArcUtils.js#L89 https://github.com/pixijs/pixi.js/blob/dev/packages/graphics/src/const.js#L16 "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. Quote Link to comment Share on other sites More sharing options...
gerardAlbin Posted June 16, 2019 Author Share Posted June 16, 2019 Thanks, 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.