Skip to content

Commit

Permalink
changed "you can use" language (cocos#1435)
Browse files Browse the repository at this point in the history
* changed "you can use" language and some misc changes I saw when doing this change

* physics-2d-rigid-body - fix typo
  • Loading branch information
slackmoehrle authored Jan 12, 2021
1 parent fff3290 commit 2325a48
Show file tree
Hide file tree
Showing 30 changed files with 184 additions and 39 deletions.
4 changes: 2 additions & 2 deletions en/asset/asset-manager-upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ If you use `loader.loadRes`, `loader.loadResArray`, `loader.loadResDir` in your

- **loader.loadResArray**

For reducing learning costs, `loadResArray` has been merged with `load` and the first parameter of `resources.load` can support multiple paths, so you can use `resources.load` to replace.
For reducing learning costs, `loadResArray` has been merged with `load` and the first parameter of `resources.load` can support multiple paths, use `resources.load` to replace.

```typescript
// before
Expand Down Expand Up @@ -80,7 +80,7 @@ If you use `loader.loadRes`, `loader.loadResArray`, `loader.loadResDir` in your
loader.loadResDir('images', Texture2D, (err, assets, paths) => console.log(paths));
```

If you want to query the paths list, you can use the following form:
If you want to query the paths list, use the following form:

```typescript
const infos = resources.getDirWithPath('images', Texture2D);
Expand Down
2 changes: 1 addition & 1 deletion en/asset/atlas.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To generate an __Atlas__, you should first prepare a set of original pictures. E

![single sheep](atlas/single_sheep.png)

__Next__, you can use special software to generate the __Atlas__. Examples:
__Next__, use special software to generate the __Atlas__. Examples:

- [TexturePacker 4.x](https://www.codeandweb.com/texturepacker)
- [Zwoptex](https://zwopple.com/zwoptex/)
Expand Down
6 changes: 3 additions & 3 deletions en/asset/bundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ assetManager.loadBundle('https://othergame.com/remote/01_graphics', (err, bundle
});
```

`assetManager.loadBundle` also supports loading an Asset Bundle from user space with the path in user space. You can use the download interface provided by the corresponding platform to pre-download the Asset Bundle into your user space and then use `loadBundle` to load it, so that you can manage the download and cache process of the Asset Bundle by yourself.
`assetManager.loadBundle` also supports loading an Asset Bundle from user space with the path in user space. Use the download interface provided by the corresponding platform to pre-download the Asset Bundle into your user space and then use `loadBundle` to load it, so that you can manage the download and cache process of the Asset Bundle by yourself.

```typescript
// Download an Asset Bundle in advance to the "pathToBundle" directory in your user space, and it's necessary to ensure
Expand All @@ -175,7 +175,7 @@ assetManager.loadBundle(wx.env.USER_DATA_PATH + '/pathToBundle/bundleName', (err
**Note**: If you check the **Is Remote Bundle** option when configuring the Asset Bundle, then please fill in the **Resource Server Address** in the **Build** panel when building.

When you load the Asset Bundle via the API, instead of loading all the resources in the Asset Bundle, the engine loads the Asset Bundle's **resource manifest** and **all the scripts** it contains.<br>
When the Asset Bundle is loaded, the engine triggers a callback and returns an error message and an instance of `AssetManager.Bundle` class, which is the main entrance of the Asset Bundle API that you can use to load the various resources in the Asset Bundle.
When the Asset Bundle is loaded, the engine triggers a callback and returns an error message and an instance of `AssetManager.Bundle` class, which is the main entrance of the Asset Bundle API that can be used to load the various resources in the Asset Bundle.

### Versions of the Asset Bundle

Expand Down Expand Up @@ -252,7 +252,7 @@ bundle.loadScene('test', function (err, scene) {

## Get the Asset Bundle

After the Asset Bundle has been loaded, it will be cached, and you can use the name to get the Asset Bundle. For example:
After the Asset Bundle has been loaded, it will be cached, and the name can be used to get the Asset Bundle. For example:

```typescript
let bundle = assetManager.getBundle('01_graphics');
Expand Down
2 changes: 1 addition & 1 deletion en/asset/downloader-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ After registered the handler, the corresponding handler will be used if the down
assetManager.loadAny({'url': 'http://example.com/myAsset.myformat'}, callback);
```

Note that the handler can receive incoming optional parameters, which you can use to implement custom extensions, see the [Optional Parameters](options.md#expand-engine) documentation for details.
Note that the handler can receive incoming optional parameters, which can be used to implement custom extensions, see the [Optional Parameters](options.md#expand-engine) documentation for details.
6 changes: 3 additions & 3 deletions en/asset/dynamic-load-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ resources.load('test assets/image', SpriteFrame, (err, spriteFrame) => {
});
```

You can use the preload related interface to load resources in advance, without waiting for the preload to finish, you can use the normal load interface to load, the normal load interface will directly reuse the content that has been downloaded during the preload process to shorten the load time.
Use the preload related interface to load resources in advance, without waiting for the preload to finish. Then use the normal load interface to load, the normal load interface will directly reuse the content that has been downloaded during the preload process to shorten the load time.

For more information on preloading, please refer to the [Preloading and Loading](preload-load.md) documentation.

## How to load remote assets or files in device

Currently in Cocos Creator, we support loading the remote image files, which is very useful to load user picture from social network websites. To load files from such urls, you should call `assetManager.loadRemote`. At the same time you can use the same API to load resources on the local device storage. The `resources.load` APIs mentioned above only apply to the application package resources and hot update resources. Here is how to load remote assets and local
Currently in Cocos Creator, we support loading the remote image files, which is very useful to load user picture from social network websites. To load files from such urls, you should call `assetManager.loadRemote`. At the same time the same API can be used to load resources on the local device storage. The `resources.load` APIs mentioned above only apply to the application package resources and hot update resources. Here is how to load remote assets and local
device files:

```typescript
Expand Down Expand Up @@ -138,5 +138,5 @@ assetManager.loadRemote(remoteUrl, function (err, textAsset) {

There still remains some restrictions currently, the most important are:

1. This loading method supports only native resource types such as textures, audios, text, etc., and does not support direct loading and analysis of resources such as SpriteFrame, SpriteAtlas, Tilemap. (If you want to load all resources remotely, you can use the [Asset Bundle](bundle.md))
1. This loading method supports only native resource types such as textures, audios, text, etc., and does not support direct loading and analysis of resources such as SpriteFrame, SpriteAtlas, Tilemap. (If you want to load all resources remotely, use the [Asset Bundle](bundle.md))
2. Remote loading ability on Web is limited by the browser's [CORS cross-domain policy restriction](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS). If the server forbid cross-domain access, loading request will fail, and due to WebGL security policy restrictions, even if the server allows CORS http request, textures loaded can not be rendered.
2 changes: 1 addition & 1 deletion en/asset/prefab.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ __Third__, locating assets is convenient to quickly locate __Prefab assets__ in

__Fourth__, you can deserialize a __Node__ object again from the asset and replace the existing node. This operation does not change the *uuid* of the existing __Node__. It is usually used when you want the __Node__ to be re-synchronized with the __Prefab Asset__.

__Fifth__, when there are new changes to the __Node__, and you want to update to the associated __Prefab__ asset, you can use this button.
__Fifth__, when there are new changes to the __Node__, and you want to update to the associated __Prefab__ asset, use this button.

## Status of prefab nodes

Expand Down
2 changes: 1 addition & 1 deletion en/asset/scene.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ While creating __Scenes__, you can quickly save __Scenes__ with the shortcut key

## Switching Scenes

In the __Assets__, __double-click__ the __Scene__ you want to open. When needing to switch __Scenes__ in the game, you can use the `director.loadScene()` API to implement dynamic scene loading and switching in the game. For further details, please see the [API documentation](../../../api/en/classes/core.director-2.html#loadscene).
In the __Assets__, __double-click__ the __Scene__ you want to open. When needing to switch __Scenes__ in the game, use the `director.loadScene()` API to implement dynamic scene loading and switching in the game. For further details, please see the [API documentation](../../../api/en/classes/core.director-2.html#loadscene).

## Scene Asset Properties

Expand Down
2 changes: 1 addition & 1 deletion en/editor/animation/animation-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ __Right-click__ on the __timeline position__ or __click__ the __timeline button_

The __index node__ in the __animation data__ is based on the relative path of the node where the __Animation component__ is attached. Therefore, a node with the same name under the same parent node can only generate one copy of __animation data__, and can only be applied to the first node with the same name.

The nodes here and the nodes of the __Hierarchy__ panel are mapped one by one. Using this relationship, when the number of nodes in the node list is too large to be consulted, you can use the search function of the __Hierarchy__ panel to locate the nodes. Click on the node in the __Hierarchy__ panel, and it will also jump to the corresponding node position in the __Animation Editor__ to achieve a reasonable display effect.
The nodes here and the nodes of the __Hierarchy__ panel are mapped one by one. Using this relationship, when the number of nodes in the node list is too large to be consulted, use the search function of the __Hierarchy__ panel to locate the nodes. Click on the node in the __Hierarchy__ panel, and it will also jump to the corresponding node position in the __Animation Editor__ to achieve a reasonable display effect.

#### Selected node icon

Expand Down
4 changes: 2 additions & 2 deletions en/editor/assets/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Assets

The **Assets** panel is an important tool used to access and manage project assets. When starting to make a game, **importing assets** is usually a necessary step. You can use the __Hello World__ template project as a starting point when creating a new project. After you create and open a new project, various types of assets are visible in the **Assets** panel.
The **Assets** panel is an important tool used to access and manage project assets. When starting to make a game, **importing assets** is usually a necessary step. Use the __Hello World__ template project as a starting point when creating a new project. After you create and open a new project, various types of assets are visible in the **Assets** panel.

![Panel Overview](img/thumb.gif)

Expand Down Expand Up @@ -40,7 +40,7 @@ When adding a asset, an **input box** will appear. The name of the asset is requ

### Selecting Assets

You can use the following operations to select assets in the list:
Use the following operations to select assets in the list:

- **Click** to **single-select assets**.
- The **up** and **down** arrows on the keyboard can be used to select.
Expand Down
2 changes: 1 addition & 1 deletion en/editor/extension/contributions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

When we are writing an extension, we can query whether the existing functions in the editor provide the function of receiving external contributions.

If the function provides contributions function, you can use these functions when writing extensions.
If the function provides contributions function, use these functions when writing extensions.

## Contribution data definition

Expand Down
2 changes: 1 addition & 1 deletion en/editor/extension/define.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The relative path of a js file defines the function entry file. When the extensi

Type `{[name: string]: PanelInfo}` Optional

Panel information defined in the extension. You can use `Editor.Panel.open('hello-world.list');` to open the defined panel. For more information, please refer to the [Panel](./panel.md) documentation.
Panel information defined in the extension. Use `Editor.Panel.open('hello-world.list');` to open the defined panel. For more information, please refer to the [Panel](./panel.md) documentation.

## contributions

Expand Down
2 changes: 1 addition & 1 deletion en/editor/extension/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Editor.I18n.t('hello-world.search');

### Use in the template

If you need to translate in the html template, you can use the ui-label element to translate:
If you need to translate in the html template, use the ui-label element to translate:

```html
<ui-label value="i18n:hello-world.search"></ui-label>
Expand Down
4 changes: 2 additions & 2 deletions en/editor/preferences/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This page is used to set the path of the development environment required when t

- **Use Builtin JS Engine**: Whether to use the engine path that comes with the __Cocos Creator__ installation path as the JavaScript engine path.This engine is used for scene rendering in the scene panel of editor, declaration of built-in components, and engine modules in other Web environments such as `preview` or `publish`.

- **Custom JS Engine**: In addition to using the built-in engine, you can also go to [engine repository](https://github.com/cocos-creator/engine) to clone or fork a copy of the engine to the local anywhere, then uncheck `Use Builtin JS Engine`, then set the JavaScript engine path to your customized engine path. You can use the editor to customize your engine.
- **Custom JS Engine**: In addition to using the built-in engine, you can also go to [engine repository](https://github.com/cocos-creator/engine) to clone or fork a copy of the engine to the local anywhere, then uncheck `Use Builtin JS Engine`, then set the JavaScript engine path to your customized engine path. Use the editor to customize your engine.

- **WeChatGame APP Path**: Set the WechatGame App Path, See [WeChat Mini Games](../publish/publish-wechatgame.md).

Expand All @@ -44,7 +44,7 @@ This category is used to set the default open mode for assets.

![edit](./index/edit.jpg)

- **Script Editor**: You can use the executable file of any external text editing tool as the opening method when you double-click the script file in `Assets`.
- **Script Editor**: Use the executable file of any external text editing tool as the opening method when you double-click the script file in `Assets`.

- **Picture Editor**: Similar to the above option, used here to set when `Assets`, double-click the picture file, open the picture with the default application path.

Expand Down
Loading

0 comments on commit 2325a48

Please sign in to comment.