Skip to content

Commit

Permalink
Merge pull request cocos#765 from xunyi0/master
Browse files Browse the repository at this point in the history
sync branch
  • Loading branch information
jareguo authored Dec 18, 2018
2 parents e066dea + d5b1f17 commit 8589c6c
Show file tree
Hide file tree
Showing 14 changed files with 141 additions and 152 deletions.
5 changes: 3 additions & 2 deletions en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
- [Customize Project Build Process](publish/custom-project-build-template.md)
- [Publish with Command Line](publish/publish-in-command-line.md)

## Systems
## Systems

- [Renderer and Graphics](render/index.md)
- [Core Renderers](render/core-renderer.md)
Expand Down Expand Up @@ -154,9 +154,10 @@
- [Joint](physics/physics/joint-component.md)
- [Audio](audio/index.md)
- [Play Audio](audio/audio.md)
- [Compatability](audio/compatability.md)
- [AudioSource Component Reference](components/audiosource.md)

## Advanced Topics
## Advanced Topics

- [Editor Extension](extension/index.md)
- [Your First Extension](extension/your-first-extension.md)
Expand Down
28 changes: 28 additions & 0 deletions en/audio/compatibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Audio Compatibility

## DOM Audio

The average browser supports the **Audio** tag to play audio. The __DOM Audio__ mode in the engine plays a series of sounds by creating an audio tag. However, the following may occur on some browsers:

1. In some mobile browsers, the **Audio** callback is missing, which will cause a long load time. So we try to recommend __WebAudio__ (see below).
2. The browser on IOS must be in the event trigger function actively operated by the user to play this type of audio. Active playback using javascript may be ignored.

## WebAudio

__WebAudio__ compatibility is much better than __DOM__ mode, but there are some special considerations to think about:

1. On IOS, the default __WebAudio__ timeline will not advance. The timeline will only start after the user touches and plays the audio for the first time. This means that the page may not be able to start and play background music. The best way to do this is to guide the user through the screen and then play the sound.

## IOS WeChat automatically plays audio

After loading the __js sdk__ in WeChat, the `WeixinJSBridgeReady` event, can be used to also play audio. If you need to start playing background music immediately, use the following:

```javascript
document.addEventListener('WeixinJSBridgeReady', function () {
var audio = document.createElement('audio');
audio.src = cc.url.raw('resources/audio/music_logo.mp3');
audio.play();
});
```

And after the engine is started, make sure to stop playing this audio before playing audio in other ways.
2 changes: 1 addition & 1 deletion en/components/scrollview.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ cc.Class({
});
```

Similarly, you can register events such as 'scrolling', 'touch-up', 'scrolling', etc. The events of the callback function parameters and 'scroll-to-top' parameters.
Similarly, you can register events such as `scrolling`, `touch-up`, `scroll-began`, etc. The events of the callback function parameters and `scroll-to-top` parameters.

For a full list of ScrollView events, refer to the ScrollView API documentation.

Expand Down
14 changes: 7 additions & 7 deletions en/components/sprite.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Sprite component reference
# Sprite Component Reference

Using Sprites is the most common way to display images in a 2D game. By adding the Sprite component to a node you can display images from the project resources within the scene.
Using `Sprite` is the most common way to display images in 2D games. By adding a `Sprite` component to a `Node`, you can display the images in the project's resources in the `Scene`.

![add sprite](sprite/sprite_component.png)

Click the **Add Component** button at the bottom of the **Properties** panel and select `Sprite` from `Add Rendering Component` to add the Sprite component to the node.
You can add a `Sprite` component to the node by clicking the **Add Component** button below the **Properties** and selecting **Sprite** from the **Add Renderer Component** menu.

Script interface please refer to [Sprite API](../../../api/en/classes/Sprite.html).
Please refer to [Sprite API](../../../api/en/classes/Sprite.html) for the script interface.

## Sprite attribute
## Sprite Properties

| Attribute | Function Explanation
| Properties | Description
| -------------- | ----------- |
| Atlas | [Atlas resource](../asset-workflow/atlas.md) which the Sprite display image resource belongs to.
| Sprite Frame | [SpriteFrame image resource](../asset-workflow/sprite.md) which is used to render the Sprite.
Expand Down Expand Up @@ -52,4 +52,4 @@ When the `Type` property selects `Filled mode`, a new set of properties appears
Under both the `horizontal` and `VERTICAL` fill types, the values set by `Fill Start` affect the total number of fills, if `Fill Start` is set to 0.5, even if `Fill Range` is set to 1.0, the actual padding is still only half the total size of the Sprite.

`Fill Start` in the `RADIAL` type only determines the orientation of the starting fill, when `Fill Start` is set to 0, start filling from the x axis positive direction.<br>
`Fill Range` determines the total amount of padding, which fills the entire circle when `Fill Range` is set to 1. A counter anticlockwise fill when `Fill Range` is positive, and is filled clockwise when negative.
`Fill Range` determines the total amount of padding, which fills the entire circle when `Fill Range` is set to 1. A counter anticlockwise fill when `Fill Range` is positive, and is filled clockwise when negative.
5 changes: 2 additions & 3 deletions en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ Welcome to the __Cocos Creator__ User Manual! __Cocos Creator__ is a free, cross
**Attention**: Please select the corresponding version of the manual in the upper right corner according to the version of __Cocos Creator__ you are using.

## What's New

- Starting with v1.10, Cocos Creator has refactored the underlying resource types, most of which are unaffected, but some projects may receive warnings, please refer to [v1.10 Resource Upgrade Guide](release-node/raw-asset-migration.md).
- Starting with v1.9, Cocos Creator support posted to [Facebook Instant Games](publish/publish-fb-instant-games.md) and [QQ Play](publish/publish-qqplay.md).
- Starting with v1.8,Cocos Creator support posted to Wechat Mini Games,please refer to [Wechat Mini Games](publish/publish-wechatgame.md).
- Cocos Creator also supports exporting scenes and UI to Cocos2d-x, see [C++/Lua Support](advanced-topics/cpp-lua.md).

**Attention**: Please select the corresponding version of the manual in the upper right corner according to the version of __Cocos Creator__ you are using.

## Index

- [Getting Started](getting-started/index.md)
Expand All @@ -38,4 +37,4 @@ Welcome to the __Cocos Creator__ User Manual! __Cocos Creator__ is a free, cross
- [Dark Slash](https://github.com/cocos-creator/tutorial-dark-slash): Original Dark Slash resources authorized by Veewo Games to recreate Dark Slash in Cocos Creator as a demo.
- [i18n Multi-language demo](https://github.com/nantas/demo-i18n)

**Attention**: These projects are updated regularly for a specific version of __Cocos Creator__. Their default branches on GitHub are `master`, which corresponds to the latest __Cocos Creator__ version. If you are still using the old version of __Cocos Creator__, these projects may not be able to open, and you can try to switch to the same named branch as the old version.
**Attention**: These projects are not always brought up to date with the most recent version of __Cocos Creator__. Their default branches on GitHub are `master`, which corresponds to the latest __Cocos Creator version__. If you are still using the old version of __Cocos Creator__, these projects may not be able to open, and you can try to switch to the same named branch as the old version.
69 changes: 30 additions & 39 deletions en/publish/publish-qqplay.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,58 @@
# 发布到 QQ「玩一玩」平台
# Publishing to __QQ Play__

QQ「玩一玩」与微信小游戏类似,内置于 QQ 中,无需下载游戏就能玩转多款热门手游。玩一玩的底层 runtime 并不是真正的 HTML 浏览器内核,而是玩一玩自研的 Bricks 游戏引擎。Cocos Creator 从 v1.9 版本开始就支持游戏内容跨平台发布到 QQ「玩一玩」。

作为跨平台游戏引擎方,Creator 为用户完成的主要工作包括:
__QQ Play__ is similar to __WeChat Mini Games__, but built on the __QQ__ platform. __QQ Play__ allows you to play a variety of popular mobile games *without downloading* them. The underlying runtime of **QQ Play** is not a real HTML browser kernel, but a self-developed Bricks game engine. __Cocos Creator__ has supported game content cross-platform publishing to __QQ Play__ since v1.9.

- 引擎负责适配 QQ「玩一玩」平台,用户的游戏逻辑代码不需要任何额外的修改
- Cocos Creator 编辑器提供打包流程,可直接发布为符合 QQ「玩一玩」技术规范的游戏
- 支持 QQ「玩一玩」平台标准的远程资源加载、缓存,以及缓存资源的版本控制
As a cross-platform game engine, __Cocos Creator's__ main tasks for users include:

## 使用 Cocos Creator 一键发布手机 QQ「玩一玩」
- The engine is responsible for adapting the __QQ Play__ platform, the user's game logic code does not require any additional modifications.
- The __Cocos Creator__ editor provides a packaging process that can be directly published as a game that meets the __QQ Play__ specification.
- Support remote __QQ__ resource loading, caching, and version control of cache resources for __QQ Play__ platform standard.

**准备工作**
## Use __Cocos Creator__ to publish to __QQ Play__ with one-click.

- 获取 Bricks 引擎工程(这个工程暂时不能对外公开,开发者可向腾讯申请 bitbucket 库读取权限)
### Ready to work

**发布流程**
Obtain the Bricks engine project (this project is temporarily unavailable, developers can apply to the __Cocos Creator__ engine team for internal testing, or directly apply to Tencent for bitbucket library read access)

1、使用 Creator 打开需要发布的项目工程,在构建发布面板中选择 **QQ Play** 平台。`远程服务器地址` 选项,若有需要可自行设置。然后点击 **构建**
### Publishing process

**First**, use __Cocos Creator__ to open the project project you want to publish, and select __QQ Play__ platform in the __Build...__ panel. If necessary, you can set the `Remote server address` option. Then click on **Build**.

![](./publish-qqplay/build.jpeg)

构建完成后访问项目文件夹,在 build 目录下就会生成一个 qqplay 的发布包:
After the build is complete, a __qqplay__ release package will be generated in the __build__ directory:

![](./publish-qqplay/package.jpeg)

2、将 qqplay 文件夹中的内容拷贝到 Bricks 引擎工程的 Res 文件夹中:
**Second**, copy the contents of the __qqplay__ folder to the __Res__ folder of the Bricks Engine project:

![](./publish-qqplay/paste.jpeg)

3、打开 Bricks 引擎中的 Xcode 工程,就可以直接进行玩一玩的编译调试了。具体可查看 [Bricks 引擎官方调试文档](http://hudong.qq.com/docs/engine/debug/intro.html)

与这篇文档搭配的还有一段教学视频,可以结合视频中的操作来理解,更加直观。

{% raw %}

<iframe frameborder="0" width="100%" height="440" src="https://v.qq.com/iframe/player.html?vid=m055288q7cl&tiny=0&auto=0" allowfullscreen></iframe>

{% endraw %}
**Third**, open the Xcode project in the Bricks engine, you can compile and debug the __QQ Play__ game directly, see the [Bricks Engine Official Debugging Document](https://hudong.qq.com/docs/engine/debug/intro.html).

<br>
**Note:** there is also a [teaching video](https://v.qq.com/iframe/player.html?vid=m055288q7cl&tiny=0&auto=0) that can be used alongside this document.

## QQ「玩一玩」已知问题:
## __QQ Play__ Known issues

目前暂时仅支持在 Mac 上使用 Xcode 进行编译开发。<br>
此外,我们对 QQ「玩一玩」的适配工作还未完全结束,目前仍不支持以下模块:
Currently, only Xcode is used for compiling and developing on Mac. In addition, our adaptation of __QQ Play__ has not been completely completed, and the following modules are still not supported:

- Label:不支持 TTF,系统字体也只能使用默认字体
- 粒子系统:不支持 plist 中存储贴图数据,只支持贴图 URL
- Label: TTF is not supported, and system fonts can only use default fonts.
- Particle system: Does not support storing texture data in plist, only supports texture URL
- WebView
- VideoPlayer
- DeviceMotion

以上功能预计在以后的更新中会逐步支持,我们也将持续与 QQ「玩一玩」工程师们紧密沟通,不断优化适配效果。
The above functions are expected to be gradually supported in future updates, and we will continue to communicate closely with __QQ Play__ engineers to continuously optimize the adaptation effect.

## 接入注意事项:
## Access Notes

- 首包必须在 10M 以内,后续的资源可以部署在腾讯 CDN 上用 https 进行加载。
- 上线前需要软件著作权,并提供版号申请证明,回执或者受理截图。
- 除腾讯工作室外开发的游戏外,名称不允许出现 QQ、腾讯、天天、全民、欢乐等官方字眼。
- 游戏必须有自己的大厅,大厅需要具备开始游戏(含邀请好友)、道具商城、活动入口。
- 游戏内需要具备分享至 QQ 好友 / QQ 空间的能力。
- 游戏需要使用自建后台,必须接 openkey 鉴权。
- The first package must be within 10MB, and subsequent resources can be deployed on the __Tencent CDN__ using https for loading.
- Software copyright is required before going online, and proof of application number, receipt or receipt of screenshots is provided.
- Except for the games developed by Tencent Studios, the official names such as QQ, Tencent, Everyday, All People, and Joy are not allowed.
- The game must have its own hall. The lobby needs to have a start game (including inviting friends), an item store, and an event entrance.
- The ability to share to QQ friends / QQ space is required in the game.
- The game needs to use the self-built background and must be connected to openkey authentication.

## 参考链接
## Reference link

更多内容可参考 [QQ「玩一玩」官方文档](https://hudong.qq.com/docs/access/)
For more details, please refer to [QQ Play official documentation](https://hudong.qq.com/docs/access/).
Loading

0 comments on commit 8589c6c

Please sign in to comment.