Creates a Graphics instance wrapped as an entity for logic support.
Optional
const player = asEntityGraphics({ x: 100, y: 200, draw: (g) => g.circle(0, 0, 20).fill(0xff0000)});player.moxiEntity.addLogic(new PlayerController());scene.addChild(player); Copy
const player = asEntityGraphics({ x: 100, y: 200, draw: (g) => g.circle(0, 0, 20).fill(0xff0000)});player.moxiEntity.addLogic(new PlayerController());scene.addChild(player);
Creates a Graphics instance wrapped as an entity for logic support.