pixi-pause

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i pixi-pause

Weekly Downloads

3

Version

1.0.3

License

MIT

Last publish

Collaborators

  • brenwell