Przeglądaj źródła

Moved slice-9 texturing

Added sprite size mode
Björn Ritzl 2 lat temu
rodzic
commit
ad32b04a99

+ 1 - 31
docs/en/manuals/gui-box.md

@@ -25,34 +25,4 @@ Box nodes are always rendered, even if they do not have a texture assigned to th
 
 Box nodes can play animations from atlases or tile sources. Refer to the [flipbook animation manual](/manuals/flipbook-animation) to learn more.
 
-## Slice-9 texturing
-
-GUIs often feature elements that are context sensitive in regard to their size: panels and dialogs that need to be resized to fit the containing content. These may cause visual problems when you apply texturing to the resized node.
-
-Normally, the engine scales the texture to fit the boundaries of a box node, but by defining slice-9 edge areas it is possible to limit what parts of the texture that should scale:
-
-![GUI scaling](images/gui-box/scaling.png){srcset="images/gui-box/[email protected] 2x"}
-
-The *Slice9* box node consists of 4 numbers that specify the number of pixels for the left, top, right and bottom margin that should not be regularly scaled:
-
-![Slice 9 properties](images/gui-box/slice9_properties.png){srcset="images/gui-box/[email protected] 2x"}
-
-The margins are set clockwise, starting on the left edge:
-
-![Slice 9 sections](images/gui-box/slice9.png){srcset="images/gui-box/[email protected] 2x"}
-
-- Corner segments are never scaled.
-- Edge segments are scaled along a single axis. The left and right edge segments are scaled vertically. The top and bottom edge segments are scaled horizontally.
-- The central texture area is scaled horizontally and vertically as needed.
-
-The *Slice9* texture scaling described above is only applied when you change box node's size:
-
-![GUI box node size](images/gui-box/slice9_size.png){srcset="images/gui-box/[email protected] 2x"}
-
-If you change scale parameter of the box node - the node and texture is scaled without applying *Slice9* parameters.
-
-Due to the way mipmapping works in the renderer, scaling of texture segments can sometimes exhibit artifacts. This happens when you _scale down_ segments below the original texture size. The renderer then selects a lower resolution mipmap for the segment, resulting in visual artifacts.
-
-![Slice 9 mipmapping](images/gui-box/mipmap.png){srcset="images/gui-box/[email protected] 2x"}
-
-To avoid this problem, make sure that the texture's segments that will be scaled are small enough never to be scaled down, only up.
+:[Slice-9](../shared/slice-9-texturing.md)

+ 17 - 0
docs/en/manuals/release-checklist.md

@@ -0,0 +1,17 @@
+---
+title: Release checklist
+brief: This manual contains a helpful guide and checklist of things to consider when releasing your game.
+---
+
+# Release checklist
+
+This page contains a helpful guide and checklist of things to consider when releasing a game.
+
+* Display sizes - Is everything looking good on a larger or smaller screen than the default width and height set in game project?
+  * The projection used in the render script and the layouts used in the gui will play a role here.
+* Aspect ratios - Is everything looking good on a screen with a different aspect ratio than the default aspect ratio from the width and height set in game project?
+  * The projection used in the render script and the layouts used in the gui will play a role here.
+* Refresh rate - Is the game running well on a screen with a higher refresh rate than 60 Hz?
+  * The vsync and swap interval in the Display section of game.project 
+
+

+ 9 - 1
docs/en/manuals/sprite.md

@@ -27,6 +27,14 @@ Apart from the properties *Id*, *Position* and *Rotation* the following componen
 *Blend Mode*
 : The blend mode to use when rendering the sprite.
 
+*Size Mode*
+: If set to `Automatic` the editor will set a size of the sprite. If set to `Manual` you can set the size yourself.
+
+*Slice 9*
+: Set to preserve the pixel size of the sprite's texture around the edges when the sprite is resized.
+
+:[Slice-9](../shared/slice-9-texturing.md)
+
 ### Blend modes
 :[blend-modes](../shared/blend-modes.md)
 
