Skip to content

Commit

Permalink
Update docusaurus monorepo to v2.4.3 (#115)
Browse files Browse the repository at this point in the history
| datasource | package                         | from  | to    |
| ---------- | ------------------------------- | ----- | ----- |
| npm        | @docusaurus/core                | 2.4.1 | 2.4.3 |
| npm        | @docusaurus/module-type-aliases | 2.4.1 | 2.4.3 |
| npm        | @docusaurus/preset-classic      | 2.4.1 | 2.4.3 |
| npm        | @docusaurus/theme-mermaid       | 2.4.1 | 2.4.3 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Calvin Wilkinson <85414302+CalvinWilkinson@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 6, 2023
1 parent db24ddc commit 2ef6688
Show file tree
Hide file tree
Showing 4 changed files with 2,593 additions and 2,405 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prod-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
}
perform_api_release:
name: Perform API Release
perform_prod_release:
name: Perform Production Release
needs: validate_branch
runs-on: ubuntu-latest
permissions:
Expand Down
37 changes: 36 additions & 1 deletion docs/guides/guides/rendering-text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,42 @@ private void RandomizeColor()
}
```

### <span class="color-sub-step">Step 5.5: Finishing up</span>
### <span class="color-sub-step">Step 5.5: Update the color</span>

Now that we have our little helper method, we can use it in the `ProcessCollisionAndColor()` method.
Add a call to the `RandomizeColor()` method in each of the `if` statements that check for a collision.

```csharp
private void ProcessCollision()
{
...
if (leftSide <= 0)
{
this.velocity.X *= -1;
RandomizeColor(); // Add this line
}

if (top <= 0)
{
this.velocity.Y *= -1;
RandomizeColor(); // Add this line
}

if (rightSide >= Width)
{
this.velocity.X *= -1;
RandomizeColor(); // Add this line
}

if (bottom >= Height)
{
this.velocity.Y *= -1;
RandomizeColor(); // Add this line
}
}
```

### <span class="color-sub-step">Step 5.6: Finishing up</span>

Now the exciting part!! Let's update the `OnDraw()` method to use our `position` and `textColor` class fields.
No point in doing all of this hard work if we can see it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { TutorialLink } from "@site/src/components/TutorialLink";
This guide will show you the basics of rendering text to a window using **Velaptor**.

:::note Guide Source Code
Go to the <TutorialLink projectName="RenderingText" version="v1.0.0-preview.24"/> tutorial project to see the source code for a fully working example of this guide.
Go to the <TutorialLink projectName="RenderingText" version="v1.0.0-preview.28"/> tutorial project to see the source code for a fully working example of this guide.
:::


Expand Down Expand Up @@ -356,7 +356,42 @@ private void RandomizeColor()
}
```

### <span class="color-sub-step">Step 5.5: Finishing up</span>
### <span class="color-sub-step">Step 5.5: Update the color</span>

Now that we have our little helper method, we can use it in the `ProcessCollisionAndColor()` method.
Add a call to the `RandomizeColor()` method in each of the `if` statements that check for a collision.

```csharp
private void ProcessCollision()
{
...
if (leftSide <= 0)
{
this.velocity.X *= -1;
RandomizeColor(); // Add this line
}

if (top <= 0)
{
this.velocity.Y *= -1;
RandomizeColor(); // Add this line
}

if (rightSide >= Width)
{
this.velocity.X *= -1;
RandomizeColor(); // Add this line
}

if (bottom >= Height)
{
this.velocity.Y *= -1;
RandomizeColor(); // Add this line
}
}
```

### <span class="color-sub-step">Step 5.6: Finishing up</span>

Now the exciting part!! Let's update the `OnDraw()` method to use our `position` and `textColor` class fields.
No point in doing all of this hard work if we can see it.
Expand Down
Loading

0 comments on commit 2ef6688

Please sign in to comment.