如何在pixijs中渲染一个圆

Aiv*_*ras 1 pixi.js

我正在用头撞墙。我无法在 pixjs 中渲染简单的圆圈。有什么帮助吗?

游乐场链接 - https://pixiplayground.com/#/edit/eE~VcTxQSEi_I_DZk6Agz

Dud*_*ude 5

如果您只是想渲染一个圆,这就是您所需要的:

var app = new PIXI.Application({
  width: window.innerWidth,
  height: window.innerHeight,
  backgroundColor: 0x2c3e50
});
document.body.appendChild(app.view);

const gr  = new PIXI.Graphics();
gr.beginFill(0xffffff);
gr.drawCircle(30, 30, 30);
gr.endFill();
app.stage.addChild(gr)
Run Code Online (Sandbox Code Playgroud)

这是一个工作示例:https://www.pixiplayground.com/#/edit/5_EeuD2_YmdV8oleXRZ2P