Skip to content

Commit

Permalink
Merge branch 'chore-upgrade-to-v8-rc1' into pre-release-v8-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bbazukun123 committed Jan 13, 2024
2 parents 437d439 + c0c34a3 commit d625908
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions docs/guides/basics/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ What we're doing here is adding a JavaScript code block, and in that block creat

When the PIXI.Application class creates the renderer, it builds a Canvas element that it will render *to*. In order to see what we draw with PixiJS, we need to add this Canvas element to the web page's DOM. Append the following line to your page's script block:

```JavaScript
```javascript
document.body.appendChild(app.view);
```

Expand All @@ -105,7 +105,7 @@ There are a number of ways to draw images in PixiJS, but the simplest is by usin

Before PixiJS can render an image, it needs to be loaded. Just like in any web page, image loading happens asynchronously. We'll talk a lot more about resource loading in later guides. For now, we can use a helper method on the PIXI.Sprite class to handle the image loading for us:

```JavaScript
```javascript
// Magically load the PNG asynchronously
let sprite = PIXI.Sprite.from('sample.png');
```
Expand All @@ -116,7 +116,7 @@ Before PixiJS can render an image, it needs to be loaded. Just like in any web

Finally, we need to add our new sprite to the stage. The stage is simply a [Container](https://pixijs.download/release/docs/PIXI.Container.html) that is the root of the scene graph. Every child of the stage container will be rendered every frame. By adding our sprite to the stage, we tell PixiJS's renderer we want to draw it.

```JavaScript
```javascript
app.stage.addChild(sprite);
```

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/components/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ However, it's a good idea _not_ to do this. Standalone Container objects are **

So that's the primary use for Containers - as groups of renderable objects in a hierarchy.

Check out the [container example code](/examples/basic/container).
Check out the [container example code](../../examples/basic/container).

## Masking

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/components/graphics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

In this guide, we're going to de-mystify the Graphics object, starting with how to think about what it does.

Check out the [graphics example code](/examples/graphics/simple).
Check out the [graphics example code](../../examples/graphics/simple).

## Graphics Is About Building - Not Drawing

Expand Down Expand Up @@ -83,7 +83,7 @@ Doing so is simple. Create the object, call the various builder functions to ad

You can also use a Graphics object as a complex mask. To do so, build your object and primitives as usual. Next create a PIXI.Container object that will contain the masked content, and set its `mask` property to your Graphics object. The children of the container will now be clipped to only show through inside the geometry you've created. This technique works for both WebGL and Canvas-based rendering.

Check out the [masking example code](/examples/graphics/simple).
Check out the [masking example code](../../examples/graphics/simple).

## Caveats and Gotchas

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/components/interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ PixiJS supports the following event types:

Any DisplayObject-derived object (Sprite, Container, etc.) can become interactive simply by setting its `eventMode` property to any of the eventModes listed above. Doing so will cause the object to emit interaction events that can be responded to in order to drive your project's behavior.

Check out the [interaction example code](/examples/events/click).
Check out the [interaction example code](../../examples/events/click).

To respond to clicks and taps, bind to the events fired on the object, like so:

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/components/sprites.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Sprites are the simplest and most common renderable object in PixiJS. They repr

To create a Sprite, all you need is a Texture (check out the Texture guide). Load a PNG's URL using the PIXI.Loader class, then call `PIXI.Sprite.from(url)` and you're all set. As a convenience during prototyping, you can pass a non-loaded URL to `from()` and PixiJS will handle it, but your sprite will "pop in" after it loads if you don't pre-load your textures.

Check out the [sprite example code](/examples/sprite/basic).
Check out the [sprite example code](../../examples/sprite/basic).

## Using Sprites

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/components/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In order to draw text to the screen, you use a [Text](https://pixijs.download/re

So when working with PIXI.Text objects, there are two sets of options - standard display object options like position, rotation, etc that work *after* the text is rasterized internally, and text style options that are used *while* rasterizing. Because text once rendered is basically just a sprite, there's no need to review the standard options. Instead, let's focus on how text is styled.

Check out the [text example code](/examples/text/pixi-text).
Check out the [text example code](../../examples/text/pixi-text).

## Text Styles

Expand Down Expand Up @@ -80,7 +80,7 @@ In addition to the standard PIXI.Text approach to adding text to your project, P

The primary advantage of this approach is speed - changing text frequently is much cheaper and rendering each additional piece of text is much faster due to the shared source texture.

Check out the [bitmap text example code](/examples/text/bitmap-text).
Check out the [bitmap text example code](../../examples/text/bitmap-text).

## BitmapFont

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/components/textures.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ RenderTexture: A more advanced (but very powerful!) feature is to build a Textur

Each of these texture sources has caveats and nuances that we can't cover in this guide, but they should give you a feeling for the power of PixiJS's texture system. <!--TODO: link to advanced textures guide-->

Check out the [render texture example code](/examples/textures/render-texture-basic).
Check out the [render texture example code](../../examples/textures/render-texture-basic).
2 changes: 1 addition & 1 deletion src/components/Homepage/ClosingSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function ClosingSection(): JSX.Element
anim="short-up-anim"
style={animShortUp(0.3, 0.7)}
label="Get Started"
link="/tutorial"
link="next/tutorials"
outline={true}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Homepage/HeroHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function HeroHeader(): JSX.Element
<div className="buttonRow">
<HomeCTA label="Download" link="https://github.com/pixijs/pixijs/releases" />
&nbsp;
<HomeCTA label="Get Started" link="/tutorial" white={true} outline={true} />
<HomeCTA label="Get Started" link="next/tutorials" white={true} outline={true} />
</div>
</div>
</header>
Expand Down
6 changes: 3 additions & 3 deletions versioned_docs/version-7.3.2/guides/basics/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ What we're doing here is adding a JavaScript code block, and in that block creat

When the PIXI.Application class creates the renderer, it builds a Canvas element that it will render *to*. In order to see what we draw with PixiJS, we need to add this Canvas element to the web page's DOM. Append the following line to your page's script block:

```JavaScript
```javascript
document.body.appendChild(app.view);
```

Expand All @@ -105,7 +105,7 @@ There are a number of ways to draw images in PixiJS, but the simplest is by usin

Before PixiJS can render an image, it needs to be loaded. Just like in any web page, image loading happens asynchronously. We'll talk a lot more about resource loading in later guides. For now, we can use a helper method on the PIXI.Sprite class to handle the image loading for us:

```JavaScript
```javascript
// Magically load the PNG asynchronously
let sprite = PIXI.Sprite.from('sample.png');
```
Expand All @@ -116,7 +116,7 @@ Before PixiJS can render an image, it needs to be loaded. Just like in any web

Finally, we need to add our new sprite to the stage. The stage is simply a [Container](https://pixijs.download/release/docs/PIXI.Container.html) that is the root of the scene graph. Every child of the stage container will be rendered every frame. By adding our sprite to the stage, we tell PixiJS's renderer we want to draw it.

```JavaScript
```javascript
app.stage.addChild(sprite);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ However, it's a good idea _not_ to do this. Standalone Container objects are **

So that's the primary use for Containers - as groups of renderable objects in a hierarchy.

Check out the [container example code](/examples/basic/container).
Check out the [container example code](../../examples/basic/container).

## Masking

Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-7.3.2/guides/components/graphics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

In this guide, we're going to de-mystify the Graphics object, starting with how to think about what it does.

Check out the [graphics example code](/examples/graphics/simple).
Check out the [graphics example code](../../examples/graphics/simple).

## Graphics Is About Building - Not Drawing

Expand Down Expand Up @@ -83,7 +83,7 @@ Doing so is simple. Create the object, call the various builder functions to ad

You can also use a Graphics object as a complex mask. To do so, build your object and primitives as usual. Next create a PIXI.Container object that will contain the masked content, and set its `mask` property to your Graphics object. The children of the container will now be clipped to only show through inside the geometry you've created. This technique works for both WebGL and Canvas-based rendering.

Check out the [masking example code](/examples/graphics/simple).
Check out the [masking example code](../../examples/graphics/simple).

## Caveats and Gotchas

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ PixiJS supports the following event types:

Any DisplayObject-derived object (Sprite, Container, etc.) can become interactive simply by setting its `eventMode` property to any of the eventModes listed above. Doing so will cause the object to emit interaction events that can be responded to in order to drive your project's behavior.

Check out the [interaction example code](/examples/events/click).
Check out the [interaction example code](../../examples/events/click).

To respond to clicks and taps, bind to the events fired on the object, like so:

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-7.3.2/guides/components/sprites.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Sprites are the simplest and most common renderable object in PixiJS. They repr

To create a Sprite, all you need is a Texture (check out the Texture guide). Load a PNG's URL using the PIXI.Loader class, then call `PIXI.Sprite.from(url)` and you're all set. As a convenience during prototyping, you can pass a non-loaded URL to `from()` and PixiJS will handle it, but your sprite will "pop in" after it loads if you don't pre-load your textures.

Check out the [sprite example code](/examples/sprite/basic).
Check out the [sprite example code](../../examples/sprite/basic).

## Using Sprites

Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-7.3.2/guides/components/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In order to draw text to the screen, you use a [Text](https://pixijs.download/re

So when working with PIXI.Text objects, there are two sets of options - standard display object options like position, rotation, etc that work *after* the text is rasterized internally, and text style options that are used *while* rasterizing. Because text once rendered is basically just a sprite, there's no need to review the standard options. Instead, let's focus on how text is styled.

Check out the [text example code](/examples/text/pixi-text).
Check out the [text example code](../../examples/text/pixi-text).

## Text Styles

Expand Down Expand Up @@ -80,7 +80,7 @@ In addition to the standard PIXI.Text approach to adding text to your project, P

The primary advantage of this approach is speed - changing text frequently is much cheaper and rendering each additional piece of text is much faster due to the shared source texture.

Check out the [bitmap text example code](/examples/text/bitmap-text).
Check out the [bitmap text example code](../../examples/text/bitmap-text).

## BitmapFont

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-7.3.2/guides/components/textures.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ RenderTexture: A more advanced (but very powerful!) feature is to build a Textur

Each of these texture sources has caveats and nuances that we can't cover in this guide, but they should give you a feeling for the power of PixiJS's texture system. <!--TODO: link to advanced textures guide-->

Check out the [render texture example code](/examples/textures/render-texture-basic).
Check out the [render texture example code](../../examples/textures/render-texture-basic).

0 comments on commit d625908

Please sign in to comment.