Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to docusaurus v3 #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions babel.config.js

This file was deleted.

6 changes: 1 addition & 5 deletions blog/2023-02-17-pixi-universe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
title: Introducing the PixiJS Universe!
description: PixiJS v2 Website Brief Description
slug: pixi-universe
authors:
- name: Zyie
title: PixiJS Maintainer
url: https://github.com/zyie
image_url: https://github.com/zyie.png
authors: zyie
tags: [PixiJS, PixiJS Universe]
hide_table_of_contents: true
keywords: ['keyword', 'for', 'search', 'engines']
Expand Down
6 changes: 1 addition & 5 deletions blog/2023-10-03-pixi-v8-beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
title: PixiJS v8 Beta! 🎉
description: PixiJS v8 The Future of 2D Web Graphics Is (almost!) Here!
slug: pixi-v8-beta
authors:
- name: GoodBoyDigital
title: PixiJS Creator
url: https://github.com/GoodBoyDigital
image_url: https://github.com/GoodBoyDigital.png
authors: [mat, zyie]
tags: [PixiJS, WebGPU, WebGL]
hide_table_of_contents: true
keywords: ['PixiJS', 'pixi.js', 'webGL', 'webGPU', 'performance', '2d rendering', '2d webGL', 'javascript graphics', 'game development']
Expand Down
8 changes: 2 additions & 6 deletions blog/2024-03-05-pixi-v8-launches.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
title: PixiJS v8 Launches! 🎉
description: PixiJS v8 The Future of 2D Web Graphics is Here!
slug: pixi-v8-launches
authors:
- name: GoodBoyDigital
title: PixiJS Creator
url: https://github.com/GoodBoyDigital
image_url: https://github.com/GoodBoyDigital.png
authors: [mat, zyie]
tags: [PixiJS, WebGPU, WebGL]
hide_table_of_contents: true
keywords: ['PixiJS', 'pixi.js', 'webGL', 'webGPU', 'performance', '2d rendering', '2d webGL', 'javascript graphics', 'game development']
Expand Down Expand Up @@ -197,7 +193,7 @@ myContainer.blendMode = 'color-burn` // easy!

```

For more information on these graphics upgrades and guidance on how to adapt to the enhanced Graphics API, please refer to the [migration guide](/8.x/guides/migrations/v8), or why not jump in and play with some [examples](8.x/examples/graphics/simple).
For more information on these graphics upgrades and guidance on how to adapt to the enhanced Graphics API, please refer to the [migration guide](/8.x/guides/migrations/v8), or why not jump in and play with some [examples](/8.x/examples/graphics/simple).

#### 📝 Text Upgrades

Expand Down
6 changes: 1 addition & 5 deletions blog/2024-06-14-pixi-spine.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
title: PixiJS Joins the Spine 4.2 Physics Revolution! 🚀
description: Elevate your animations with Spine 1.1.0 and the revolutionary physics features of Spine 4.2, now fully integrated with PixiJS v8.
slug: pixi-js-hearts-spine
authors:
- name: GoodBoyDigital
title: PixiJS Creator
url: https://github.com/GoodBoyDigital
image_url: https://github.com/GoodBoyDigital.png
authors: mat
tags: [PixiJS, Spine, WebGL, WebGPU, Animation]
hide_table_of_contents: true
keywords: ['PixiJS', 'Spine', 'webGL', 'webGPU', '2D animation', 'JavaScript graphics', 'game development']
Expand Down
8 changes: 2 additions & 6 deletions blog/2024-07-18-assetpack-1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
title: AssetPack 1.0.0 Release!
description: AssetPack 1.0.0 is here! 🎉
slug: assetpack-1.0.0
authors:
- name: Zyie
title: PixiJS Co-owner
url: https://github.com/Zyie
image_url: https://github.com/Zyie.png
authors: zyie
tags: [PixiJS, AssetPack, Web, Games, Spine, Optimisation, 'Asset Management']
hide_table_of_contents: true
keywords: ['PixiJS', 'Spine', 'JavaScript', 'game development', 'web development', 'asset management', 'loading']
Expand Down Expand Up @@ -80,7 +76,7 @@ To install AssetPack, you need to install the `@assetpack/core` package.
npm install --save-dev @assetpack/core
```

