javascript - PixiJS : not drawing round rectangle correctly

标签 javascript pixi.js

绘制圆 Angular 矩形后, Angular 不是完美的圆 Angular 。 Angular 落是像素化的:

enter image description here

如何绘制没有像素 Angular 的正确圆 Angular 矩形?这是我的代码:

var graphics = new PIXI.Graphics();
graphics.beginFill(0x3e494b);
graphics.lineStyle(4, 0x0, .3);
graphics.drawRoundedRect(
    x,
    y,
    width,
    height,
    30
);
graphics.endFill();

最佳答案

如果您的项目使用 Pixi Application ,请尝试将抗锯齿选项设置为 true。例如:

const app = new Application({antialias: true});

关于javascript - PixiJS : not drawing round rectangle correctly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54302555/

相关文章:

javascript - bool 对象上的逻辑 NOT 在 Javascript 中总是返回 false

javascript - 如何托管可由 PIXI.js 访问的图像而不遇到 CORS 问题?

javascript - 编写片段着色器 : cannot make sense of how the uniforms are defined

javascript - 有没有办法防止来自机器人的点击输入?

javascript - Pixi JS 老虎机游戏计数特定 Sprite

javascript - 有没有办法通过 Canvas 缩放来避免信箱?

javascript - 使用 TestCafe Selector 或 testcafe-react-selector 查找嵌套组件的元素节点时遇到问题

javascript - 使用 .call() 在 JavaScript 中继承对象的不同方法

javascript - Regex - 为什么使用新的 RegExp 方法时此模式不起作用?

javascript - 将 useState() 与事件监听器一起使用时遇到问题。看不到更新的状态