The purpose of the format specification is to provide uniform writing guidelines and make the finished document have a better reading experience.
Use # for the first-level title.
Use ## for the second-level title.
Use ### for the third-level title.
and so on...
Under normal circumstances, do not skip the use of headings, for example, the third-level headings cannot appear directly under the first-level heading.
Example (correct):
# Main Heading
## Sub-heading 1
### Sub-heading 2
Example (NOT correct):
# Main Heading
### Sub-heading 1
Correct usage:
Log in with GitHub
Sprite component
Incorrect usage:
Login with github
sprite component
Correct usage:
The bandwidth of my home is 1 Gbps, and the total hard disk is 10 TB.
Incorrect usage:
The bandwidth of my home is 1Gbps, and the total hard disk is 10TB.
Exception: There is no need to add a space between degree/percentage and number
Correct usage:
Today is a high temperature of 233°.
The new MacBook Pro has a 15% increase in CPU performance.
Incorrect usage:
Today is a high temperature of 233 °.
The new MacBook Pro has a 15% increase in CPU performance.
URL link format: [url document name](url document path). Use halfwidth English punctuation.
e.g.: [Monitor and launch events](../scripting/events.md).
Correct usage:
For details, please refer to the Monitor and Launch Events documentation.
Incorrect usage:
For details, please refer to the [Monitor and Launch Events] (../scripting/events.md) documentation.
URL link format: [url document name](url document directory). Use half-width English punctuation, and no spaces between [] and ()
e.g: [Mask API](__APIDOC__/en/#/docs/3.4/en/ui/Class/Mask). Use .html for file name suffixes across documents
Panel names, components or other important interface elements in the editor are expressed in bold.
Format: open **Inspector** panel to view properties.
Correct usage:
Open Inspector panel to view properties.
Click the Create button to create a new node.
Drag any picture resource to the Sprite Frame property.
Note that the property name in the editor should be written in the format displayed in the Inspector panel.
Script attributes and method names are written according to the format displayed in the API, expressed by backtick.
Format: Set the scale of the node through `this.node.scale`
Correct usage:
Set the scale of the node through
this.node.scale
.
File name and file path, use backtick to indicate.
Format: `/mypath/myfile.ts`
If it is a full path, you need to add / before it, if it is not a full path, you don’t need it.
Correct usage:
The subpackage directory is under the
build/quickgame/dist
directory.
Example:
Save Prefab, the code example is as follows:
```js
Editor.Ipc.sendToPanel('scene','scene:apply-prefab', node.uuid);
```Continue text part.
The effect is as follows:
Save Prefab, the code example is as follows:
Editor.Ipc.sendToPanel('scene','scene:apply-prefab', node.uuid);Continue text part.
Picture format: ![Picture description](relative path of the picture). Use halfwidth English punctuation, and no spaces between !, [], ().
e.g.: ![background](quick-start/background.png)
If the picture is added to the text, it needs to add a space between the adjacent text
If you use the Enter key to wrap, there will be no wrap effect on GitBook and a space will be added
Use blank line wrap effect:
First line
Second line
Use <br> wrapping effect:
First line
Second line
Use the enter key to wrap the line effect (not recommended):
First line Second line
Format: > **Note**: do not mix Chinese and English symbols in Chinese and English documents.
When the note is more than two points, the writing format is as follows:
> **Notes**:
> 1. The first point.
> 2. The second point.
> 3. One last point.
The effect is as follows:
Notes:
- The first point.
- The second point.
- One last point.
When the main text is introduced with-points, the main text in the points, including pictures, need to be indented with 2/4 spaces. Generally, indents with two spaces are used. e.g.:
- Point introduction 1
(Two spaces) The body part that begins the first division.
- Introduction 2
(Two spaces) The body part that begins the second division.
(Two spaces) ![image](image link)
The effect is as follows:
Point introduction 1
Start the text part of the first division.
Introduction 2
Start the text part of the second point.
![image](image link)
When the main text is introduced with number points, the main text in the points including pictures need to be indented with 4 spaces. e.g.:
1. Point introduction 1
(4 spaces) The part of the body that begins the first division.
2. Point introduction 2
(4 spaces) The part of the body that begins the second division.
(4 spaces) ![image](image link)
The effect is as follows:
Sub-point introduction 1
Start the text part of the first division.
Sub-point introduction 2
Start the text part of the second point.
![image](image link)
e.g.:
| Property | Function Description |
| :---- | :------ |
| Property 1 | Description 1 |
| Property 2 | Description 2 |
Appropriate spaces can be reserved before and after for easy editing.
- Firstly -> First.
- At present, —> Currently,
- Related Reference Links —> Reference documentation
- do not use phrases like: "Now let me explain", "he should do this"
- text like this should be avoided: "If you have never written a program and don’t worry, we will provide all the required code in the tutorial, just copy and paste it to the correct location, and then find your programmer partner to solve this part of the work. Let's start creating the script that drives the main character's actions."
- text like this should be avoided: "So, "
- Cocos Creator
- Cocos Creator 2.4.3
- v2.4.3
- v3.0
- The engine (where refer to the runtime)
- The editor (where refer to the IDE)
Versions:
- 2.4.3 (3.0.0)
- 2.4.3 Preview (GA/RC/Alpha/Beta ...)
- 2.4.x (3.0.x)
- 2.4 (3.0)
- 2.x (3.x)
Never use:
- CCC or ccc
- Cocos (where refer to Cocos Creator)
- IDE (where refer to Cocos Creator)
- json -> JSON
- js or JS -> JavaScript
- ts or TS -> TypeScript
Example:
Text prior to footnote reference.[^1]
[^1]: Comment to include in footnote.
The effect is as follows:
Text prior to footnote reference.1
Footnotes
-
Comment to include in footnote. ↩