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
In the latest version of minetest (in fact, since formspec version 2) there is support for 9-slice image scaling.
As is alluded to on the wikipedia page that the documentation refrences, there's 2 ways of handling the image.
(ascii demo for example)
1 | 2 | 3
4 | 5 | 6
7 | 8 | 9
Minetest only supports stretched 9-tiles. This means that if you do some pixel art in 2 4 5 6 or 8, that pixel art will be stretched. This limits the types of pixel art that can be made for formspecs & etc.
Solutions
Provide a way, for all 9-tile systems, to indicate to minetest the following:
Should tiles 2 5 6 and 8 be stretched?
What about the last tile? Crop it or stretch it (What if the content space is not divisible by the size of 5?)?
Middle is a rect which defines the middle of the 9-slice.
x - The middle will be x pixels from all sides.
x,y - The middle will be x pixels from the horizontal and y from the vertical.
x,y,x2,y2 - The middle will start at x,y, and end at x2, y2. Negative x2 and y2 values will be added to the width and height of the texture, allowing it to be used as the distance from the far end.
All numbers in middle are integers.
-If auto_clip is true, the background is clipped to the formspec size (x and y are used as offset values, w and h are ignored)
repeat may be exactly one of these values, or two (seperated by a comma). If there's two values, the first is the X and the second is the Y dementions
stretch ....
repeat ....
round ....
space ....
Available since formspec version ???
Alternatives
Keep it as-is?
Additional context
A popular CC-BY-4.0 asset pack on itchio that serves as an example of textures that don't (currently) work in minetest is this one (i'm not affiliated): https://crusenho.itch.io/complete-ui-essential-pack
The behavior I'm requesting is possible in CSS-3 via border-image-repeat, if an example is needed.
The text was updated successfully, but these errors were encountered:
Lazerbeak12345
changed the title
Support tiled 9-slice scaling
Support tiled 9-slice scaling (in addition to the stretched 9-slice scaling we already support)
May 4, 2024
Problem
In the latest version of minetest (in fact, since formspec version 2) there is support for 9-slice image scaling.
As is alluded to on the wikipedia page that the documentation refrences, there's 2 ways of handling the image.
(ascii demo for example)
Minetest only supports stretched 9-tiles. This means that if you do some pixel art in 2 4 5 6 or 8, that pixel art will be stretched. This limits the types of pixel art that can be made for formspecs & etc.
Solutions
Provide a way, for all 9-tile systems, to indicate to minetest the following:
This could look like:
Alternatives
Keep it as-is?
Additional context
A popular CC-BY-4.0 asset pack on itchio that serves as an example of textures that don't (currently) work in minetest is this one (i'm not affiliated): https://crusenho.itch.io/complete-ui-essential-pack
The behavior I'm requesting is possible in CSS-3 via
border-image-repeat
, if an example is needed.The text was updated successfully, but these errors were encountered: