Ver Fonte

release checklist & slice-9 (#334)

* update physics

* update input

* update

* update code sharing in getting-help.md

* Export Compliance

* update on file i/o

* pi / 4

* inputs

* forum url

* read only user

* html5 gamepad

* sdk api update

* update

* image properties

* update editor

* defold sdk update

* animation updates

* animation fix

* run as admin

* update bob

* update about AndroidX support

* software render

* linux-faq.md update

* 4.28.2021 updates

* Basis Universal format

* sound & mesh

* gamepad event mapping

* admob url

* Minor edit to building blocks intro text

* update gamepad & ios

* project settings

* libffi version

* scaling

* image compression

* update gamepads

* increase memory

* caching assets

* update 2021/10/6

* update 2021/10/16
blend-modes.md

* update 2021/11/12

* allow dynamic transforms update

* Bundle update

* update faq

* bullet & bob

* script properties update

* editor-styling

* build server url

* editor templates

* spine extension update

* Fix typo in the "optimizations" word in Chinese docs

* Update to material.md - Constants buffers

* Verify Graphics Calls

* H5 parameters

* OpenJDK downloads

* cn update corresponds to [pull 259](https://github.com/defold/doc/pull/259)

* application security

* porting guidelines

* update for 8f1651f

* cn update for 094bf6f

* cn update for 20fdfc5 & 6263317

* cn update for 7/19/2022

* title

* profiling update

* update editor.md

* update bob.md

* update shortcuts

* update fixed update note

* Update properties.md

* Update material.md

* Updates links

* Update bob help with the latest info

* camera & renderer

* Updated android keystore info zh_cn

* bundling.md release vs debug zh_cn

* update bob.md & gui-clipping.md

* contentless bundle

* consoles update

* model animation link

* gamepad & faq

* remove a camera lib

* font shadow render mode fix

* updates about app-manifest and others

* Update script.md

* includes in shaders

* editor scripts

* material updates

* Added dynamic atlas and texture creation

* fixes for atlas and some others

* update screenshots and add explanations (CN)

* add a line about Dynamic Prototype (CN)

* remove "inline" marks in pics

* de-translate the subtitle "Running the debugger" & images fix

* bundle identifier restrictions

* node properties Enabled and Visible (CN)

* release checklist & slice-9
COCO há 2 anos atrás
pai
commit
8ae4560003

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

@@ -21,34 +21,4 @@ brief: 本教程介绍了如何使用 GUI 方块节点.
 
 即使没有纹理设置, 方块节点也会被渲染, 或者不论把 alpha 设置成 `0`, 还是把 sized 设置成 `0, 0, 0`. 方块节点应该设置纹理以便渲染器合批而减少 draw call.
 
-## 九宫格纹理
-
-GUIs 对于其元素的大小改变是积极的: 面板和对话框总是应该填满其容纳的区域. 但是在缩放节点时纹理可能会产生问题.
-
-通常, 引擎把纹理整个填充到方块节点的边界, 但是九宫格纹理可以指定纹理里的那些内容需要缩放:
-
-![GUI 缩放](images/gui-box/scaling.png){srcset="images/gui-box/[email protected] 2x"}
-
-九宫格方块节点包含4个像素数值分别代表左, 上, 右, 下有多少边缘不参与缩放:
-
-![九宫格属性](images/gui-box/slice9_properties.png){srcset="images/gui-box/[email protected] 2x"}
-
-从左边开始, 顺时针设置:
-
-![九宫格设置](images/gui-box/slice9.png){srcset="images/gui-box/[email protected] 2x"}
-
-- 角落部分不会被缩放.
-- 边缘部分延单轴缩放. 左右边缘竖直缩放. 上下边缘水平缩放.
-- 中央部分正常延两个轴缩放.
-
-上述关于 *九宫格* 纹理缩放的描述仅在节点 size 改变时生效:
-
-![GUI box node size](images/gui-box/slice9_size.png){srcset="images/gui-box/[email protected] 2x"}
-
-如果更改方块节点的缩放属性 - 节点和纹理的缩放都不会带九宫格效果.
-
-因为渲染器里 mipmapping 的工作方式, 部分缩放纹理可能会造成小问题. 当你把纹理一部分 _缩小_ 到比本身小的时候. 渲染器会自动选择一个低分辨率的 mipmap 来渲染这部分, 导致了这个小问题.
-
-![九宫格 mipmapping](images/gui-box/mipmap.png){srcset="images/gui-box/[email protected] 2x"}
-
-为避免这类问题, 使用小图导进来之后只放大别缩小就行了.
+:[Slice-9](../shared/slice-9-texturing.md)

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

@@ -0,0 +1,17 @@
+---
+title: 发布前检查
+brief: 本教程介绍了发布游戏前应该做的检查事项.
+---
+
+# 发布前检查
+
+本教程介绍了发布游戏前应该做的检查事项.
+
+* 屏幕尺寸 - 游戏是否能在比项目设置中的默认宽高更大或者更小的屏幕上适配良好?
+  * 此处渲染脚本的 projection 和 gui 里的 layout 起到很大作用.
+* 宽高比 - 游戏是否能在与默认宽高比不同的屏幕上适配良好?
+  * 此处渲染脚本的 projection 和 gui 里的 layout 起到很大作用.
+* 刷新率 - 游戏是否能在比默认 60 Hz 更高刷新率的屏幕上运行?
+  * 此处 game.project 中的 Display 部分里的 vsync 和 swap interval 起到很大作用. 
+
+

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

@@ -27,6 +27,14 @@ Sprite 组件使用 [图集](/manuals/atlas) 或者 [瓷砖图源](/manuals/tile
 *Blend Mode*
 : 组件渲染时使用的混合模式.
 
+*Size Mode*
+: 如果设置为 `Automatic` 则编辑器会自动为 sprite 设置尺寸. 如果设置为 `Manual` 则可以手动设置尺寸.
+
+*Slice 9*
+: 设置在更改 sprite 大小时, 保留其周围边缘纹理的像素大小.
+
+:[Slice-9](../shared/slice-9-texturing.md)
+
 ### 混合模式
 :[blend-modes](../shared/blend-modes.md)
 
@@ -55,7 +63,7 @@ Sprite 组件使用 [图集](/manuals/atlas) 或者 [瓷砖图源](/manuals/tile
 : Sprite缩放 (`vector3`).
 
 `size`
-: Sprite大小 (`vector3`) (只读).
+: Sprite大小 (`vector3`). 只有 sprite 的 size-mode 设置为 manual 时可以更改.
 
 ## 材质常量
 

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

@@ -0,0 +1,37 @@
+## 九宫格纹理
+
+GUIs 对于其元素的大小改变是积极的: 面板和对话框总是应该填满其容纳的区域. 但是在缩放节点时纹理可能会产生问题.
+
+通常, 引擎把纹理整个填充到方块节点的边界, 但是九宫格纹理可以指定纹理里的那些内容需要缩放:
+
+![GUI 缩放](images/gui-box/scaling.png){srcset="images/gui-box/[email protected] 2x"}
+
+九宫格方块节点包含4个像素数值分别代表左, 上, 右, 下有多少边缘不参与缩放:
+
+![九宫格属性](images/gui-box/slice9_properties.png){srcset="images/gui-box/[email protected] 2x"}
+
+从左边开始, 顺时针设置:
+
+![九宫格设置](images/gui-box/slice9.png){srcset="images/gui-box/[email protected] 2x"}
+
+- 角落部分不会被缩放.
+- 边缘部分延单轴缩放. 左右边缘竖直缩放. 上下边缘水平缩放.
+- 中央部分正常延两个轴缩放.
+
+上述关于 *九宫格* 纹理缩放的描述仅在节点 size 改变时生效:
+
+![GUI box node size](images/gui-box/slice9_size.png){srcset="images/gui-box/[email protected] 2x"}
+
+![Sprite size](../shared/images/sprite_slice9_size.png)
+
+::: important
+如果更改 sprite 或方块节点的缩放属性 (或者游戏对象自身的缩放属性) - sprite 或节点和纹理的缩放都不会带 *Slice9* 效果.
+:::
+
+
+### Mipmaps 和 slice-9
+因为渲染器里 mipmapping 的工作方式, 部分缩放纹理可能会造成小问题. 当你把纹理一部分 _缩小_ 到比本身小的时候. 渲染器会自动选择一个低分辨率的 mipmap 来渲染这部分, 导致了这个小问题.
+
+![Slice 9 mipmapping](../shared/images/gui_slice9_mipmap.png){srcset="../shared/images/[email protected] 2x"}
+
+为避免这类问题, 使用小图导进来之后只放大别缩小就行了.