Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

ipixel

1.0.4 • Public • Published

IPixel

NO_BORDER fit usage

first

var ipixel=new IPixel(game) after new Phaser.Game.

second

call ipixel.utility.noBorder() at boot state or load state,then call ipixel.utility.centerCamera() at preload or create function every game state.

param

//unnecessary width
game.scaleConfig.deltaX,
//unnecessary height
game.scaleConfig.deltaY,
//scale factor of your game
game.scaleConfig.factor,

if you have called ipixel.utility.centerCamera(),unnecessary width on the left and right should be game.scaleConfig.deltaX/2. Unnecessary height is the same as unnecessary height.

Keywords

none

install

npm i ipixel

Downloadsweekly downloads

6

version

1.0.4

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar