1.0.3 • Published 6 years ago

pixi-pause v1.0.3

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

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