Skip to content

Commit 1baff83

Browse files
authored
英文版目录调整 (cocos#1831)
* 英文版目录调整 * Commit changes
1 parent 344606c commit 1baff83

File tree

116 files changed

+576
-1200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+576
-1200
lines changed

en/2d-object/2d-render/index.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 2D Rendering Component Description
1+
# 2D Render Description
22

33
All rendering objects in the engine that do not own a model are 2D rendering objects. Unlike 3D objects, 2D objects do not have model information, and their vertex information is held by the Rect information of the UITransform component and created by the engine, and they have no thickness themselves. Due to the design requirements of the engine, the 2D render object needs to be a child of the RenderRoot node (the node with the RenderRoot2D component) in order to complete the data collection operation.
44

@@ -24,19 +24,22 @@ Components that have rendering capabilities in their own right are called 2D ren
2424
- [TiledTile Component Reference](../../editor/components/tiledtile.md)
2525
- [Spine (Skeletal Animation) Skeleton Component Reference](../../editor/components/spine.md)
2626
- [DragonBones ArmatureDisplay Component Reference](../../editor/components/dragonbones.md)
27+
- [MotionStreak Component Reference](../../editor/components/motion-streak.md)
2728

2829
## How to add 2D Rendering Components
2930

30-
Some 2D rendering components are built into the editor. After creating a RenderRoot node, create a node with 2D rendering components under this node:
31+
Some 2D rendering components are built into the editor. After creating a RenderRoot node, create a node with 2D rendering components under this node:
3132

3233
![create-2d](./create-2d.png)
3334

3435
2D rendering components can also be added by adding components to the node, the nodes under the 2D menu in the components menu are all 2D rendering components:
3536

3637
![add-render-component](./add-render-component.png)
3738

38-
## 2D render component rules introduction
39+
> **Note**: only one rendering component can be added to each node, and repeated additions will result in error reporting.
40+
41+
## 2D rendering component rules introduction
3942

4043
- [Rendering Order Rules](../../ui-system/components/engine/priority.md)
41-
- [UI Batching Rule Description](../../ui-system/components/engine/ui-batch.md)
42-
- [UI Material Description](../../ui-system/components/engine/ui-material.md)
44+
- [2D Rendering Component Batching Rules](../../ui-system/components/engine/ui-batch.md)
45+
- [Custom Materials for 2D Rendering Objects](../../ui-system/components/engine/ui-material.md)

en/2d-object/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ The 2D rendering flow is as follows:
1717
2D objects can be broadly classified into two categories, **2D rendering objects** and **User-interface (UI)**. The difference is that 2D rendering objects are generally only responsible for rendering 2D objects, while UI is more about user interaction. For more details on the differences, users can refer to the specific descriptions:
1818

1919
- [2D Rendering Component Description](2d-render/index.md)
20-
- [UI Description](../ui-system/components/engine/index.md)
20+
- [UI System](ui-system/index.md)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# UI System
22

3+
This section introduces the powerful and flexible UI (User Interface) system in Cocos Creator. By assembling different UI components to produce UI interfaces that can be adapted to multiple screen resolutions, dynamically generate and update display content from data, and support multiple layout styles.
4+
35
## Getting Started with UI
46

57
The difference between defining UI and 2D rendering objects in the engine mainly lies in adaptation and interaction. All UI needs to be under a Canvas node to make adaptation behavior, and the Canvas component itself inherits from `RenderRoot2D` component, it can also be used as an entry point for data collection.
@@ -8,12 +10,12 @@ The UI is a necessary interactive part of game development. Generally, buttons,
810

911
![resolution-config](resolution_config.png)
1012

11-
Once the design resolution is set, start creating UI elements, all of which are contained under the Canvas node. The Canvas node can be created by clicking the **+** button in the **Hierarchy** panel on the top left and selecting **UI Component -> Canvas**. The Canvas node has a [Canvas](../editor/canvas.md) component, which can be associated with a camera.
13+
Once the design resolution is set, start creating UI elements, all of which are contained under the Canvas node. The Canvas node can be created by clicking the **+** button in the **Hierarchy** panel on the top left and selecting **UI Component -> Canvas**. The Canvas node has a [Canvas](../../ui-system/components/editor/canvas.md) component, which can be associated with a camera.
1214

1315
> **Notes**:
1416
>
15-
> - Multiple Canvas nodes can exist in a scene, but a Canvas node should not be nested under another Canvas node or its children.
16-
> - Canvas components are not one-to-one with camera, their previous rendering depends on the layer of the node and the Visibility of the camera, pay extra attention to layer management to get the desired rendering effect when you have multiple Canvas.
17+
> 1. Multiple Canvas nodes can exist in a scene, but a Canvas node should not be nested under another Canvas node or its children.
18+
> 2. Canvas components are not one-to-one with camera, their previous rendering depends on the layer of the node and the Visibility of the camera, so you should pay extra attention to layer management to get the desired rendering effect when you have multiple Canvas.
1719
1820
Next, create UI nodes under the Canvas node. The editor comes with the following UI nodes:
1921

@@ -23,42 +25,25 @@ UI components can be viewed by selecting the node and clicking **Add Component**
2325

2426
![add-ui-component](./add-ui-component.png)
2527

26-
The order in which UI components are rendered is a depth ordering scheme, which means that the ordering of the child nodes under the Canvas node already determines the entire [rendering order](priority.md).
28+
The order in which UI components are rendered is a depth ordering scheme, which means that the ordering of the child nodes under the Canvas node already determines the entire [rendering order](../../ui-system/components/engine/priority.md).
2729

2830
In general game development, the necessary UI elements are not only basic 2D rendering components such as Sprite, Label (text), Mask, but also Layout, Widget (alignment), etc., which are used to quickly build the interface. Sprite and Label are used to render images and text, Mask is mainly used to limit the display content, more commonly used in chat boxes and backpacks, etc. Layout is generally used for single arrangement of buttons, neat arrangement of props in backpacks, etc. <br>
29-
The last important feature is the Widget, which is mainly used for display alignment. When finishing designing the UI and publish it to different platforms, the actual device resolution of the platform is bound to be different from our design resolution, therefore some trade-offs need to be made in order to adapt it. It is necessary to add a widget component to it, and always ensure that it is aligned to the top left of our design resolution. Please review the [alignment strategy](widget-align.md) and [alignment](../editor/widget.md) documentation.
31+
The last important feature is the Widget, which is mainly used for display alignment. When finishing designing the UI and publish it to different platforms, the actual device resolution of the platform is bound to be different from our design resolution, therefore some trade-offs need to be made in order to adapt it. It is necessary to add a widget component to it, and always ensure that it is aligned to the top left of our design resolution. Please review the [Alignment Strategy](../../ui-system/components/engine/widget-align.md) and [Alignment](../../ui-system/components/editor/widget.md) documentation.
3032

3133
Once the interface is created, some people may notice that the iPhone 7 displays differently than the iPhone X. This is actually the same problem with the device resolution we mentioned above. When you design in design resolution and finally publish in device resolution, there is a pixel deviation because the resolution of different models of mobile devices may not be the same, so there is another conversion process that needs to be done that is screen adaptation. <br>
32-
Notice in the **Projects -> Project Settings -> Project Data** page in the menu bar, there are two more options **Fit Width / Fit Height**, which can be easily adapted to different devices by following the screen adaptation rules and combining with the Widget component. The specific adaptation rules can be found in the [Multi-Resolution Adaptation Scheme](multi-resolution.md) documentation.
34+
Notice in the **Projects -> Project Settings -> Project Data** page in the menu bar, there are two more options **Fit Width / Fit Height**, which can be easily adapted to different devices by following the screen adaptation rules and combining with the Widget component. The specific adaptation rules can be found in the [Multi-Resolution Adaptation Scheme](../../ui-system/components/engine/multi-resolution.md) documentation.
3335

3436
## UI components
3537

36-
UI components mostly do not have rendering capabilities themselves, but hold 2D rendering components for rendering, which themselves have more ability to quickly form user-interactive interfaces, and take on functions such as event response, typography adaptation, etc. UI component references are as follows:
37-
38-
- [Canvas Component Reference](../editor/canvas.md)
39-
- [UITransform Component Reference](../editor/ui-transform.md)
40-
- [Widget Component Reference](../editor/widget.md)
41-
- [Button Component Reference](../editor/button.md)
42-
- [Layout Component Reference](../editor/layout.md)
43-
- [EditBox Component Reference](../editor/editbox.md)
44-
- [ScrollView Component Reference](../editor/scrollview.md)
45-
- [ScrollBar Component Reference](../editor/scrollbar.md)
46-
- [ProgressBar Component Reference](../editor/progress.md)
47-
- [LabelOutline Component Reference](../editor/label-outline.md)
48-
- [Toggle Component Reference](../editor/toggle.md)
49-
- [UIMeshRenderer Component Reference](../editor/ui-model.md)
50-
- [ToggleGroup Component Reference](../editor/toggleContainer.md)
51-
- [Slider Component Reference](../editor/slider.md)
52-
- [PageView Component Reference](../editor/pageview.md)
53-
- [PageViewIndicator Component Reference](../editor/pageviewindicator.md)
54-
- [UIOpacity Component Reference](../editor/ui-opacity.md)
55-
- [BlockInputEvents Component Reference](../editor/block-input-events.md)
56-
57-
## UI rules introduction
58-
59-
- [Multi-Resolution Adaptation Scheme](../engine/multi-resolution.md)
60-
- [Alignment Strategy](../engine/widget-align.md)
61-
- [Label Layout](../engine/label-layout.md)
62-
- [Auto Layout Container](../engine/auto-layout.md)
63-
- [Create a List of Dynamically Generated Content](../engine/list-with-data.md)
64-
- [Use a Sliced Sprite to make a UI image](../engine/sliced-sprite.md)
38+
UI components mostly do not have rendering capabilities themselves, but hold 2D rendering components for rendering, which themselves have more ability to quickly form user-interactive interfaces, and take on functions such as event response, typography adaptation, etc.
39+
40+
For specific descriptions of each UI component, please refer to the [UI Components](../../ui-system/components/editor/base-component.md) documentation.
41+
42+
## UI Practice Guide
43+
44+
- [Multi-Resolution Adaptation Scheme](../../ui-system/components/engine/multi-resolution.md)
45+
- [Alignment Strategy](../../ui-system/components/engine/widget-align.md)
46+
- [Label Layout](../../ui-system/components/engine/label-layout.md)
47+
- [Auto Layout Container](../../ui-system/components/engine/auto-layout.md)
48+
- [Create a List of Dynamically Generated Content](../../ui-system/components/engine/list-with-data.md)
49+
- [Use a Sliced Sprite to make a UI image](../../ui-system/components/engine/sliced-sprite.md)

0 commit comments

Comments
 (0)