Skip to content

Commit

Permalink
docs: Update graphics component reference to graphics group
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Sep 18, 2024
1 parent 98daa01 commit 33a9df4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions site/docs/04-graphics/04.2-graphics-component.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ Sometimes you want to draw multiple pieces of graphics at once! There are two re

[[GraphicsGroup|Graphics groups]] allow you to compose multiple graphics together into 1. This can be useful if you have multi layered or complex graphics requirements. One limitation however is you can only influence the relative offset from you Actor.

Read more about [graphic group nuances here](/docs/graphics-group).

```typescript
const healthBarActor = new ex.Actor({...})

Expand All @@ -111,8 +113,8 @@ const healthBarText = new ex.Text({

const group = new ex.GraphicsGroup({
members: [
{ graphic: healthbarRectangle, pos: ex.vec(0, -70)},
{ graphic: healthBarText, pos: ex.vec(0, -70)}
{ graphic: healthbarRectangle, offset: ex.vec(0, -70)},
{ graphic: healthBarText, offset: ex.vec(0, -70)}
]
});

Expand Down

0 comments on commit 33a9df4

Please sign in to comment.