Namespace: settings

PIXI.settings

User's customizable globals for overriding the default PIXI settings, such as a renderer's default resolution, framerate, float percision, etc.

Example

// Use the native window resolution as the default resolution
// will support high-density displays when rendering
PIXI.settings.RESOLUTION = window.devicePixelRatio.

// Disable interpolation when scaling, will make texture be pixelated
PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;

Members

PIXI.settings.CAN_UPLOAD_SAME_BUFFER boolean staticconstant

Can we upload the same buffer in a single frame?

PIXI.settings.FILTER_RESOLUTION number static

Default filter resolution.

Default Value:
  • 1

PIXI.settings.GC_MAX_CHECK_COUNT number static

Default Garbage Collection maximum check count.

Default Value:
  • 600

PIXI.settings.GC_MAX_IDLE number static

Default Garbage Collection max idle.

Default Value:
  • 3600

PIXI.settings.GC_MODE PIXI.GC_MODES static

Default Garbage Collection mode.

Default Value:
  • PIXI.GC_MODES.AUTO

PIXI.settings.MESH_CANVAS_PADDING number staticconstant

Default Mesh canvasPadding.

See:

PIXI.settings.MIPMAP_TEXTURES boolean static

If set to true WebGL will attempt make textures mimpaped by default. Mipmapping will only succeed if the base texture uploaded has power of two dimensions.

Default Value:
  • true

PIXI.settings.PRECISION Deprecated : since version 4.4.0 static

See:

PIXI.settings.PRECISION_FRAGMENT PIXI.PRECISION static

Default specify float precision in fragment shader.

Default Value:
  • PIXI.PRECISION.MEDIUM

PIXI.settings.PRECISION_VERTEX PIXI.PRECISION static

Default specify float precision in vertex shader.

Default Value:
  • PIXI.PRECISION.HIGH

PIXI.settings.RENDER_OPTIONS object staticconstant

The default render options if none are supplied to PIXI.WebGLRenderer or PIXI.CanvasRenderer.

Properties:
Name Type Default Description
view HTMLCanvasElement null
resolution number 1
antialias boolean false
forceFXAA boolean false
autoResize boolean false
transparent boolean false
backgroundColor number 0x000000
clearBeforeRender boolean true
preserveDrawingBuffer boolean false
roundPixels boolean false
width number 800
height number 600
legacy boolean false

PIXI.settings.RESOLUTION number static

Default resolution / device pixel ratio of the renderer.

Default Value:
  • 1

PIXI.settings.RETINA_PREFIX RegExp static

The prefix that denotes a URL is for a retina asset.

Default Value:
  • /@([0-9\.]+)x/
Example
`@2x`

PIXI.settings.SCALE_MODE PIXI.SCALE_MODES static

The scale modes that are supported by pixi.

Default Value:
  • PIXI.SCALE_MODES.LINEAR

PIXI.settings.SPRITE_BATCH_SIZE number static

The default sprite batch size.

The default aims to balance desktop and mobile devices.

Default Value:
  • 4096

PIXI.settings.SPRITE_MAX_TEXTURES number static

The maximum textures that this device supports.

Default Value:
  • 32

PIXI.settings.TARGET_FPMS number static

Target frames per millisecond.

Default Value:
  • 0.06

PIXI.settings.TRANSFORM_MODE PIXI.TRANSFORM_MODE static

Default transform type.

Default Value:
  • PIXI.TRANSFORM_MODE.STATIC

PIXI.settings.UPLOADS_PER_FRAME number static

Default number of uploads per frame using prepare plugin.

Default Value:
  • 4

PIXI.settings.WRAP_MODE PIXI.WRAP_MODES static

Default wrap modes that are supported by pixi.

Default Value:
  • PIXI.WRAP_MODES.CLAMP