You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to make an image repeat itself horizontally across its element, but there doesn't seem to be a way of doing this currently in RCSS. There are tiled-* decorators, but it looks like they are meant for stretching the center of images while keeping the edges/corners the original size. Will I need to create a custom decorator for this?
The text was updated successfully, but these errors were encountered:
A custom decorator is probably the cleanest solution right now.
Otherwise, this is a bit hacky but I think it should work depending on your renderer:
Define a spritesheet and add a sprite that is some multiple wider than the actual image size. So for example for an image with 100 px width, set the sprite width to 400px for 4x repetition.
Use the image decorator and use that sprite, you may also want to adjust the image-fit parameter.
Make sure your renderer is set to repeat the texture for UV coordinates greater than one.
We could also add an image-fit: repeat property value to the image decorator, I'd happily take a PR for that.
I'm attempting to make an image repeat itself horizontally across its element, but there doesn't seem to be a way of doing this currently in RCSS. There are tiled-* decorators, but it looks like they are meant for stretching the center of images while keeping the edges/corners the original size. Will I need to create a custom decorator for this?
The text was updated successfully, but these errors were encountered: