PixiJS

사각형 출력

kyoun 2019. 7. 13. 18:04
 

PixiJS API Documentation

Represents the WebGL state the Graphics required to render, excludes shader and geometry. E.g., blend mode, culling, depth testing, direction of rendering triangles, backface, etc.

pixijs.download

 

PixiJS Examples

Loading… Would you like to create a new example? Head over to the examples repo on GitHub.

pixijs.io


 

그래픽스 기능을 이용하여 사각형 그리기

화면 좌상단이 (0 , 0) 으로 시작함

 


 function drawRect()
 {
     const graphics = new PIXI.Graphics();
    

     graphics.beginFill(0xDE3249);
     graphics.drawRect(50, 50, 100, 100);
     graphics.endFill();
     Game.stage.addChild(graphics);

 }

 

출력화면