:::info COMPATIBILITY NOTE
:::info[COMPATIBILITY NOTE]
AssetPack requires [Node.js](https://nodejs.org/en/) version 20+, please upgrade if your package manager warns about it.
:::

Expand Down
6 changes: 1 addition & 5 deletions blog/2024-10-03-pixi-v8-particle-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
title: ParticleContainer - The New Speed Demon in PixiJS v8
description: Introducing the new ParticleContainer in PixiJS v8—faster than ever, optimized for rendering millions of particles effortlessly.
slug: particlecontainer-v8
authors:
- name: Mat Groves
title: PixiJS
url: https://github.com/GoodboyDigital
image_url: https://github.com/GoodboyDigital.png
authors: mat
tags: [PixiJS, ParticleContainer, WebGL, Games, Performance, Optimization]
hide_table_of_contents: true
keywords: ['PixiJS', 'ParticleContainer', 'game development', 'web graphics', 'optimization', 'WebGL']
Expand Down
18 changes: 7 additions & 11 deletions blog/2025-11-29-pixi-v8.6.0.md → blog/2024-11-29-pixi-v8.6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
title: PixiJS Update - Survey & v8.6.0
description: A look at the recent updates and improvements in PixiJS.
slug: better-docs-v8
authors:
- name: Zyie
title: PixiJS Admin
url: https://github.com/zyie
image_url: https://github.com/zyie.png
authors: zyie
tags: [PixiJS, Updates, Improvements]
hide_table_of_contents: true
keywords: ['PixiJS', 'Updates', 'Improvements', 'QoL']
Expand Down Expand Up @@ -46,7 +42,7 @@ These changes will take time, but they are high on our priority list. If you hav
## ✨ What’s New?
We’ve been hard at work delivering new features and improvements, but let’s be honest—we haven’t done the best job announcing them. Here’s a quick rundown of the highlights from our recent releases.

:::info NOTE
:::info[NOTE]
We will be bringing out more detailed guides/examples on all of these features as well, this is just the start!
:::

Expand All @@ -56,13 +52,13 @@ We will be bringing out more detailed guides/examples on all of these features a
This can be great for performance if the container is static, as instead of rendering all the children etc., it will just render a single texture.
As well as this the process of caching is also relatively low cost, with the trade-off being memory usage as the use of a texture does increase memory (for the texture itself).

:::info Guide
:::info[Guide]
We have a full guide on this feature [here](/8.x/guides/advanced/cache-as-texture).
:::
<Example id="basic.cacheAsTexture" pixiVersion={version} mode={"embedded"}/>
- **pixelLine**: The `pixelLine` property is a neat feature of the PixiJS Graphics API that allows you to create lines that remain 1 pixel thick, regardless of scaling or zoom level. This feature is especially useful for achieving crisp, pixel-perfect visuals, particularly in retro-style or grid-based games, technical drawing, or UI rendering.

:::info Guide
:::info[Guide]
We have a full guide on this feature [here](/8.x/guides/components/graphics-pixel-line).
:::
<Example id="graphics.pixelLine" pixiVersion={version} mode={"embedded"}/>
Expand Down Expand Up @@ -90,7 +86,7 @@ We will be bringing out more detailed guides/examples on all of these features a
const globalAlpha = container.getGlobalAlpha(skipUpdate);
```

:::info INFO
:::info[INFO]
if `skipUpdate` is true - it will be faster but may be outdated - uses the last rendered data

if `skipUpdate` is false - it will be 100% accurate but slower - recalculates transform chain
Expand All @@ -100,7 +96,7 @@ We will be bringing out more detailed guides/examples on all of these features a

The `ParticleContainer` shines when you need insane numbers of visual elements on-screen, especially when you want them moving and interacting in real time. Whether you're building particle effects, swarms of characters, or abstract art installations, PixiJS v8 has you covered. The static vs. dynamic property system gives you granular control over performance, allowing you to fine-tune the balance between flexibility and speed.

:::info Blog
:::info[Blog]
We have a blog post on this feature [here](/blog/particlecontainer-v8).
:::
<Example id="basic.particleContainer" pixiVersion={version} mode={"embedded"}/>
Expand All @@ -114,7 +110,7 @@ We will be bringing out more detailed guides/examples on all of these features a
- **Multiview**: Support for renderering the same context to multiple canvases. Eliminating the need for multiple PixiJS instances and duplicating resources.
Simply add `await app.init({ multiView: true})` and when rendering, pass in the target canvas to render to. `renderer.render({ container, target: canvasOnDom1 })`

:::tip EXPERIMENTAL
:::tip[EXPERIMENTAL]
This feature is still experimental and currently interaction only works on the first canvas.
:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
title: PixiJS Update - Start building with PixiJS in just one command! 🚀
description: A look at the new PixiJS Create CLI and Creation Templates for easier project setup.
slug: create-cli
authors:
- name: Zyie
title: PixiJS Admin
url: https://github.com/zyie
image_url: https://github.com/zyie.png
authors: zyie
tags: [PixiJS, Updates, Improvements, QoL, Templates, CLI]
hide_table_of_contents: true
keywords: ['PixiJS', 'Updates', 'Improvements', 'QoL', 'Templates', 'CLI']
Expand All @@ -26,7 +22,7 @@ An easy to use CLI that provides templates for using PixiJS with your favourite

<Gif src="/images/blog/pixi-create-demo.gif" alt="PixiJS Create CLI Demo" />

<!--truncate-->
{/* truncate */}

## 🚀 Getting Started

Expand Down
17 changes: 17 additions & 0 deletions blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
zyie:
name: Zyie
title: PixiJS Admin
url: https://github.com/zyie
image_url: https://github.com/zyie.png
socials:
github: zyie
x: _Zyie_
bluesky: https://bsky.app/profile/zyie.bsky.social
mat:
name: Mat Groves
title: PixiJS Creator
url: https://github.com/GoodboyDigital
image_url: https://github.com/GoodboyDigital.png
socials:
github: GoodboyDigital
x: Doormat23
2 changes: 1 addition & 1 deletion docs/guides/advanced/cache-as-texture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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.

:::info Note
:::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
14 changes: 7 additions & 7 deletions docs/guides/migrations/v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Welcome to the PixiJS v8 Migration Guide! This document is designed to help you
3. [Deprecated Features](#deprecated-features)
4. [Resources](#resources)

## 1. Introduction
## 1. Introduction {#introduction}

PixiJS v8 introduces several exciting changes and improvements that dramatically enhance the performance of the renderer. While we've made efforts to keep the migration process as smooth as possible, some breaking changes are inevitable. This guide will walk you through the necessary steps to migrate your PixiJS v7 project to PixiJS v8.

## 2. Breaking Changes
## 2. Breaking Changes {#breaking-changes}

Before diving into the migration process, let's review the breaking changes introduced in PixiJS v8. Make sure to pay close attention to these changes as they may impact your existing codebase.

Expand Down Expand Up @@ -137,7 +137,7 @@ PixiJS will now need to be initialised asynchronously. With the introduction of
### ** Texture adjustments **

Textures structures have been modified to simplify what was becoming quite a mess behind the scenes in v7.
Textures no longer know or manage loading of resources. This needs to be done upfront by you or the assets manager. Textures expect full loaded resources only. This makes things so much easier to manage as the validation of a texture can essentially be done at construction time and left at that!
Textures no longer know or manage loading of resources. This needs to be done upfront by you or the assets manager. Textures expect full loaded resources only. This makes things so much easier to manage as the validation of a texture can essentially be done at construction time and left at that!
BaseTexture no longer exists. In stead we now have a variety of TextureSources available. A texture source combines the settings of a texture with how to upload and use that texture. In v8 there are the following texture sources:

TextureSource - a vanilla texture that you can render too or upload however you wish. (used mainly by render textures)
Expand Down Expand Up @@ -383,7 +383,7 @@ The best way to play and fully and get to know this new setup please check out t
**new**: [v8 example](https://pixijs.com/8.x/examples/mesh-and-shaders/triangle-color)


### Filters
### Filters

Filters work almost exactly the same, unless you are constructing a custom one. If this is the case, the shader changes mentioned above need to taken into account.

Expand Down Expand Up @@ -446,7 +446,7 @@ export interface IParticle
}
```

The reason for this change is that sprites come with many extra properties and events that are generally unnecessary when dealing with large numbers of particles. This approach explicitly removes any ambiguity we had in v7, such as "Why doesn't my sprite work with filters?" or "Why can't I nest children in my sprites?" It’s a bit more predictable. Additionally, due to the lightweight nature of particles, this means we can render far more of them!
The reason for this change is that sprites come with many extra properties and events that are generally unnecessary when dealing with large numbers of particles. This approach explicitly removes any ambiguity we had in v7, such as "Why doesn't my sprite work with filters?" or "Why can't I nest children in my sprites?" It’s a bit more predictable. Additionally, due to the lightweight nature of particles, this means we can render far more of them!

So, no functionality is lost—just an API tweak with a massive performance boost!

Expand Down Expand Up @@ -749,7 +749,7 @@ The act of adding and removing the event when a sprite's texture was changed led
container.cacheAsTexture(true);
```

## 3. Deprecated Features
## 3. Deprecated Features {#deprecated-features}

Certain features from PixiJS v7 have been deprecated in v8. While they will still work, it's recommended to update your code to use the new alternatives. Refer to the deprecated features section for details on what to replace them with.

Expand Down Expand Up @@ -883,7 +883,7 @@ Certain features from PixiJS v7 have been deprecated in v8. While they will stil

- `container.name` is now `container.label`

## 4. Resources
## 4. Resources {#resources}

- [PixiJS v8 Release Notes](https://github.com/pixijs/pixijs/releases?q=v8.0.0&expanded=true)
- [PixiJS Discord](https://discord.gg/CPTjeb28nH)
Expand Down
21 changes: 18 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const { themes } = require('prism-react-renderer');

const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -31,6 +33,11 @@ const config = {
locales: ['en'],
},

future: {
// eslint-disable-next-line camelcase
experimental_faster: true,
},

presets: [
[
'classic',
Expand Down Expand Up @@ -65,6 +72,7 @@ const config = {
blogDescription: 'Latest news from the PixiJS team',
postsPerPage: 'ALL',
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
},
theme: {
customCss: require.resolve('./src/css/custom.scss'),
Expand Down Expand Up @@ -111,8 +119,14 @@ const config = {
highlightSearchTermsOnTargetPage: true,
docsRouteBasePath: '/',
explicitSearchResultPath: true,
searchContextByPaths: ['guides', 'examples', 'tutorials', 'blog'],
searchContextByPaths: [
{ label: 'Guides', path: '8.x/guides' },
{ label: 'Examples', path: '8.x/examples' },
{ label: 'Tutorials', path: '8.x/tutorials' },
{ label: 'Blog', path: 'blog' },
],
useAllContextsWithNoSearchContext: true,
docsPluginIdForPreferredVersion: 'current',
},
],
],
Expand Down Expand Up @@ -318,6 +332,7 @@ const config = {
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['bash', 'diff', 'json'],
},
colorMode: {
defaultMode: 'light',
Expand Down
Loading
Loading