File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,13 @@ backdrop.height = app.view.height;
1818backdrop . anchor = { x : 0 , y : 0 } ;
1919app . stage . addChild ( backdrop ) ;
2020
21- const emitter = PIXI . Particles . from ( '/demo/assets/star.png' , 15 ) ;
22- app . stage . addChild ( emitter ) ;
21+ const emitter = PIXI . Particles . from ( '/demo/assets/star.png' , 250 ) ;
22+ emitter . life = app . view . width ;
23+ emitter . direction = Math . PI * 1.5 ;
24+ emitter . spread = Math . PI ;
25+ emitter . x = app . view . width * 0.5 ;
26+ emitter . y = app . view . height ;
27+ app . stage . addChild ( emitter )
2328
2429let planet = new PIXI . Sprite ( tex . planet ) ;
2530planet . anchor = { x : 0.5 , y : 0.5 } ;
@@ -35,8 +40,6 @@ player.speedMult = 8;
3540app . stage . addChild ( player ) ;
3641
3742app . ticker . add ( ( deltaTime ) => {
38- emitter . x = planet . x ;
39- emitter . y = planet . y ;
4043 emitter . step ( deltaTime ) ;
4144 planet . x = ( PIXI . clamp ( PIXI . Mouse . x , 0 , app . view . width ) + 0.5 ) ^ 0 ;
4245 planet . y = ( PIXI . clamp ( PIXI . Mouse . y , 0 , app . view . height ) + 0.5 ) ^ 0 ;
You can’t perform that action at this time.
0 commit comments