@@ -55,7 +63,7 @@ A sprite also has a number of different properties that can be manipulated using
 : The non-uniform scale of the sprite (`vector3`).
 
 `size`
-: The size of the sprite (`vector3`) (READ ONLY).
+: The size of the sprite (`vector3`). Can only be changed if sprite size-mode is set to manual.
 
 ## Material constants
 

+ 0 - 0
docs/en/manuals/images/gui-box/slice9.png → docs/en/shared/images/gui_slice9.png


+ 0 - 0
docs/en/manuals/images/gui-box/[email protected] → docs/en/shared/images/[email protected]


+ 0 - 0
docs/en/manuals/images/gui-box/mipmap.png → docs/en/shared/images/gui_slice9_mipmap.png


+ 0 - 0
docs/en/manuals/images/gui-box/[email protected] → docs/en/shared/images/[email protected]


+ 0 - 0
docs/en/manuals/images/gui-box/slice9_properties.png → docs/en/shared/images/gui_slice9_properties.png


+ 0 - 0
docs/en/manuals/images/gui-box/[email protected] → docs/en/shared/images/[email protected]


+ 0 - 0
docs/en/manuals/images/gui-box/scaling.png → docs/en/shared/images/gui_slice9_scaling.png


+ 0 - 0
docs/en/manuals/images/gui-box/[email protected] → docs/en/shared/images/[email protected]


+ 0 - 0
docs/en/manuals/images/gui-box/slice9_size.png → docs/en/shared/images/gui_slice9_size.png


+ 0 - 0
docs/en/manuals/images/gui-box/[email protected] → docs/en/shared/images/[email protected]


BIN
docs/en/shared/images/sprite_slice-9.png


+ 37 - 0
docs/en/shared/slice-9-texturing.md

@@ -0,0 +1,37 @@
+## Slice-9 texturing
+
+GUI box nodes and Sprite components sometimes feature elements that are context sensitive in regard to their size: panels and dialogs that need to be resized to fit the containing content or a health bar that need to be resized to show the remaining health of an enemy. These may cause visual problems when you apply texturing to the resized node or sprite.
+
+Normally, the engine scales the texture to fit the rectangular boundaries, but by defining slice-9 edge areas it is possible to limit what parts of the texture that should scale:
+
+![GUI scaling](../shared/images/gui_slice9_scaling.png){srcset="../shared/images/[email protected] 2x"}
+
+The *Slice9* box node consists of 4 numbers that specify the number of pixels for the left, top, right and bottom margin that should not be regularly scaled:
+
+![Slice 9 properties](../shared/images/gui_slice9_properties.png){srcset="../shared/images/[email protected] 2x"}
+
+The margins are set clockwise, starting on the left edge:
+
+![Slice 9 sections](../shared/images/gui_slice9.png){srcset="../shared/images/[email protected] 2x"}
+
+- Corner segments are never scaled.
+- Edge segments are scaled along a single axis. The left and right edge segments are scaled vertically. The top and bottom edge segments are scaled horizontally.
+- The central texture area is scaled horizontally and vertically as needed.
+
+The *Slice9* texture scaling described above is only applied when you change box node's or sprite's size:
+
+![GUI box node size](../shared/images/gui_slice9_size.png){srcset="../shared/images/[email protected] 2x"}
+
+![Sprite size](../shared/images/sprite_slice9_size.png)
+
+::: important
+If you change scale parameter of the box node or sprite (or on the game object) - the node or sprite and texture is scaled without applying *Slice9* parameters.
+:::
+
+
+### Mipmaps and slice-9
+Due to the way mipmapping works in the renderer, scaling of texture segments can sometimes exhibit artifacts. This happens when you _scale down_ segments below the original texture size. The renderer then selects a lower resolution mipmap for the segment, resulting in visual artifacts.
+
+![Slice 9 mipmapping](../shared/images/gui-box/gui_slice9_mipmap.png){srcset="../shared/images/gui-box/[email protected] 2x"}
+
+To avoid this problem, make sure that the texture's segments that will be scaled are small enough never to be scaled down, only up.