PixiJS: Architecture Overview
pixijs.io
์ํคํ ์ฒ ๊ฐ์
PixiJS๊ฐ ์ด๋ป๊ฒ ๊ฒฐํฉ๋๋์ง์ ๋ํ ๊ฐ์
์ฝ๋
PixiJS๋ GitHub์์ ํธ์คํ ๋๋ ์คํ ์์ค ์ ํ
GitHub ๋ฆฌํฌ์งํ ๋ฆฌ์ ๋ง์ฐฌ๊ฐ์ง๋ก ๊ฐ PixiJS ํด๋์ค์ ์์ ์์ค ํ์ผ์ ์ฐพ์ ๋ค์ด๋ก๋ ํ ์์์๋ฟ๋ง ์๋๋ผ ๊ธฐ์กด ๋ฌธ์ ๋ฐ ๋ฒ๊ทธ๋ฅผ ๊ฒ์ํ๊ณ ์ง์ ์ ์ถํ ์๋ ์๋ค. PixiJS๋ TypeScript๋ผ๋ JavaScript ๋ณํ์ผ๋ก ์์ฑ๋์์ผ๋ฉฐ, ์ฌ์ ์ปดํ์ผ ๋จ๊ณ๋ฅผ ํตํด JavaScript์์ ์ ํ ๊ฒ์ฌ๋ฅผ ํ ์ ์๋ค.
๊ตฌ์ฑ ์์
PixiJS๋ ๋ชจ๋์ ๋ ๋๋ง ์์ง. ์ฝํ ์ธ ๋ฅผ ์์ฑ, ์ ๋ฐ์ดํธ ๋ฐ ํ์ํ๋ ๋ฐ ํ์ํ ๊ฐ ์์ ์ ์์ฒด ๊ตฌ์ฑ ์์๋ก ๋๋๋ค ์ด๋ ๊ฒ ํ๋ฉด ์ฝ๋๊ฐ ๋ ๊น๋ํด์ง ๋ฟ๋ง ์๋๋ผ ํ์ฅ์ฑ์ด ํฅ์. ๋ํ PixiJS ์ฌ์ฉ์ ์ ์ ๋๊ตฌ๋ฅผ ์ฌ์ฉํ๋ฉด ํ๋ก์ ํธ์ ํ์ํ ๊ธฐ๋ฅ์ ํ์ ์งํฉ ๋ง ํฌํจํ๋ ์ฌ์ฉ์ ์ ์ PixiJS ํ์ผ์ ๋น๋ํ์ฌ ๋ค์ด๋ก๋ ํฌ๊ธฐ๋ฅผ ์ ์ฝ ํ ์ ์๋ค.
๋ค์์ PixiJS๋ฅผ ๊ตฌ์ฑํ๋ ์ฃผ์ ๊ตฌ์ฑ ์์ ๋ชฉ๋ก
์ฃผ์ ๊ตฌ์ฑ ์์
๊ตฌ์ฑ ์์๋ฌ์ฌ
๋ ๋๋ฌ @pixi/core |
PixiJS ์์คํ ์ ํต์ฌ์ ์ฅ๋ฉด ๊ทธ๋ํ๋ฅผ ํ์ํ๊ณ ํ๋ฉด์ ๊ทธ๋ฆฌ๋ ๋ ๋๋ฌ. PixiJS์ ๊ธฐ๋ณธ ๋ ๋๋ฌ๋ ํ๋ ์๋์ WebGL์ ๊ธฐ๋ฐ์ผ๋ก ํ๋ค. |
์ปจํ
์ด๋ @pixi/display |
์ฅ๋ฉด ๊ทธ๋ํ๋ฅผ ๋ง๋๋ ๊ธฐ๋ณธ ํ์ ๊ฐ์ฒด: ์คํ๋ผ์ดํธ, ๊ทธ๋ํฝ ๋ฐ ํ ์คํธ์ ๊ฐ์ด ํ์ํ ๋ ๋๋ง ๊ฐ๋ฅํ ๊ฐ์ฒด์ ํธ๋ฆฌ์ ๋๋ค. ์์ธํ ๋ด์ฉ์ ์ฅ๋ฉด ๊ทธ๋ํ๋ฅผ ์ฐธ์กฐ. |
๋ก๋ @pixi/loader |
๋ก๋ ์์คํ ์ ์ด๋ฏธ์ง ๋ฐ ์ค๋์ค ํ์ผ๊ณผ ๊ฐ์ ๋ฆฌ์์ค๋ฅผ ๋น๋๊ธฐ์ ์ผ๋ก ๋ก๋ํ๋ ๋๊ตฌ๋ฅผ ์ ๊ณต. |
์๊ณ @pixi/ticker |
ํฐ์ปค๋ ์๊ณ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์ฃผ๊ธฐ์ ์ธ ์ฝ๋ฐฑ์ ์ ๊ณต. ๊ฒ์ ์ ๋ฐ์ดํธ ๋ ผ๋ฆฌ๋ ์ผ๋ฐ์ ์ผ๋ก ํ๋ ์๋น ํ ๋ฒ ํฑ์ ๋ํ ์๋ต์ผ๋ก ์คํ. ํ ๋ฒ์ ์ฌ๋ฌ ํฐ์ปค๋ฅผ ์ฌ์ฉํ ์ ์๋ค. |
์ ์ฒญ @pixi/app |
์์ฉ ํ๋ก๊ทธ๋จ์ ๋ก๋, ํฐ์ปค ๋ฐ ๋ ๋๋ฌ๋ฅผ ์ฌ์ฉํ๊ธฐ ์ฌ์ด ๋จ์ผ ๊ฐ์ฒด๋ก ๋ํํ๋ ๊ฐ๋จํ ๋์ฐ๋ฏธ. ์ ์ํ๊ฒ ์์ํ๊ณ , ํ๋กํ ํ์ดํํ๊ณ , ๊ฐ๋จํ ํ๋ก์ ํธ๋ฅผ ๋น๋ํ๋ ๋ฐ ์ ํฉ. |
์ํธ์์ฉ @pixi/interaction |
PixiJS๋ ํฐ์น ๋ฐ ๋ง์ฐ์ค ๊ธฐ๋ฐ ์ํธ ์์ฉ์ ๋ชจ๋ ์ง์ํ์ฌ ๋ฌผ์ฒด๋ฅผ ํด๋ฆญ ํ ์์๊ฒํ๊ณ ํธ๋ฒ ์ด๋ฒคํธ๋ฅผ ๋ฐ์ฌํ๋ ๋ฑ์ ์์ ์ ์ํ. |
์ ๊ทผ์ฑ @pixi/accessibility |
์ฐ๋ฆฌ์ ๋์คํ๋ ์ด ์์คํ ์ ํตํด ์ง์ฌ์ง ๊ฒ์ ํค๋ณด๋ ๋ฐ ํ๋ฉด ํ๋ ๊ธฐ ์ ๊ทผ์ฑ์ ๊ฐ๋ฅํ๊ฒํ๋ ํ๋ถํ ๋๊ตฌ ์ธํธ. |
Major Components
COMPONENTDESCRIPTION
Renderer @pixi/core |
The core of the PixiJS system is the renderer, which displays the scene graph and draws it to the screen. The default renderer for PixiJS is based on WebGL under the hood. |
Container @pixi/display |
Main display object which creates a scene graph: the tree of renderable objects to be displayed, such as sprites, graphics and text. See Scene Graph for more details. |
Loader @pixi/loader |
The loader system provides tools for asynchronously loading resources such as images and audio files. |
Ticker @pixi/ticker |
Tickers provide periodic callbacks based on a clock. Your game update logic will generally be run in response to a tick once per frame. You can have multiple tickers in use at one time. |
Application @pixi/app |
The Application is a simple helper that wraps a Loader, Ticker and Renderer into a single, convenient easy-to-use object. Great for getting started quickly, prototyping and building simple projects. |
Interaction @pixi/interaction |
PixiJS supports both touch and mouse-based interaction - making objects clickable, firing hover events, etc. |
Accessibility @pixi/accessibility |
Woven through our display system is a rich set of tools for enabling keyboard and screen-reader accessibility. |
'๊ทธ๋ํฝ์ค > WebGl' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[2D WebGL][pixiJS] Renderer, Ticker, & Stage (0) | 2022.05.13 |
---|---|
[Spine][pixiJs] Api ์ฌ์ดํธ (0) | 2022.05.11 |
[2D WebGL][pixiJS] Getting Started! (0) | 2022.05.09 |
[2D WebGL][pixiJS] Architecture Overview (0) | 2022.05.09 |
[3D WebGL][three.js] three.js ํ๋ก์ ํธ ์์ํด๋ณด๊ธฐ (0) | 2022.05.09 |