Skip to content

Releases: pixijs/pixijs

v8.18.1

14 Apr 20:00

Choose a tag to compare

v8.18.0

14 Apr 14:57

Choose a tag to compare

💾 Download

Installation:

npm install pixi.js@8.18.0

Development Build:

Production Build:

Documentation:

Changed

v8.17.1...v8.18.0

🚨 Behavior Change

  • fix: text.width and word wrap returning incorrect values by @Zyie in #12007
    • Text/HTMLText/BitmapText with wordWrap: true and non-left align (center/right/justify) now return the true rendered width from text.width instead of reporting wordWrapWidth. If you relied on text.width === wordWrapWidth for layout, use wordWrapWidth directly or wrap the text in a sized container.
    const text = new Text({
        text: 'hello',
        style: { wordWrap: true, wordWrapWidth: 800, align: 'center' },
    });
    // before: text.width === 800
    // after:  text.width reflects the rendered string width

🎁 Added

  • feat: add graphicsContextToSvg() for Graphics → SVG export by @GoodBoyDigital in #11989
    • Adds graphicsContextToSvg(source, precision?), a pure function that serializes a Graphics or GraphicsContext to a self-contained SVG string. Supports rects, circles, ellipses, rounded rects, polygons, bezier/quadratic/arc paths, strokes, holes (via fill-rule="evenodd"), and linear/radial gradients.
    import { Graphics, graphicsContextToSvg } from 'pixi.js';
    
    const g = new Graphics()
        .rect(0, 0, 100, 50)
        .fill({ color: 0xff0000 })
        .circle(150, 25, 25)
        .stroke({ color: 0x0000ff, width: 4 });
    
    const svgString = graphicsContextToSvg(g, 2);
    await navigator.clipboard.writeText(svgString);
  • feat: add mask channel selection for sprite masks by @Zyie in #11987
    • setMask() gains a channel option ('red' | 'alpha') to pick which texture channel drives visibility, matching how design tools like Figma apply PNG masks. Default remains 'red'.
    import { Assets, Sprite } from 'pixi.js';
    
    const photo = new Sprite(await Assets.load('photo.png'));
    const maskSprite = new Sprite(await Assets.load('mask-alpha.png'));
    
    photo.setMask({
        mask: maskSprite,
        channel: 'alpha',
    });
  • feat: allow preference to accept an array of renderer types by @Zyie in #11963
    • autoDetectRenderer and Application.init now accept an array of renderer names for preference, letting you restrict the fallback chain (e.g. disable WebGPU entirely) rather than only reorder it. A new RendererPreference type is exported.
    import { Application, autoDetectRenderer } from 'pixi.js';
    
    const renderer = await autoDetectRenderer({
        preference: ['webgl', 'canvas'],
    });
    
    const app = new Application();
    await app.init({ preference: ['webgl', 'canvas'] });
  • feat: provide a getter to the domElement via app.domContainerRoot by @carlos22 in #11974
    • Application exposes a read-only domContainerRoot getter returning the HTMLDivElement that wraps all DOMContainer elements, so apps can add CSS classes, inline styles, or customize the DOM overlay root.
    import { Application } from 'pixi.js';
    
    const app = new Application();
    await app.init({ resizeTo: window });
    
    app.domContainerRoot.classList.add('pixi-dom-layer');
    app.domContainerRoot.style.pointerEvents = 'auto';
  • feat: add width option to MeshRope by @mehmetcanakbay in #11990
    • MeshRope now accepts an explicit width for rope thickness, decoupling it from the texture's height. Omitting width preserves the previous texture.height default.
    import { MeshRope, Point, Texture } from 'pixi.js';
    
    const points = [new Point(0, 0), new Point(100, 50), new Point(200, 0)];
    
    const rope = new MeshRope({
        texture: Texture.from('snake.png'),
        points,
        width: 40,
    });
  • feat: add a default anchor to texture generation by @ksv90 in #12011
    • renderer.generateTexture() accepts a defaultAnchor option that's forwarded onto the produced Texture. RenderTexture.create() also gains a textureOptions parameter to pass through fields like defaultAnchor to the underlying Texture.
    import { Graphics, Sprite } from 'pixi.js';
    
    const shape = new Graphics().circle(0, 0, 50).fill(0xff3366);
    
    const texture = app.renderer.generateTexture({
        target: shape,
        defaultAnchor: { x: 0.5, y: 0.5 },
    });
    
    const sprite = new Sprite(texture);
    sprite.position.set(200, 200); // centered by default

