pixi-pause
v1.0.3
Published
Plugin for pixi.js, which automatically pauses and resumes your App's rendering when the browser window's visibility changes
Downloads
6
Maintainers
Readme
pixi-pause
pixi-pause is a pixi.js plugin which automatically pauses and resumes your PIXI.Application
when the browser window's visibilty is changed.
Install
npm i pixi-pause
Usage
Basic usage
Importing
Pixi pause will automatically begin listening to visibilty changes.
common.js
require('pixi.js')
require('pixi-pause')
es6 modules
import pixi from 'pixi.js'
import pixiPause from 'pixi-pause'
Disable
pixi-pause will be enabled by default. But occassionaly it is important to disable automatic pausing and resuming.
// disable
PIXI.autoPause = false
// enable
PIXI.autoPause = true