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.FILTER_RESOLUTIONnumberstatic

Default filter resolution.

Default Value:
  • 1

PIXI.settings.GC_MAX_CHECK_COUNTnumberstatic

Default Garbage Collection maximum check count.

Default Value:
  • 600

PIXI.settings.GC_MAX_IDLEnumberstatic

Default Garbage Collection max idle.

Default Value:
  • 3600

PIXI.settings.GC_MODEPIXI.GC_MODESstatic

Default Garbage Collection mode.

Default Value:
  • PIXI.GC_MODES.AUTO

PIXI.settings.MIPMAP_TEXTURESbooleanstatic

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.PRECISIONstatic

Deprecated
  • since version 4.4.0
    See:

    PIXI.settings.PRECISION_FRAGMENTPIXI.PRECISIONstatic

    Default specify float precision in fragment shader.

    Default Value:
    • PIXI.PRECISION.MEDIUM

    PIXI.settings.PRECISION_VERTEXPIXI.PRECISIONstatic

    Default specify float precision in vertex shader.

    Default Value:
    • PIXI.PRECISION.HIGH

    PIXI.settings.RENDER_OPTIONSobjectstaticconstant

    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.RESOLUTIONnumberstatic

    Default resolution / device pixel ratio of the renderer.

    Default Value:
    • 1

    PIXI.settings.RETINA_PREFIXRegExpstatic

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

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

    PIXI.settings.SCALE_MODEPIXI.SCALE_MODESstatic

    The scale modes that are supported by pixi.

    Default Value:
    • PIXI.SCALE_MODES.LINEAR

    PIXI.settings.SPRITE_BATCH_SIZEnumberstatic

    The default sprite batch size.

    The default aims to balance desktop and mobile devices.

    Default Value:
    • 4096

    PIXI.settings.SPRITE_MAX_TEXTURESnumberstatic

    The maximum textures that this device supports.

    Default Value:
    • 32

    PIXI.settings.TARGET_FPMSnumberstatic

    Target frames per millisecond.

    Default Value:
    • 0.06

    PIXI.settings.TRANSFORM_MODEPIXI.TRANSFORM_MODEstatic

    Default transform type.

    Default Value:
    • PIXI.TRANSFORM_MODE.STATIC

    PIXI.settings.UPLOADS_PER_FRAMEnumberstatic

    Default number of uploads per frame using prepare plugin.

    Default Value:
    • 4

    PIXI.settings.WRAP_MODEPIXI.WRAP_MODESstatic

    Default wrap modes that are supported by pixi.

    Default Value:
    • PIXI.WRAP_MODES.CLAMP