🐛 Fixed

  • fix: stroke-only Graphics masks now render correctly on Canvas renderer by @DmitriyGolub in #11979
  • fix: skip _applyMipRange for single-mip textures (iOS 18.0–18.1) by @GoodBoyDigital in #11985
  • fix: stale TextureMatrix when pooled textures reuse the same reference by @GoodBoyDigital in #11997
  • fix: unhandled actions in GraphicsPath.transform() switch statement by @Zyie in #11996
  • fix(VideoSource): avoid play/mediaReady recursion before video dimensions (#11133) by @satoren in #12009
  • fix: text.width and word wrap returning incorrect values by @Zyie in #12007
  • fix: handle literal < characters in parseTaggedText by @glennflanagan in #11972
  • fix: move CanvasFilterSystem to the filters module by @Zyie in #12014
  • fix: SplitText baseline mismatch when tagStyles used with lineHeight by @Zyie in #12008
  • fix: TilingSprite.tilePosition divided by resolution when using Canvas renderer by @Zyie in #11957
  • fix: move CanvasFilterSystem to filters module by @Zyie in #12014
  • fix(VideoSource): avoid play/mediaReady recursion before video dimensions by @satoren in #12009

🧹 Chores

  • chore: bump @xmldom/xmldom to 0.8.12 by @Zyie in #12016

New Contributors

v8.17.1

16 Mar 09:23

Choose a tag to compare

💾 Download

Installation:

npm install pixi.js@8.17.1

Development Build:

Production Build:

Documentation:

Changed

v8.17.0...v8.17.1

🐛 Fixed

  • fix: compressed textures ignoring resolution from URL (e.g. @0.75x) by @Zyie in #11960
  • fix: center-align text correctly when words exceed wordWrapWidth by @Zyie in #11966

🧹 Chores

  • chore: fix BitmapFont char keys from char codes to character strings by @Zyie in #11967
  • fix: add secrets: inherit to publish-switch workflow for S3 docs upload by @Zyie in #11962

v8.17.0

09 Mar 15:29

Choose a tag to compare

💾 Download

Installation:

npm install pixi.js@8.17.0

Development Build:

Production Build:

Documentation:

Changed

v8.16.0...v8.17.0

🚨 Behavior Change

  • BlurFilter now uses an optimized halving strength scheme by default, which changes visual output compared to previous versions. Set legacy: true to restore the old behavior.
    new BlurFilter({ legacy: true });
    // or globally:
    BlurFilter.defaultOptions.legacy = true;
  • Text with align: 'justify' now uses wordWrapWidth for width calculation instead of maxLineWidth, matching CSS behavior. The last line is no longer stretched.
  • breakWords: true in HTMLText now correctly uses CSS word-break: break-word instead of break-all to match behavior of other text renderers.

🎁 Added

  • feat: add tagged text support to canvasTextSplit by @Zyie in #11949
    • SplitText now supports tagStyles, so styled runs (e.g. <red>Hello</red> <blue>World</blue>) are correctly split into per-character Text objects with individual styles preserved.
  • feat: Improves text rendering and layout handling by @Zyie in #11947
    • Bitmap text now supports whiteSpace modes (normal, pre, nowrap, pre-line, pre-wrap) with proper space/newline collapsing
    • Bitmap text word wrap supports break-after characters (hyphens, en-dash, em-dash, soft hyphen)
    • Canvas text and split text now render align: 'justify' by distributing extra word spacing
    • Dynamic bitmap fonts scale drop shadow blur and distance proportionally to font size
    • Bitmap font xAdvance now uses true advance width from measureText() instead of bounding-box width
    • Kerning values correctly scaled by fontScale in dynamic bitmap fonts
  • feat: add visibleChanged event to container by @ikigai-bjorn-s in #11940
    container.on('visibleChanged', (visible) => {
        console.log('Visibility changed to:', visible);
    });
  • feat: Add function for removing aliases from resolver by @Sertion in #11921

🐛 Fixed

  • fix: prevent filter corruption with TexturePool mipmap separation by @vkarponen in #11865
  • fix: blur by reducing strength on each pass by @Zyie in #11909
  • fix: Reduce work done by the blur shader by @Sertion in #11917
  • fix: Correctly handle offset in ColorMatrixFilter by @Sertion in #11925
  • fix: Apply global filter offset to ParticleContainer rendering by @GoodBoyDigital in #11882
  • fix: respect texture trim offset in NineSliceSprite by @shtse8 in #11919
  • fix: return valid empty bounds from empty Graphics by @GoodBoyDigital in #11908
  • fix: Graphics getLocalBounds returns stale data between operations in same frame by @GoodBoyDigital in #11886
  • fix: Graphics bounds account for miter joins at sharp angles by @GoodBoyDigital in #11884
  • fix: BindGroup crash when resource destroyed in batched group by @GoodBoyDigital in #11876
  • fix: remove listener from old resource in BindGroup.setResource by @GoodBoyDigital in #11901
  • fix: removeAllListeners() on Renderer.destroy() by @taye in #11951
  • fix: correct minFPS/maxFPS mutual clamping in Ticker by @Zyie in #11952
  • fix: invalidate cached source in color.setAlpha() to prevent stale alpha reuse by @darthvader58 in #11924
  • fix: emit removed event when using addChildAt by @aSipz in #11912
  • fix: guard against missing characters and kerning data in bitmap text by @stargazer-2697 in #11907
  • fix: copy modifier keys from TouchEvent to normalized touch objects by @kaigritun in #11906
  • fix: use quotes when loading a Web font to support old versions of Chrome by @adngdb in #11902
  • fix: move DOMPipe registration to init.ts to fix Web Worker support by @Zyie in #11953
  • fix: clarify BackgroundLoader cache behavior in documentation by @imuday984 in #11935

🧹 Chores

  • chore: Add PixiJS development playground by @GoodBoyDigital in #11878
  • chore: overhaul documentation system with TypeDoc plugins, examples, and guides by @Zyie in #11905
  • chore: consolidate build and test scripts by @Zyie in #11910
  • chore: expand build, test, and API documentation by @Zyie in #11956
  • chore: combine visual test diff output into single labeled image by @Zyie in #11954
  • chore: add ESLint rule enforcing ~/ imports in test and scene files by @Zyie in #11899
  • chore: reorganizes visual scene tests into logical subdirectories by @Zyie in #11872
  • chore: Improve test server setup by dynamically allocating port by @Zyie in #11874
  • chore: increase HTMLText visual test wait from 250ms to 350ms by @Zyie in #11891
  • chore: remove tsc-silent dependency by @Zyie
  • docs: document filters + RenderLayer limitation by @GoodBoyDigital in #11883

New Contributors

v8.16.0

03 Feb 16:55

Choose a tag to compare

💾 Download

Installation:

npm install pixi.js@8.16.0

Development Build:

Production Build:

Documentation:

Changed

v8.15.0...v8.16.0

🚨 Behavior Change

  • SplitText now more accurately splits Text across a wider range of TextStyle configurations. This may result in slight changes to character positioning.
  • Using SplitText.from from an existing Text now correctly transfers the source anchor to the new instance by mapping the anchor to pivot coordinates. This changes layout and positioning compared to previous behavior.
  • SplitBitmapText now correctly defaults to a white fill, matching the behavior of BitmapText.
  • HTMLText now correctly respects breakWords and no longer cuts off words that exceed wordWrapWidth.
  • HTMLText now respects the alpha value of its fill and stroke.
  • Text now correctly aligns when using align: 'right' or align: 'center', resulting in a small positional adjustment.
  • Container.cullArea is now correctly interpreted in the container’s local coordinate space and transformed to global coordinates before culling checks.
    // cullArea is defined in local space and transformed during culling
    container.cullArea = new Rectangle(0, 0, 100, 100);
  • graphics.texture(texture, 0x000000) will now correctly apply a black tint

🎁 Added

  • feat: Canvas renderer by @krzys @Zyie in #11815
    • Note: This feature is experimental, please let us know if you run into any issues.
     await app.init({
          preference: 'canvas'
      });
  • feat: tagged text by @Zyie in #11827
    • Note: Currently only works for Text/HTMLText, BitmapText support coming soon
     const text = new Text({
      text: '<bold>Important:</bold> This is <highlight>highlighted</highlight> text',
      style: {
          fontFamily: 'Arial',
          fontSize: 28,
          fill: 'white',
          tagStyles: {
              bold: { fontWeight: 'bold', fill: 'yellow' },
              highlight: { fill: 'cyan', fontSize: 32 }
          }
      }
     });
  • feat: improve stability of SplitText by @Zyie in #11858
    • SplitText now fully mirrors Text behavior and regenerates automatically when its TextStyle changes via text.styleChanged()
    splitText.style.fontSize = 32
    splitText.styleChanged()
  • feat: external texture support by @astralarya @GoodBoyDigital in #11846 #11861
  • feat: add parseSync to spritesheet by @jimhigson in #11794
  • feat: improved Pool typing for pool.get() method by @unstoppablecarl in #11799
  • feat: add cube texture by @GoodBoyDigital in #11800
  • by @GoodBoyDigital in
  • feat: Implement mip level rendering support in the rendering system by @GoodBoyDigital in #11801
  • feat: render to array layer by @GoodBoyDigital in #11803

🐛 Fixed

🧹 Chores

  • chore: add visual tests for text rendering features by @Zyie in #11825
  • chore: Upgrades dependencies by @Zyie in #11806
  • chore: guide to use envinfo to get environment information by @typed SIGTERM in #11859
  • chore: optimize fastCopy with waterfall typed array selection by @GoodBoyDigital in #11798
  • chore: use texImage2D instead of texSubImage2D for video in Safari by @GoodBoyDigital in #11867

New Contributors

v8.15.0

05 Jan 10:10

Choose a tag to compare

💾 Download

Installation:

npm install pixi.js@8.15.0

Development Build:

Production Build:

Documentation:

Changed

v8.14.3...v8.15.0

🎁 Added

  • feat: add unified GC by @Zyie in #11786
    • Deprecated TextureGCSystem/RenderableGCSystem in favor of GCSystem.
      // old 
      app.init({
          textureGCActive: true,
          textureGCMaxIdle: 60000,
          textureGCCheckCountMax: 30000,
          renderableGCActive: true,
          renderableGCMaxUnusedTime: 60000,
          renderableGCFrequency: 30000,
      });
      
      // new
      app.init({
        gcActive: true,
        gcMaxUnusedTime: 60000,
        gcFrequency: 30000,
      });
    • feat: Adds auto-GC option to view containers by @Zyie in #11810
      • Disable automatic garbage collection for a node.
         new Sprite({
             autoGarbageCollect: false,
         });
  • feat: add unload method to reset GPU data by @Zyie in #11762
    • You can now manually unload a node by calling its unload method. This releases any GPU resources associated with the node. The node can still be used afterward—it will be re-created automatically when needed.

      sprite.unload();
      text.unload();
      mesh.unload(); 
    • feat: move GPU context storage to GraphicsContext._gpuData by @Zyie in #11763

    • feat: move GPU data to Geometry._gpuData by @Zyie in #11772

    • feat: move GPUData to TextureSource by @Zyie in #11774

    • feat: move GL/GPU buffer storage to Buffer._gpuData and manage buffers list by @Zyie in #11775

    • feat: add descriptive names GCManagedHash by @Zyie in #11811

    • feat: update text GPU lifecycle and resolution updates by @Zyie in #11781

  • feat: ParticleContainer type improvements by @unstoppablecarl in #11708
  • feat: allow RenderTexture.create to accept dynamic option by @seanzhaoxiaoxiao in #11767

🐛 Fixed

🧹 Chores

  • chore: Improve JSDoc documentation across modules by @Zyie in #11812
  • chore: refactors CI workflows for trusted publishing by @Zyie in #11820

New Contributors

v8.15.0-rc

08 Dec 17:43

Choose a tag to compare

v8.15.0-rc Pre-release
Pre-release

💾 Download

Installation:

npm install pixi.js@8.15.0-rc

Development Build:

Production Build:

Documentation:

Changed

v8.14.3...v8.15.0-rc

🎁 Added

  • feat: allow RenderTexture.create to accept dynamic option by @seanzhaoxiaoxiao in #11767
  • feat: add unload method to reset GPU data by @Zyie in #11762
  • feat: add unified GC by @Zyie in #11786
    • feat: move GPU context storage to GraphicsContext._gpuData by @Zyie in #11763
    • feat: move GPU data to Geometry._gpuData by @Zyie in #11772
    • feat: move GPUData to TextureSource by @Zyie in #11774
    • feat: move GL/GPU buffer storage to Buffer._gpuData and manage buffers list by @Zyie in #11775
    • feat: update text GPU lifecycle and resolution updates by @Zyie in #11781
  • feat: ParticleContainer type improvements by @unstoppablecarl in #11708

🐛 Fixed

New Contributors

v8.14.3

20 Nov 12:35

Choose a tag to compare

v8.14.2

18 Nov 09:23

Choose a tag to compare

💾 Download

Installation:

npm install pixi.js@8.14.2

Development Build:

Production Build:

Documentation:

Changed

v8.14.1...v8.14.2

🐛 Fixed

  • fix: graphics memory leak and cleanup by @Zyie in #11753
  • fix: typo in Application example: replace '-' with '=' in asset loading by @Aryaman1792 in #11750
  • fix: parse resolution and format from URLs in object sources in assets resolver by @stereopasa in #11747
  • fix: track item count in Pool class and add related tests by @Zyie in #11760
  • fix: bitmanFontXMLParser should recognize xml fonts with versions by @rafalaidlaw in #11761
  • fix: Remove automatically added 'resize' event listener from TextureSource on Texture destroy() by @Romans-I-XVI in #11764
  • fix: resolve a typescript annoyance with Container.filters by @jimhigson in #11757
  • fix: enable proper application reinitialization by @Zyie in #11759
  • fix: correct uBackTexture binding for filters with blendRequired by @GoodBoyDigital in #11754

🧹 Chores

  • chore: add mention of uBackTexture to Filter docs (otherwise undocumented) by @jimhigson in #11756

New Contributors

v8.14.1

10 Nov 09:32

Choose a tag to compare

💾 Download

Installation:

npm install pixi.js@8.14.1

Development Build:

Production Build:

Documentation:

Changed

v8.14.0...v8.14.1

🐛 Fixed

  • fix: bytesPerRow calculation for BufferImageSource in WebGPU by @koteelok in #11718
  • fix: Guards mask reset from null reference by @Zyie in #11719
  • fix: Prevents errors during worker manager reset by @Zyie in #11720

🧹 Chores