Skip to content

Commit

Permalink
update to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Nov 29, 2024
1 parent 89f1cb2 commit 578c77d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
8 changes: 5 additions & 3 deletions docs/guides/advanced/cache-as-texture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

The `cacheAsTexture` function in PixiJS is a powerful tool for optimizing rendering in your applications. By rendering a container and its children to a texture, `cacheAsTexture` can significantly improve performance for static or infrequently updated containers. Let's explore how to use it effectively, along with its benefits and considerations.

> **Note:** `cacheAsTexture` is PixiJS v8's equivalent of the previous `cacheAsBitmap` functionality. If you're migrating from v7 or earlier, simply replace `cacheAsBitmap` with `cacheAsTexture` in your code.
:::info Note
`cacheAsTexture` is PixiJS v8's equivalent of the previous `cacheAsBitmap` functionality. If you're migrating from v7 or earlier, simply replace `cacheAsBitmap` with `cacheAsTexture` in your code.
:::

---

Expand Down Expand Up @@ -77,7 +79,7 @@ import * as PIXI from 'pixi.js';
aliens.push(alien);
alienContainer.addChild(alien);
}

// this will cache the container and its children as a single texture
// so instead of drawing 100 sprites, it will draw a single texture!
alienContainer.cacheAsTexture()
Expand Down Expand Up @@ -158,4 +160,4 @@ Once the texture is cached, updating it via `updateCacheTexture()` is efficient

- **Reusing the texture**: If you want to create a new texture based on the container, its better to use `const texture = renderer.generateTexture(container)` and share that amongst you objects!

By understanding and applying `cacheAsTexture` strategically, you can significantly enhance the rendering performance of your PixiJS projects. Happy coding!
By understanding and applying `cacheAsTexture` strategically, you can significantly enhance the rendering performance of your PixiJS projects. Happy coding!
10 changes: 5 additions & 5 deletions docs/pixi-version.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"versionLabel": "v8.x",
"version": "8.6.1",
"releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v8.6.1",
"build": "https://pixijs.download/v8.6.1/pixi.min.js",
"docs": "https://pixijs.download/v8.6.1/docs/index.html",
"npm": "8.6.1",
"version": "8.6.2",
"releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v8.6.2",
"build": "https://pixijs.download/v8.6.2/pixi.min.js",
"docs": "https://pixijs.download/v8.6.2/docs/index.html",
"npm": "8.6.2",
"prerelease": false,
"latest": true
}
10 changes: 5 additions & 5 deletions pixi-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
},
{
"versionLabel": "v8.x",
"version": "8.6.1",
"releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v8.6.1",
"build": "https://pixijs.download/v8.6.1/pixi.min.js",
"docs": "https://pixijs.download/v8.6.1/docs/index.html",
"npm": "8.6.1",
"version": "8.6.2",
"releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v8.6.2",
"build": "https://pixijs.download/v8.6.2/pixi.min.js",
"docs": "https://pixijs.download/v8.6.2/docs/index.html",
"npm": "8.6.2",
"prerelease": false,
"latest": true,
"isCurrent": true
Expand Down

0 comments on commit 578c77d

Please sign in to comment.