pixijs-scene-container

安装量: 850
排名: #4679

安装

npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-scene-container

Container is the general-purpose node of the PixiJS v8 scene graph. It holds children and applies transforms, alpha, tint, and blend mode to its whole subtree. Every display object you make will either be a Container you're building a branch on, or a leaf ( Sprite , Graphics , Text , Mesh ) that you nest inside one. Assumes familiarity with pixijs-scene-core-concepts . Quick Start const group = new Container ( { label : "hero-group" , x : 200 , y : 150 , sortableChildren : true , } ) ; const body = new Sprite ( await Assets . load ( "body.png" ) ) ; const head = new Sprite ( await Assets . load ( "head.png" ) ) ; head . position . set ( 0 , - 40 ) ; head . zIndex = 1 ; group . addChild ( body , head ) ; group . pivot . set ( group . width / 2 , group . height / 2 ) ; group . scale . set ( 1.5 ) ; app . stage . addChild ( group ) ;

返回排行榜