Step 13 - Pipe Graphics
We also created a pipe especially for this sample, feel free to use and remix.
We can take advantage of ex.ImageWrapping.Clamp to stretch the bottom pixel of the pipe so it can be as long as we want.
typescript
typescript
In our pipe.ts we can add our pipe graphic and stretch it by changing the sourceView and destSize.
The sourceView is the "window" into the original image, and since we are specifying a view larger than the original image, that ex.ImageWrap.Clamp will stretch the board pixel to accommodate.
Changing the destSize changes the size of the final rendered sprite, in this case we want the same height.
typescript
typescript