From b027bb3a3fbaca7d55e17b10988aa8a499aebf9d Mon Sep 17 00:00:00 2001
From: Santy-Wang
Date: Wed, 25 Sep 2019 18:55:02 +0800
Subject: [PATCH 01/22] in search of sub asset of image asset when load
resource failed
---
cocos/core/load-pipeline/CCLoader.ts | 68 +++++++++++++++++++---------
1 file changed, 47 insertions(+), 21 deletions(-)
diff --git a/cocos/core/load-pipeline/CCLoader.ts b/cocos/core/load-pipeline/CCLoader.ts
index 41543c8882..a7ac173e75 100644
--- a/cocos/core/load-pipeline/CCLoader.ts
+++ b/cocos/core/load-pipeline/CCLoader.ts
@@ -29,6 +29,9 @@
*/
import { Asset, RawAsset } from '../assets';
+import { SpriteFrame } from '../assets/sprite-frame';
+import { Texture2D } from '../assets/texture-2d';
+import { TextureCube } from '../assets/texture-cube';
import { createMap, getClassName, isChildClassOf } from '../utils/js';
import { callInNextTick } from '../utils/misc';
import AssetLoader from './asset-loader';
@@ -1011,33 +1014,56 @@ export class CCLoader extends Pipeline {
*/
public _getResUuid (url, type, mount, quiet) {
mount = mount || 'assets';
-
+ let uuid = '';
if (CC_EDITOR) {
- const info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}`);
- return info ? info.uuid : '';
+ let info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}`);
+ if (!info && type) {
+ if (isChildClassOf(type, SpriteFrame)) {
+ info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}/spriteFrame`);
+ }
+ else if (isChildClassOf(type, Texture2D)) {
+ info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}/texture`);
+ }
+ else if (isChildClassOf(type, TextureCube)) {
+ info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}/textureCube`);
+ }
+ }
+ uuid = info ? info.uuid : '';
}
-
- const assetTable = assetTables[mount];
- if (!url || !assetTable) {
- return null;
- }
- // Ignore parameter
- const index = url.indexOf('?');
- if (index !== -1) {
- url = url.substr(0, index);
- }
- let uuid = assetTable.getUuid(url, type);
- if (!uuid) {
- const extname = cc.path.extname(url);
- if (extname) {
- // strip extname
- url = url.slice(0, - extname.length);
+ else {
+ const assetTable = assetTables[mount];
+ if (url && assetTable) {
+ // Ignore parameter
+ const index = url.indexOf('?');
+ if (index !== -1) {
+ url = url.substr(0, index);
+ }
uuid = assetTable.getUuid(url, type);
- if (uuid && !quiet) {
- cc.warnID(4901, url, extname);
+ if (!uuid) {
+ const extname = cc.path.extname(url);
+ if (extname) {
+ // strip extname
+ url = url.slice(0, - extname.length);
+ uuid = assetTable.getUuid(url, type);
+ if (uuid && !quiet) {
+ cc.warnID(4901, url, extname);
+ }
+ }
+ }
+ if (!uuid && type) {
+ if (isChildClassOf(type, SpriteFrame)) {
+ uuid = assetTable.getUuid(url + '/spriteFrame', type);
+ }
+ else if (isChildClassOf(type, Texture2D)) {
+ uuid = assetTable.getUuid(url + '/texture', type);
+ }
+ else if (isChildClassOf(type, TextureCube)) {
+ uuid = assetTable.getUuid(url + '/textureCube', type);
+ }
}
}
}
+
return uuid;
}
From d9c903de5bcebe1eba2c47a3fa439b248e1dddbe Mon Sep 17 00:00:00 2001
From: Santy-Wang
Date: Thu, 26 Sep 2019 14:18:05 +0800
Subject: [PATCH 02/22] adjust warning information about load resouces
---
EngineErrorMap.md | 4 ++++
cocos/core/load-pipeline/CCLoader.ts | 30 ++++++----------------------
2 files changed, 10 insertions(+), 24 deletions(-)
diff --git a/EngineErrorMap.md b/EngineErrorMap.md
index 0b02e262c0..2d6c2816b8 100644
--- a/EngineErrorMap.md
+++ b/EngineErrorMap.md
@@ -1806,6 +1806,10 @@ Since v1.10, for any atlas ("%s") in the "resources" directory, it is not possib
Download Font [ %s ] failed, using Arial or system default font instead
+### 4934
+
+Please assure that the full path of sub asset is correct!
+
### 5000
object already destroyed
diff --git a/cocos/core/load-pipeline/CCLoader.ts b/cocos/core/load-pipeline/CCLoader.ts
index a7ac173e75..e5091a65ee 100644
--- a/cocos/core/load-pipeline/CCLoader.ts
+++ b/cocos/core/load-pipeline/CCLoader.ts
@@ -1016,18 +1016,7 @@ export class CCLoader extends Pipeline {
mount = mount || 'assets';
let uuid = '';
if (CC_EDITOR) {
- let info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}`);
- if (!info && type) {
- if (isChildClassOf(type, SpriteFrame)) {
- info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}/spriteFrame`);
- }
- else if (isChildClassOf(type, Texture2D)) {
- info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}/texture`);
- }
- else if (isChildClassOf(type, TextureCube)) {
- info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}/textureCube`);
- }
- }
+ const info = EditorExtends.Asset.getAssetInfoFromUrl(`db://${mount}/resources/${url}`);
uuid = info ? info.uuid : '';
}
else {
@@ -1050,20 +1039,13 @@ export class CCLoader extends Pipeline {
}
}
}
- if (!uuid && type) {
- if (isChildClassOf(type, SpriteFrame)) {
- uuid = assetTable.getUuid(url + '/spriteFrame', type);
- }
- else if (isChildClassOf(type, Texture2D)) {
- uuid = assetTable.getUuid(url + '/texture', type);
- }
- else if (isChildClassOf(type, TextureCube)) {
- uuid = assetTable.getUuid(url + '/textureCube', type);
- }
- }
}
}
-
+ if (!uuid && type) {
+ if (isChildClassOf(type, SpriteFrame) || isChildClassOf(type, Texture2D) || isChildClassOf(type, TextureCube)) {
+ cc.warnID(4934);
+ }
+ }
return uuid;
}
From 8a98afdf088584d936867c1fcab211af44d4aa76 Mon Sep 17 00:00:00 2001
From: Yun Hsiao Wu
Date: Thu, 26 Sep 2019 16:39:43 +0800
Subject: [PATCH 03/22] fix audio duration clamp & profiler ratio (#5475)
---
cocos/audio/assets/player-web.ts | 3 ++-
cocos/core/utils/profiler/profiler.ts | 14 ++++----------
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/cocos/audio/assets/player-web.ts b/cocos/audio/assets/player-web.ts
index 0d67298ae8..448be7141d 100644
--- a/cocos/audio/assets/player-web.ts
+++ b/cocos/audio/assets/player-web.ts
@@ -138,7 +138,8 @@ export class AudioPlayerWeb extends AudioPlayer {
public setCurrentTime (val: number) {
// throws InvalidState Error on some device if we don't do the clamp here
- this._offset = clamp(val, 0, this._duration);
+ // the serialized duration is not accurate, use the actual duration first
+ this._offset = clamp(val, 0, this._audio && this._audio.duration || this._duration);
if (this._state !== PlayingState.PLAYING) { return; }
this._sourceNode.stop(); this._do_play();
}
diff --git a/cocos/core/utils/profiler/profiler.ts b/cocos/core/utils/profiler/profiler.ts
index b28162a86e..051ffc53f2 100644
--- a/cocos/core/utils/profiler/profiler.ts
+++ b/cocos/core/utils/profiler/profiler.ts
@@ -233,17 +233,11 @@ export class Profiler {
const modelCom = managerNode.addComponent('cc.ModelComponent') as ModelComponent;
modelCom.mesh = createMesh({
- // positions: [
- // -0.25, -1/7, 0, // bottom-left
- // -0.25, 1/7, 0, // top-left
- // 0.25, 1/7, 0, // top-right
- // 0.25, -1/7, 0, // bottom-right
- // ],
positions: [
- -0.3, -0.2, 0, // bottom-left
- -0.3, 0.2, 0, // top-left
- 0.3, 0.2, 0, // top-right
- 0.3, -0.2, 0, // bottom-right
+ -0.35, -0.2, 0, // bottom-left
+ -0.35, 0.2, 0, // top-left
+ 0.35, 0.2, 0, // top-right
+ 0.35, -0.2, 0, // bottom-right
],
indices: [
0, 2, 1,
From a593c35a42c8dafd73ab5a0a215fbb5d0cc73ece Mon Sep 17 00:00:00 2001
From: pandamicro
Date: Thu, 26 Sep 2019 18:50:47 +0800
Subject: [PATCH 04/22] Update Licenses (#5477)
---
licenses/LICENSE | 25 --
licenses/LICENSE_cocos2d-html5.txt | 23 --
licenses/License_and_terms_en.rtf | 182 ++++++++++++
licenses/License_and_terms_zh.rtf | 450 +++++++++++++++++++++++++++++
4 files changed, 632 insertions(+), 48 deletions(-)
delete mode 100644 licenses/LICENSE
delete mode 100644 licenses/LICENSE_cocos2d-html5.txt
create mode 100755 licenses/License_and_terms_en.rtf
create mode 100755 licenses/License_and_terms_zh.rtf
diff --git a/licenses/LICENSE b/licenses/LICENSE
deleted file mode 100644
index 8102192271..0000000000
--- a/licenses/LICENSE
+++ /dev/null
@@ -1,25 +0,0 @@
-/****************************************************************************
- Copyright (c) 2013-2016 Chukong Technologies Inc.
- Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
-
- http://www.cocos.com
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated engine source code (the "Software"), a limited,
- worldwide, royalty-free, non-assignable, revocable and non-exclusive license
- to use Cocos Creator solely to develop games on your target platforms. You shall
- not use Cocos Creator software for developing other software or tools that's
- used for developing games. You are not granted to publish, distribute,
- sublicense, and/or sell copies of Cocos Creator.
-
- The software or tools in this License Agreement are licensed, not sold.
- Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
- ****************************************************************************/
\ No newline at end of file
diff --git a/licenses/LICENSE_cocos2d-html5.txt b/licenses/LICENSE_cocos2d-html5.txt
deleted file mode 100644
index eb8e4cf6a0..0000000000
--- a/licenses/LICENSE_cocos2d-html5.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-cocos2d-html5 http://www.cocos2d-x.org
-
-Copyright (c) 2010-2011 - cocos2d-x community
-(see each file to see the different copyright owners)
-
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
diff --git a/licenses/License_and_terms_en.rtf b/licenses/License_and_terms_en.rtf
new file mode 100755
index 0000000000..837b109223
--- /dev/null
+++ b/licenses/License_and_terms_en.rtf
@@ -0,0 +1,182 @@
+{\rtf1\ansi\ansicpg936\cocoartf1671\cocoasubrtf200
+{\fonttbl\f0\fnil\fcharset0 Calibri;\f1\fnil\fcharset0 Calibri-Bold;\f2\fnil\fcharset134 SimSun;
+}
+{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}
+{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;}
+\vieww18340\viewh19100\viewkind0
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+
+\f0\fs21 \cf2 \
+\pard\pardeftab420\sl-500\qc\partightenfactor0
+
+\f1\b \cf2 LICENSE AGREEMENT\
+\pard\pardeftab420\fi424\sl-500\qj\partightenfactor0
+
+\f0\b0 \cf2 For purposes of this License Agreement, Cocos Creator 3D created by Xiamen Yaji Software Co., Ltd is a cross-platform desktop software for developing game software and interactive rich media that can be published to Android, iOS, Web Standard, Windows and Mac.\
+\
+Cocos Creator 3D as a software includes open sourced JavaScript game engine, editor extension and C++ game engine. It also includes close sourced editor program.\
+\
+Open sourced JavaScript and C++ game engine, with editor extension can be modified and customized by developer user. The modified and customized version of software can be used to develop game software and interactive rich media for end users, but not allowed to redistribute or publish game develop software based on Cocos Creator 3D's open sourced code.\
+\
+Cocos Creator 3D are licensed to you subject to the terms of this License Agreement ("License Agreement"). This License Agreement forms a legally binding contract between you and Xiamen Yaji Software Co., Ltd, a Chinese Xiamen corporation located at Unit 1301, No. 167, East Tapu Road, Xiamen 361008, China ("Xiamen Yaji") in relation to your use of Cocos Creator 3D.\
+\
+In order to use Cocos Creator 3D, you must first agree to this License Agreement. By downloading, installing, copying or otherwise using Cocos Creator 3D, you accept the terms and conditions of this License Agreement. If you do not agree with any of the terms or conditions of this License Agreement, do not proceed with downloading, copying, installing or any other use of Cocos Creator 3D or any portion thereof as you have no rights to do so.\
+\pard\pardeftab420\sl-500\qj\partightenfactor0
+\cf2 \
+1. License Grant and Acceptance.\
+1.1 By downloading, installing, copying or otherwise using Cocos Creator 3D, you hereby accept all of the terms of this License Agreement without modification. If you are downloading, installing, copying or otherwise using Cocos Creator 3D on behalf of your employer or other entity, then you hereby agree that you are entering into this License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use Cocos Creator 3D on behalf of your employer or other entity.\
+1.2 Subject to the terms of this License Agreement, Xiamen Yaji grants you a limited, worldwide, royalty-free, non-assignable, revocable and non-exclusive license to use Cocos Creator 3D solely to develop applications and games on your target platforms. The softwares or tools in this License Agreement are licensed, not sold.\
+1.3 You may not use Cocos Creator 3D for any purpose not expressly permitted by this License Agreement, including but not limited to:\
+1.3.1 Copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of Cocos Creator 3D or any part of Cocos Creator 3D;\
+1.3.2 Combine any part of Cocos Creator 3D with other software;\
+1.3.3 Create "forks" or other derivative works of Cocos Creator 3D, or distribute, participate in the creation of, or promote in any way any derivative works of Cocos Creator 3D.\
+1.3.4 Redistribute Cocos Creator 3D as part of any development toolkit or library, an application builder, a website builder or any software or tool that is intended for use by software, application, or website developers or designers.\
+1.4 You agree to use Cocos Creator 3D and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions.\
+1.5 You agree that you are solely responsible for (and that Xiamen Yaji has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Cocos Creator 3D, and for the consequences of your actions (including any loss or damage which Xiamen Yaji may suffer) by doing so.\
+1.6 You agree that you are solely responsible for (and that Xiamen Yaji has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Xiamen Yaji or any third party may suffer) of any such breach.\
+1.7 You may not use Cocos Creator 3D and may not accept the License Agreement if you are a person barred from receiving Cocos Creator 3D under the laws of the country in which you are resident or from which you use Cocos Creator 3D.\
+\
+2. Ownership.\
+2.1 You agree that Xiamen Yaji or third parties own all legal right, including but not limited to ownership and any Intellectual Property Rights that subsist in Cocos Creator 3D. "Intellectual Property Rights" includes patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\
+2.2 Nothing in this License Agreement gives you a right to use any of Xiamen Yaji's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. You agree that you will not remove, obscure, or alter any proprietary rights notices (including but not limited to copyright and trademark notices) that may be affixed to or contained within Cocos Creator 3D. \
+2.3 Xiamen Yaji agrees that it obtains no right or interest from you (or your licensors) under this License Agreement in or to any applications that you develop using Cocos Creator 3D, including ownership and any Intellectual Property Rights that exist in those products.\
+\
+3. Usage Rules.\
+3.1 You must create an account to use Cocos Creator 3D. After registration, you may log into your account to download, install, copy or otherwise use Cocos Creator 3D.\
+\
+4. Term and Termination.\
+4.1 The term of this License Agreement will continue until terminated by either you or Xiamen Yaji as set out below.\
+4.2 In the event that you want to terminate this License Agreement, you shall do so by ceasing your use of Cocos Creator 3D.\
+4.3 Xiamen Yaji may terminate this License Agreement with you at any time if:\
+4.3.1 You breach any provision of this License Agreement;\
+4.3.2 Xiamen Yaji is required to do so by law;\
+4.3.3 Any partner with whom Xiamen Yaji offered certain parts of Cocos Creator 3D to you has terminated its relationship with Xiamen Yaji or ceased to offer certain parts of Cocos Creator 3D to you;\
+4.3.4 Xiamen Yaji decides to no longer provide Cocos Creator 3D or certain parts of Cocos Creator 3D to users in the country in which you are resident or from which you use Cocos Creator 3D;\
+4.3.5 The Cocos Creator 3D provided by Xiamen Yaji to you is no longer commercially viable;\
+4.3.6 Xiamen Yaji shall be entitled in its sole discretion to terminate this License Agreement at any time.\
+4.4 Upon termination of this License Agreement for any reasons, all licenses granted to you under this License Agreement immediately terminate, and you shall cease using Cocos Creator 3D following termination.\
+\
+5. Disclaimer of Warranty.\
+5.1 You expressly understand and agree that your use of Cocos Creator 3D is at your sole risk and that Xiamen Yaji disclaims any and all warranty.\
+5.2 Your use of Cocos Creator 3D and any material downloaded or otherwise obtained through the use of Cocos Creator 3D is at your own discretion and risk, and you are solely responsible for any damage to your computer system or other device or loss of data that results from such use.\
+5.3 Xiamen Yaji makes no warranty about whether the services will meet your requirements or the timeliness, security and accuracy of the web service.\
+5.4 To that maximum extent permitted by law, Xiamen Yaji further expressly disclaims all warranties and conditions of any kind, where express or implied, including but not limited to the implied warranties and conditions of merchantability, fitness for a particular purpose and non-infringement.\
+\
+6. Limitation of Liability and Indemnification.\
+6.1 To that maximum extent permitted by law, you expressly understand and agree that Xiamen Yaji, its subsidiaries and affiliates, and its licensors shall not be liable to you under any theory of liability for any direct, indirect, incidental, special, consequential or exemplary damages that may be incurred by you, including but not limited to any loss of data, whether or not Xiamen Yaji or its representatives should have been aware of the possibility of any such losses arising. Some jurisdictions do not permit limitations on certain liabilities, and the foregoing limitation of liability do not apply to you to the extent they are not permitted in your jurisdiction.\
+6.2 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Xiamen Yaji, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys' fees) arising out of or accruing from (a) any Application you develop via Cocos Creator 3D that actually or allegedly infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (b) any non-compliance by you with this License Agreement.\
+\
+7. Governing Law\
+7.1 The conclusion, enforcement and dispute settlement of this License Agreement shall be governed by and construed in accordance with the laws of China and is subject to the jurisdiction of the courts of China.\
+7.2 In the event of any dispute with respect to the content or enforcement of this License Agreement, the parties shall negotiate in good faith to resolve the dispute. In case no settlement has been reached, either party may submit the relevant dispute to the people's court where Xiamen Yaji is located.\
+7.3Cocos Creator 3D are protected by international copyright laws, as well as other international property laws and treaties.\
+\
+8. Modification of Agreement\
+8.1 Xiamen Yaji has the right to modify any provision in this License Agreement at any time. Once this License agreement is modified, Xiamen Yaji shall directly publish the modified License Agreement on its website. Such action is deemed to have notified you about the modification. Xiamen Yaji may also inform you the modification in other reasonable ways.\
+8.2 In the event that you do not agree with Xiamen Yaji 's modifications of related provisions in this License Agreement, you shall have the right to cease using Cocos Creator 3D. Your continuous use of Cocos Creator 3D shall be deemed to accept modification of related provisions of this License Agreement.\
+\
+9. Delivery of Notices\
+9.1Under this License Agreement, all notices from Xiamen Yaji to you shall be delivered by means of webpage announcement, email, short message or conventional mail delivery service. Notices shall be deemed to have been received on the day it is so delivered.\
+9.2 Your notices shall be delivered to Xiamen Yaji by the address, fax number, e-mail address and other contact information officially announced by Xiamen Yaji.\
+\
+10. Miscellaneous.\
+10.1 In order to continually innovate and improve Cocos Creator 3D, Xiamen Yaji may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in Cocos Creator 3D are being used and how they are being used. Before any of this information is collected, Cocos Creator 3D shall notify you and seek your consent. In the event that you withhold consent, the information shall not be collected. The data collected is examined in the aggregate to improve Cocos Creator 3D and is maintained in accordance with Xiamen Yaji 's Privacy Policy.\
+10.2 You agree that if Xiamen Yaji does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Xiamen Yaji has the benefit of under any law), this shall not be taken to be a formal waiver of Xiamen Yaji rights and that those rights or remedies shall still be available to Xiamen Yaji.\
+10.3 You agree to be identified as a customer of Xiamen Yaji and you agree that Xiamen Yaji may refer to you by name, trade name and trademark, if applicable, and may briefly describe your business in our marketing materials and web site.\
+10.4 There are no implied licenses or other implied rights granted by Xiamen Yaji under this License Agreement, and all rights, except for those expressly granted hereunder, shall remain with Xiamen Yaji and its licensors.\
+10.5 In the event that any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision shall be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement shall continue to be valid and enforceable.\
+10.6 You acknowledge and agree that each member of the group of companies of which Xiamen Yaji is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.\
+10.7 The rights granted in this License Agreement may not be assigned or transferred by you to a Third Party without the prior written approval of Xiamen Yaji.\
+10.8 This License Agreement constitutes the whole legal agreement between you and Xiamen Yaji and governs your use of Cocos Creator 3D, and entirely replaces any prior agreements between you and Xiamen Yaji in relation to Cocos Creator 3D.\
+10.9 If any provision of this License Agreement is held to be invalid or unenforceable for whatever reason, the remaining provisions of this Agreement remain in full force and effect.\
+10.10 This contract is composed of official texts, appendixes, and etc. Appendixes are inseparable components of this contract with equal authenticity.\
+10.11 Xiamen Yaji reserves the right of interpretation of the above provisions.\
+\
+\pard\pardeftab420\sl-500\qj\partightenfactor0
+
+\f2 \cf2 Appendix A: Cocos2d-x
+\f0 Software License\
+Copyright (c) 2017-2019 Xiamen Yaji Software Co., Ltd.\
+Copyright (c) 2013-2016 Chukong Technologies\
+Copyright (c) 2010-2012 cocos2d-x community\
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\
+\
+Appendix B
+\f2 \'a3\'ba
+\f0 Spine Runtimes Software License\
+Version 2.5 \
+Copyright (c) 2013-2016, Esoteric Software\
+All rights reserved.\
+You are granted a perpetual, non-exclusive, non-sub-licensable, and non-transferable license to use, install, execute, and perform the Spine Runtimes software and derivative works solely for personal or internal use. Without the written permission of Esoteric Software (see Section 2 of the Spine Software License Agreement), you may not (a) modify, translate, adapt, or develop new applications using the Spine Runtimes or otherwise create derivative works or improvements of the Spine Runtimes or (b) remove, delete, alter, or obscure any trademarks or any copyright, trademark, patent, or other intellectual property or proprietary rights notices on or in the Software, including any copy thereof. Redistributions in binary or source form must include this license and terms.\
+THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\
+\
+Appendix C
+\f2 \'a3\'baDragonBones
+\f0 Runtimes Software License\
+The MIT License (MIT)\
+Copyright (c) 2012-2018 The DragonBones team and other contributors.\
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\
+\
+Appendix D
+\f2 \'a3\'baMicrosoft tslib License\
+\
+Apache License\
+\
+Version 2.0, January 2004\
+\
+{\field{\*\fldinst{HYPERLINK "http://www.apache.org/licenses/"}}{\fldrslt http://www.apache.org/licenses/}} \
+\
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\
+\
+1. Definitions.\
+\
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\
+\
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\
+\
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\
+\
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.\
+\
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\
+\
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\
+\
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\
+\
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\
+\
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."\
+\
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\
+\
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\
+\
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\
+\
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\
+\
+You must give any other recipients of the Work or Derivative Works a copy of this License; and\
+\
+You must cause any modified files to carry prominent notices stating that You changed the files; and\
+\
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and\
+\
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\
+\
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\
+\
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\
+\
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\
+\
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\
+\
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\
+\
+END OF TERMS AND CONDITIONS
+\f0 \
+\
+}
\ No newline at end of file
diff --git a/licenses/License_and_terms_zh.rtf b/licenses/License_and_terms_zh.rtf
new file mode 100755
index 0000000000..f2ec85b4b4
--- /dev/null
+++ b/licenses/License_and_terms_zh.rtf
@@ -0,0 +1,450 @@
+{\rtf1\ansi\ansicpg936\cocoartf1671\cocoasubrtf200
+{\fonttbl\f0\fnil\fcharset0 Calibri;\f1\fnil\fcharset134 SimSun;}
+{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}
+{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;}
+\vieww12000\viewh15840\viewkind0
+\deftab420
+\pard\pardeftab420\sl-500\qj\partightenfactor0
+
+\f0\fs21 \cf2 \
+\pard\pardeftab420\sl-500\qc\partightenfactor0
+
+\f1 \cf2 \'ca\'da\'c8\'a8\'d0\'ad\'d2\'e9
+\f0 \
+\pard\pardeftab420\fi424\sl-500\partightenfactor0
+
+\f1 \cf2 \'b1\'be\'ca\'da\'c8\'a8\'d0\'ad\'d2\'e9\'d6\'d0\'a1\'b0
+\f0 Cocos Creator 3D
+\f1 \'a1\'b1\'ca\'c7\'d6\'b8\'d3\'c9\'cf\'c3\'c3\'c5\'d1\'c5\'bb\'f9\'c8\'ed\'bc\'fe\'d3\'d0\'cf\'de\'b9\'ab\'cb\'be\'bf\'aa\'b7\'a2\'b5\'c4\'bf\'c9\'d2\'d4\'bf\'e7\'c6\'bd\'cc\'a8\'d4\'cb\'d0\'d0\'b5\'c4\'d7\'c0\'c3\'e6\'d3\'a6\'d3\'c3\'b3\'cc\'d0\'f2\'c8\'ed\'bc\'fe\'a3\'ac\'bf\'c9\'d3\'c3\'d3\'da\'bf\'aa\'b7\'a2\'d6\'c6\'d7\'f7\'d4\'da
+\f0 Android
+\f1 \'a1\'a2
+\f0 iOS
+\f1 \'a1\'a2
+\f0 Web Standard
+\f1 \'a1\'a2
+\f0 Windows
+\f1 \'a1\'a2
+\f0 Mac
+\f1 \'b5\'c8\'c6\'bd\'cc\'a8\'d4\'cb\'d0\'d0\'b5\'c4\'d3\'ce\'cf\'b7\'c8\'ed\'bc\'fe\'ba\'cd\'b6\'e0\'c3\'bd\'cc\'e5\'bd\'bb\'bb\'a5\'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ac\'b8\'bd\'bc\'fe\'a1\'a3\'d3\'c3\'bb\'a7\'c1\'cb\'bd\'e2\'c7\'d2\'cd\'ac\'d2\'e2\'a3\'ac\'c6\'e4\'bd\'ab\'ca\'dc\'b8\'bd\'bc\'fe\'cb\'f9\'ba\'ac\'cc\'f5\'bf\'ee\'b5\'c4\'d4\'bc\'ca\'f8\'a1\'a3\'b8\'bd\'bc\'fe\'d3\'eb\'d6\'f7\'d0\'ad\'d2\'e9\'d2\'bb\'b2\'a2\'b9\'b9\'b3\'c9\'cf\'c3\'c3\'c5\'d1\'c5\'bb\'f9\'d3\'eb\'d3\'c3\'bb\'a7\'d6\'ae\'bc\'e4\'cd\'ea\'d5\'fb\'b5\'c4\'d0\'ad\'d2\'e9\'a1\'a3
+\f0 \
+\pard\pardeftab420\sl-500\qj\partightenfactor0
+\cf2 10.11
+\f1 \'d2\'d4\'c9\'cf\'cc\'f5\'bf\'ee\'b5\'c4\'bd\'e2\'ca\'cd\'c8\'a8\'b9\'e9\'cf\'c3\'c3\'c5\'d1\'c5\'bb\'f9\'d7\'ee\'d6\'d5\'cb\'f9\'d3\'d0\'a1\'a3
+\f0 \
+\
+\pard\pardeftab420\sl-500\qj\partightenfactor0
+
+\f1 \cf2 \'b8\'bd\'bc\'fe\'d2\'bb\'a3\'ba\
+Cocos2d-x
+\f0 Software License\
+Copyright (c) 2017-2019 Xiamen Yaji Software Co., Ltd.\
+Copyright (c) 2013-2016 Chukong Technologies\
+Copyright (c) 2010-2012 cocos2d-x community\
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\
+\
+
+\f1 \'b8\'bd\'bc\'fe\'b6\'fe\'a3\'ba
+\f0 \
+Spine Runtimes Software License\
+Version 2.5 \
+Copyright (c) 2013-2016, Esoteric Software\
+All rights reserved.\
+You are granted a perpetual, non-exclusive, non-sublicensable, and non-transferable license to use, install, execute, and perform the Spine Runtimes software and derivative works solely for personal or internal use. Without the written permission of Esoteric Software (see Section 2 of the Spine Software License Agreement), you may not (a) modify, translate, adapt, or develop new applications using the Spine Runtimes or otherwise create derivative works or improvements of the Spine Runtimes or (b) remove, delete, alter, or obscure any trademarks or any copyright, trademark, patent, or other intellectual property or proprietary rights notices on or in the Software, including any copy thereof. Redistributions in binary or source form must include this license and terms.\
+THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\
+\
+
+\f1 \'b8\'bd\'bc\'fe\'c8\'fd\'a3\'ba
+\f0 \
+
+\f1 DragonBones
+\f0 Runtimes Software License\
+The MIT License (MIT)\
+Copyright (c) 2012-2018 The DragonBones team and other contributors.\
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\
+\
+
+\f1 \'b8\'bd\'bc\'fe\'cb\'c4\'a3\'ba
+\f0 \
+
+\f1 Microsoft tslib License\
+\
+Apache License\
+\
+Version 2.0, January 2004\
+\
+{\field{\*\fldinst{HYPERLINK "http://www.apache.org/licenses/"}}{\fldrslt http://www.apache.org/licenses/}} \
+\
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\
+\
+1. Definitions.\
+\
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\
+\
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\
+\
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\
+\
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.\
+\
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\
+\
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\
+\
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\
+\
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\
+\
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."\
+\
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\
+\
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\
+\
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\
+\
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\
+\
+You must give any other recipients of the Work or Derivative Works a copy of this License; and\
+\
+You must cause any modified files to carry prominent notices stating that You changed the files; and\
+\
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and\
+\
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\
+\
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\
+\
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\
+\
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\
+\
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\
+\
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\
+\
+END OF TERMS AND CONDITIONS
+\f0 \
+
+\f1 \
+}
\ No newline at end of file
From 6089e75bbafb4c0c778a9a0be0e74518eafffdcb Mon Sep 17 00:00:00 2001
From: JoneLau <32630749+JoneLau@users.noreply.github.com>
Date: Fri, 27 Sep 2019 17:01:28 +0800
Subject: [PATCH 05/22] fix component event type can't be find (#5473)
---
cocos/ui/components/button-component.ts | 2 +-
cocos/ui/components/editbox/edit-box-component.ts | 8 ++++----
cocos/ui/components/page-view-component.ts | 3 ++-
cocos/ui/components/scroll-view-component.ts | 4 +++-
cocos/ui/components/toggle-component.ts | 2 +-
cocos/ui/components/toggle-container-component.ts | 2 +-
6 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/cocos/ui/components/button-component.ts b/cocos/ui/components/button-component.ts
index c233ab3680..b8de323501 100644
--- a/cocos/ui/components/button-component.ts
+++ b/cocos/ui/components/button-component.ts
@@ -417,7 +417,7 @@ export class ButtonComponent extends Component {
* 按钮的点击事件列表。
*/
@property({
- type: ComponentEventHandler,
+ type: [ComponentEventHandler],
displayOrder: 3,
})
public clickEvents: ComponentEventHandler[] = [];
diff --git a/cocos/ui/components/editbox/edit-box-component.ts b/cocos/ui/components/editbox/edit-box-component.ts
index 8bbe330820..394a0af5c7 100644
--- a/cocos/ui/components/editbox/edit-box-component.ts
+++ b/cocos/ui/components/editbox/edit-box-component.ts
@@ -413,7 +413,7 @@ export class EditBoxComponent extends Component {
* 开始编辑文本输入框触发的事件回调。
*/
@property({
- type: ComponentEventHandler,
+ type: [ComponentEventHandler],
})
public editingDidBegan: ComponentEventHandler[] = [];
@@ -425,7 +425,7 @@ export class EditBoxComponent extends Component {
* 编辑文本输入框时触发的事件回调。
*/
@property({
- type: ComponentEventHandler,
+ type: [ComponentEventHandler],
})
public textChanged: ComponentEventHandler[] = [];
@@ -437,7 +437,7 @@ export class EditBoxComponent extends Component {
* 结束编辑文本输入框时触发的事件回调。
*/
@property({
- type: ComponentEventHandler,
+ type: [ComponentEventHandler],
})
public editingDidEnded: ComponentEventHandler[] = [];
@@ -449,7 +449,7 @@ export class EditBoxComponent extends Component {
* 当用户按下回车按键时的事件回调,目前不支持 windows 平台
*/
@property({
- type: ComponentEventHandler,
+ type: [ComponentEventHandler],
})
public editingReturn: ComponentEventHandler[] = [];
diff --git a/cocos/ui/components/page-view-component.ts b/cocos/ui/components/page-view-component.ts
index 1136d80dcd..b50faac3ef 100644
--- a/cocos/ui/components/page-view-component.ts
+++ b/cocos/ui/components/page-view-component.ts
@@ -271,6 +271,7 @@ export class PageViewComponent extends ScrollViewComponent {
@property({
visible: false,
override: true,
+ type: [ComponentEventHandler]
})
public scrollEvents: ComponentEventHandler[] = [];
@@ -287,7 +288,7 @@ export class PageViewComponent extends ScrollViewComponent {
* @zh 滚动视图的事件回调函数
*/
@property({
- type: ComponentEventHandler,
+ type: [ComponentEventHandler],
})
public pageEvents: ComponentEventHandler[] = [];
diff --git a/cocos/ui/components/scroll-view-component.ts b/cocos/ui/components/scroll-view-component.ts
index 4b1607914e..e57f79fb5d 100644
--- a/cocos/ui/components/scroll-view-component.ts
+++ b/cocos/ui/components/scroll-view-component.ts
@@ -288,7 +288,9 @@ export class ScrollViewComponent extends ViewGroupComponent {
* @zh
* 滚动视图的事件回调函数。
*/
- @property
+ @property({
+ type: [ComponentEventHandler],
+ })
public scrollEvents: ComponentEventHandler[] = [];
/**
diff --git a/cocos/ui/components/toggle-component.ts b/cocos/ui/components/toggle-component.ts
index 0b2f234800..4ef1657a9f 100644
--- a/cocos/ui/components/toggle-component.ts
+++ b/cocos/ui/components/toggle-component.ts
@@ -126,7 +126,7 @@ export class ToggleComponent extends ButtonComponent {
* Toggle 按钮的点击事件列表。
*/
@property({
- type: ComponentEventHandler,
+ type: [ComponentEventHandler],
})
public checkEvents: ComponentEventHandler[] = [];
@property
diff --git a/cocos/ui/components/toggle-container-component.ts b/cocos/ui/components/toggle-container-component.ts
index 787524eac9..349e7c1cc1 100644
--- a/cocos/ui/components/toggle-container-component.ts
+++ b/cocos/ui/components/toggle-container-component.ts
@@ -45,7 +45,7 @@ import { ToggleComponent} from './toggle-component';
@executeInEditMode
export class ToggleContainerComponent extends Component {
@property({
- type: ComponentEventHandler,
+ type: [ComponentEventHandler],
})
public checkEvents: ComponentEventHandler[] = [];
@property
From eb5b4fca12a8dc5ee46501201f5ff2d2c46ea41b Mon Sep 17 00:00:00 2001
From: ChiaNing
Date: Fri, 27 Sep 2019 17:04:58 +0800
Subject: [PATCH 06/22] API Doc fix (#5480)
---
cocos/core/animation/animation-state.ts | 2 +-
cocos/core/assets/sprite-frame.ts | 2 +-
cocos/core/components/component.ts | 4 +--
cocos/core/components/ui-base/deprecated.ts | 15 ++++++++++
cocos/core/components/ui-base/index.ts | 4 ++-
cocos/core/components/ui-base/ui-component.ts | 27 ------------------
cocos/core/data/class.ts | 8 ++----
cocos/core/director.ts | 4 +--
cocos/core/geom-utils/sphere.ts | 6 ++--
cocos/core/load-pipeline/loading-items.ts | 10 +++----
cocos/core/load-pipeline/pipeline.ts | 4 +--
cocos/core/math/mat3.ts | 16 +++++------
cocos/core/math/mat4.ts | 18 ++++++------
cocos/core/math/vec2.ts | 28 +++++++++----------
cocos/core/pipeline/render-queue.ts | 4 +--
.../platform/event-manager/event-listener.ts | 2 +-
cocos/core/scene-graph/base-node.ts | 5 ++--
.../core/scene-graph/node-event-processor.ts | 2 +-
cocos/core/scene-graph/private-node.ts | 4 +--
cocos/core/splash-image.ts | 4 +++
cocos/core/utils/interfaces.ts | 4 +--
cocos/core/utils/js-typed.ts | 2 +-
cocos/particle/particle-system-component.ts | 2 +-
23 files changed, 83 insertions(+), 94 deletions(-)
create mode 100644 cocos/core/components/ui-base/deprecated.ts
diff --git a/cocos/core/animation/animation-state.ts b/cocos/core/animation/animation-state.ts
index 099fd875e9..2dc95add23 100644
--- a/cocos/core/animation/animation-state.ts
+++ b/cocos/core/animation/animation-state.ts
@@ -304,7 +304,7 @@ export class AnimationState extends Playable {
/**
* @en The iteration duration of this animation in seconds. (length)
- * @zh 单次动画的持续时间,秒。
+ * @zh 单次动画的持续时间,秒。(动画长度)
* @readOnly
*/
public duration = 1;
diff --git a/cocos/core/assets/sprite-frame.ts b/cocos/core/assets/sprite-frame.ts
index 98cc343eb7..c3f23f35d4 100644
--- a/cocos/core/assets/sprite-frame.ts
+++ b/cocos/core/assets/sprite-frame.ts
@@ -230,7 +230,7 @@ export class SpriteFrame extends Asset {
* Right border of the sprite.
*
* @zh
- * sprite 的左边边框。
+ * sprite 的右边边框。
*/
get insetRight () {
return this._capInsets[INSET_RIGHT];
diff --git a/cocos/core/components/component.ts b/cocos/core/components/component.ts
index 8475fe1b87..43741e2632 100644
--- a/cocos/core/components/component.ts
+++ b/cocos/core/components/component.ts
@@ -454,7 +454,7 @@ class Component extends CCObject {
* @en Schedules a callback function that runs only once, with a delay of 0 or larger.
* @zh 调度一个只运行一次的回调函数,可以指定 0 让回调函数在下一帧立即执行或者在一定的延时之后执行。
* @method scheduleOnce
- * @see [[cc.Node.schedule]]
+ * @see [[Node.schedule]]
* @param {function} callback 回调函数。
* @param {Number} delay 第一次执行前等待的时间(延时执行)。
* @example
@@ -472,8 +472,6 @@ class Component extends CCObject {
/**
* @en Unschedules a custom callback function.
* @zh 取消调度一个自定义的回调函数。
- * @method unschedule
- * @see [[cc.Node.schedule]]
* @param {function} callback_fn 回调函数。
* @example
* ```typescript
diff --git a/cocos/core/components/ui-base/deprecated.ts b/cocos/core/components/ui-base/deprecated.ts
new file mode 100644
index 0000000000..5e936e024c
--- /dev/null
+++ b/cocos/core/components/ui-base/deprecated.ts
@@ -0,0 +1,15 @@
+/**
+ * @hidden
+ */
+
+import { removeProperty } from '../../utils';
+import { UIComponent } from './ui-component';
+
+removeProperty(UIComponent.prototype, 'UIComponent',[
+ {
+ name: '_visibility',
+ },
+ {
+ name: 'setVisibility',
+ },
+]);
diff --git a/cocos/core/components/ui-base/index.ts b/cocos/core/components/ui-base/index.ts
index f5913a10c2..162d09790c 100644
--- a/cocos/core/components/ui-base/index.ts
+++ b/cocos/core/components/ui-base/index.ts
@@ -30,4 +30,6 @@
export * from './canvas-component';
export * from './ui-component';
export * from './ui-render-component';
-export * from './ui-transfrom-component';
\ No newline at end of file
+export * from './ui-transfrom-component';
+
+import './deprecated';
diff --git a/cocos/core/components/ui-base/ui-component.ts b/cocos/core/components/ui-base/ui-component.ts
index 3f65882f14..f6503e7109 100644
--- a/cocos/core/components/ui-base/ui-component.ts
+++ b/cocos/core/components/ui-base/ui-component.ts
@@ -72,7 +72,6 @@ export class UIComponent extends Component {
}
return this._screen.visibility;
- // return this._visibility;
}
get _screen (){
@@ -82,7 +81,6 @@ export class UIComponent extends Component {
@property
protected _priority = 0;
- // protected _visibility = -1;
protected _followScreen: CanvasComponent | null = null;
private _lastParent: INode | null = null;
@@ -103,37 +101,12 @@ export class UIComponent extends Component {
}
}
- /**
- * @zh
- * 渲染数据收集。每个渲染组件都由此自身决定是否渲染以及渲染状态的更新。
- *
- * @param render 数据处理中转站。
- */
public updateAssembler(render: UI) {
}
-
- /**
- * @zh
- * 后渲染数据收集。每个渲染组件都由此接口决定是否渲染以及渲染状态的更新。
- * 一般是在自身子节点 updateAssembler 执行完调用。
- *
- * @param render 数据处理中转站。
- */
public postUpdateAssembler(render: UI) {
}
- /**
- * @zh
- * 设置当前组件的可视编号。(我们不希望用户自行做处理,除非用户自己知道在做什么)
- *
- * @deprecated 会在 Cocos Creator 3D beta18 及之后的版本废除
- */
- public setVisibility (value: number) {
- return;
- // this._visibility = value;
- }
-
public _setScreen(value: CanvasComponent){
this._followScreen = value;
}
diff --git a/cocos/core/data/class.ts b/cocos/core/data/class.ts
index 86aec05f93..bd57635501 100644
--- a/cocos/core/data/class.ts
+++ b/cocos/core/data/class.ts
@@ -857,12 +857,8 @@ function declareProperties (cls, className, properties, baseClass, mixins, es6?:
}
/**
- * @module cc
- */
-
-/**
- * @en Defines a CCClass using the given specification, please see [Class](/docs/editors_and_tools/creator-chapters/scripting/class.html) for details.
- * @zh 定义一个 CCClass,传入参数必须是一个包含类型参数的字面量对象,具体用法请查阅[类型定义](/docs/creator/scripting/class.html)。
+ * @en Defines a CCClass using the given specification
+ * @zh 定义一个 CCClass,传入参数必须是一个包含类型参数的字面量对象
*
* @method Class
*
diff --git a/cocos/core/director.ts b/cocos/core/director.ts
index 95b10e6282..297468d21e 100644
--- a/cocos/core/director.ts
+++ b/cocos/core/director.ts
@@ -885,8 +885,8 @@ export class Director extends EventTarget {
}
/**
- * @en Returns the FPS value. Please use {{#crossLink "Game.setFrameRate"}}cc.game.setFrameRate{{/crossLink}} to control animation interval.
- * @zh 获取单位帧执行时间。请使用 {{#crossLink "Game.setFrameRate"}}cc.game.setFrameRate{{/crossLink}} 来控制游戏帧率。
+ * @en Returns the FPS value. Please use [[Game.setFrameRate]] to control animation interval.
+ * @zh 获取单位帧执行时间。请使用 [[Game.setFrameRate]] 来控制游戏帧率。
* @deprecated since v2.0
* @return {Number}
*/
diff --git a/cocos/core/geom-utils/sphere.ts b/cocos/core/geom-utils/sphere.ts
index 0ef7a5b442..f4b5077009 100644
--- a/cocos/core/geom-utils/sphere.ts
+++ b/cocos/core/geom-utils/sphere.ts
@@ -110,9 +110,9 @@ export default class sphere {
/**
* 构造一个球。
- * @param cx 形状的相对于原点的 X 坐标。
- * @param cy 形状的相对于原点的 Y 坐标。
- * @param cz 形状的相对于原点的 Z 坐标。
+ * @param cx 该球的世界坐标的 X 坐标。
+ * @param cy 该球的世界坐标的 Y 坐标。
+ * @param cz 该球的世界坐标的 Z 坐标。
* @param {number} r 半径。
*/
constructor (cx: number = 0, cy: number = 0, cz: number = 0, r: number = 1) {
diff --git a/cocos/core/load-pipeline/loading-items.ts b/cocos/core/load-pipeline/loading-items.ts
index 622c16ada3..65f50ab726 100644
--- a/cocos/core/load-pipeline/loading-items.ts
+++ b/cocos/core/load-pipeline/loading-items.ts
@@ -145,7 +145,7 @@ function checkCircleReference(owner, item:IItem, recursiveCall?) {
/**
* @en
* LoadingItems is the queue of items which can flow them into the loading pipeline.
- * Please don't construct it directly, use {{#crossLink "LoadingItems.create"}}cc.LoadingItems.create{{/crossLink}} instead, because we use an internal pool to recycle the queues.
+ * Please don't construct it directly, use [[create]] instead, because we use an internal pool to recycle the queues.
* It hold a map of items, each entry in the map is a url to object key value pair.
* Each item always contains the following property:
* - id: The identification of the item, usually it's identical to url
@@ -161,7 +161,7 @@ function checkCircleReference(owner, item:IItem, recursiveCall?) {
* So please don't hold its reference for later usage, you can copy properties in it though.
* @zh
* LoadingItems 是一个加载对象队列,可以用来输送加载对象到加载管线中。
- * 请不要直接使用 new 构造这个类的对象,你可以使用 {{#crossLink "LoadingItems.create"}}cc.LoadingItems.create{{/crossLink}} 来创建一个新的加载队列,这样可以允许我们的内部对象池回收并重利用加载队列。
+ * 请不要直接使用 new 构造这个类的对象,你可以使用 [[create]] 来创建一个新的加载队列,这样可以允许我们的内部对象池回收并重利用加载队列。
* 它有一个 map 属性用来存放加载项,在 map 对象中已 url 为 key 值。
* 每个对象都会包含下列属性:
* - id:该对象的标识,通常与 url 相同。
@@ -234,7 +234,7 @@ export class LoadingItems extends CallbacksInvoker {
* ```
*/
public onComplete:Function|undefined;
-
+
/**
* @en The map of all items.
* @zh 存储所有加载项的对象。
@@ -318,8 +318,8 @@ export class LoadingItems extends CallbacksInvoker {
* @static
* @param {Pipeline} pipeline The pipeline to process the queue.
* @param {Array} urlList The items array.
- * @param {Function} [onProgress] The progression callback, refer to {{#crossLink "LoadingItems.onProgress"}}{{/crossLink}}
- * @param {Function} [onComplete] The completion callback, refer to {{#crossLink "LoadingItems.onComplete"}}{{/crossLink}}
+ * @param {Function} [onProgress] The progression callback, refer to [[onProgress]]
+ * @param {Function} [onComplete] The completion callback, refer to [[LoadingItems.onComplete]]
* @return {LoadingItems} The LoadingItems queue object
* @example
* ```
diff --git a/cocos/core/load-pipeline/pipeline.ts b/cocos/core/load-pipeline/pipeline.ts
index e99b128e07..44205a37d5 100644
--- a/cocos/core/load-pipeline/pipeline.ts
+++ b/cocos/core/load-pipeline/pipeline.ts
@@ -378,10 +378,10 @@ export class Pipeline {
* @en Removes an completed item in pipeline.
* It will only remove the cache in the pipeline or loader, its dependencies won't be released.
* cc.loader provided another method to completely cleanup the resource and its dependencies,
- * please refer to {{#crossLink "loader/release:method"}}cc.loader.release{{/crossLink}}
+ * please refer to [[Loader.release]]
* @zh 移除指定的已完成 item。
* 这将仅仅从 pipeline 或者 loader 中删除其缓存,并不会释放它所依赖的资源。
- * cc.loader 中提供了另一种删除资源及其依赖的清理方法,请参考 {{#crossLink "loader/release:method"}}cc.loader.release{{/crossLink}}
+ * cc.loader 中提供了另一种删除资源及其依赖的清理方法,请参考 [[Loader.release]]
* @method removeItem
* @param {Object} id The id of the item
* @return {Boolean} succeed or not
diff --git a/cocos/core/math/mat3.ts b/cocos/core/math/mat3.ts
index dc4a7513e6..1d42827485 100644
--- a/cocos/core/math/mat3.ts
+++ b/cocos/core/math/mat3.ts
@@ -683,13 +683,13 @@ export class Mat3 extends ValueType {
/**
* 设置当前矩阵使其与指定矩阵相等。
* @param other 相比较的矩阵。
- * @returns `this`
+ * @return this
*/
public set (other: Mat3);
/**
* 设置当前矩阵指定元素值。
- * @returns `this`
+ * @return this
*/
public set (m00?: number, m01?: number, m02?: number,
m03?: number, m04?: number, m05?: number,
@@ -714,7 +714,7 @@ export class Mat3 extends ValueType {
* 判断当前矩阵是否在误差范围内与指定矩阵相等。
* @param other 相比较的矩阵。
* @param epsilon 允许的误差,应为非负数。
- * @returns 两矩阵的各元素都分别相等时返回 `true`;否则返回 `false`。
+ * @return 两矩阵的各元素都分别相等时返回 `true`;否则返回 `false`。
*/
public equals (other: Mat3, epsilon = EPSILON): boolean {
return (
@@ -733,7 +733,7 @@ export class Mat3 extends ValueType {
/**
* 判断当前矩阵是否与指定矩阵相等。
* @param other 相比较的矩阵。
- * @returns 两矩阵的各元素都分别相等时返回 `true`;否则返回 `false`。
+ * @return 两矩阵的各元素都分别相等时返回 `true`;否则返回 `false`。
*/
public strictEquals (other: Mat3): boolean {
return this.m00 === other.m00 && this.m01 === other.m01 && this.m02 === other.m02 &&
@@ -743,7 +743,7 @@ export class Mat3 extends ValueType {
/**
* 返回当前矩阵的字符串表示。
- * @returns 当前矩阵的字符串表示。
+ * @return 当前矩阵的字符串表示。
*/
public toString () {
const t = this;
@@ -756,7 +756,7 @@ export class Mat3 extends ValueType {
/**
* 将当前矩阵设为单位矩阵。
- * @returns `this`
+ * @return `this`
*/
public identity () {
this.m00 = 1;
@@ -819,7 +819,7 @@ export class Mat3 extends ValueType {
/**
* 计算当前矩阵的行列式。
- * @returns 当前矩阵的行列式。
+ * @return 当前矩阵的行列式。
*/
public determinant (): number {
_a00 = this.m00; _a01 = this.m01; _a02 = this.m02;
@@ -958,7 +958,7 @@ export class Mat3 extends ValueType {
/**
* 重置当前矩阵的值,使其表示指定四元数表示的旋转变换。
* @param q 四元数表示的旋转变换。
- * @returns `this`
+ * @returns this
*/
public fromQuat (q: Quat) {
const x = q.x, y = q.y, z = q.z, w = q.w;
diff --git a/cocos/core/math/mat4.ts b/cocos/core/math/mat4.ts
index 3b9dc05f82..1fd4c9cd8f 100644
--- a/cocos/core/math/mat4.ts
+++ b/cocos/core/math/mat4.ts
@@ -1456,13 +1456,13 @@ export class Mat4 extends ValueType {
/**
* 设置当前矩阵使其与指定矩阵相等。
* @param other 相比较的矩阵。
- * @returns `this`
+ * @return this
*/
public set (other: Mat4);
/**
* 设置当前矩阵指定元素值。
- * @returns `this`
+ * @return this
*/
public set (
m00?: number, m01?: number, m02?: number, m03?: number,
@@ -1492,7 +1492,7 @@ export class Mat4 extends ValueType {
* 判断当前矩阵是否在误差范围内与指定矩阵相等。
* @param other 相比较的矩阵。
* @param epsilon 允许的误差,应为非负数。
- * @returns 两矩阵的各元素都分别相等时返回 `true`;否则返回 `false`。
+ * @return 两矩阵的各元素都分别相等时返回 `true`;否则返回 `false`。
*/
public equals (other: Mat4, epsilon = EPSILON): boolean {
return (
@@ -1518,7 +1518,7 @@ export class Mat4 extends ValueType {
/**
* 判断当前矩阵是否与指定矩阵相等。
* @param other 相比较的矩阵。
- * @returns 两矩阵的各元素都分别相等时返回 `true`;否则返回 `false`。
+ * @return 两矩阵的各元素都分别相等时返回 `true`;否则返回 `false`。
*/
public strictEquals (other: Mat4): boolean {
return this.m00 === other.m00 && this.m01 === other.m01 && this.m02 === other.m02 && this.m03 === other.m03 &&
@@ -1529,7 +1529,7 @@ export class Mat4 extends ValueType {
/**
* 返回当前矩阵的字符串表示。
- * @returns 当前矩阵的字符串表示。
+ * @return 当前矩阵的字符串表示。
*/
public toString () {
return '[\n' +
@@ -1542,7 +1542,7 @@ export class Mat4 extends ValueType {
/**
* 将当前矩阵设为单位矩阵。
- * @returns `this`
+ * @return `this`
*/
public identity () {
this.m00 = 1;
@@ -1634,7 +1634,7 @@ export class Mat4 extends ValueType {
/**
* 计算当前矩阵的行列式。
- * @returns 当前矩阵的行列式。
+ * @return 当前矩阵的行列式。
*/
public determinant (): number {
_a00 = this.m00; _a01 = this.m01; _a02 = this.m02; _a03 = this.m03;
@@ -1931,7 +1931,7 @@ export class Mat4 extends ValueType {
* @param q 四元数表示的旋转变换。
* @param v 位移变换,表示为各个轴的位移。
* @param s 缩放变换,表示为各个轴的缩放。
- * @returns `this`
+ * @return `this`
*/
public fromRTS (q: Quat, v: Vec3, s: Vec3) {
const x = q.x, y = q.y, z = q.z, w = q.w;
@@ -1975,7 +1975,7 @@ export class Mat4 extends ValueType {
/**
* 重置当前矩阵的值,使其表示指定四元数表示的旋转变换。
* @param q 四元数表示的旋转变换。
- * @returns `this`
+ * @return `this`
*/
public fromQuat (q: Quat) {
const x = q.x, y = q.y, z = q.z, w = q.w;
diff --git a/cocos/core/math/vec2.ts b/cocos/core/math/vec2.ts
index 7cc8b75e2b..8ff05af95f 100644
--- a/cocos/core/math/vec2.ts
+++ b/cocos/core/math/vec2.ts
@@ -423,7 +423,7 @@ export class Vec2 extends ValueType {
/**
* 设置当前向量使其与指定向量相等。
* @param other 相比较的向量。
- * @returns `this`
+ * @return `this`
*/
public set (other: Vec2);
@@ -431,7 +431,7 @@ export class Vec2 extends ValueType {
* 设置当前向量的具体分量值。
* @param x 要设置的 x 分量的值
* @param y 要设置的 y 分量的值
- * @returns `this`
+ * @return `this`
*/
public set (x?: number, y?: number);
@@ -450,7 +450,7 @@ export class Vec2 extends ValueType {
* 判断当前向量是否在误差范围内与指定向量相等。
* @param other 相比较的向量。
* @param epsilon 允许的误差,应为非负数。
- * @returns 当两向量的各分量都在指定的误差范围内分别相等时,返回 `true`;否则返回 `false`。
+ * @return 当两向量的各分量都在指定的误差范围内分别相等时,返回 `true`;否则返回 `false`。
*/
public equals (other: Vec2, epsilon = EPSILON) {
return (
@@ -466,7 +466,7 @@ export class Vec2 extends ValueType {
* @param x 相比较的向量的 x 分量。
* @param y 相比较的向量的 y 分量。
* @param epsilon 允许的误差,应为非负数。
- * @returns 当两向量的各分量都在指定的误差范围内分别相等时,返回 `true`;否则返回 `false`。
+ * @return 当两向量的各分量都在指定的误差范围内分别相等时,返回 `true`;否则返回 `false`。
*/
public equals2f (x: number, y: number, epsilon = EPSILON) {
return (
@@ -480,7 +480,7 @@ export class Vec2 extends ValueType {
/**
* 判断当前向量是否与指定向量相等。
* @param other 相比较的向量。
- * @returns 两向量的各分量都分别相等时返回 `true`;否则返回 `false`。
+ * @return 两向量的各分量都分别相等时返回 `true`;否则返回 `false`。
*/
public strictEquals (other: Vec2) {
return other && this.x === other.x && this.y === other.y;
@@ -490,7 +490,7 @@ export class Vec2 extends ValueType {
* 判断当前向量是否与指定分量的向量相等。
* @param x 指定向量的 x 分量。
* @param y 指定向量的 y 分量。
- * @returns 两向量的各分量都分别相等时返回 `true`;否则返回 `false`。
+ * @return 两向量的各分量都分别相等时返回 `true`;否则返回 `false`。
*/
public strictEquals2f (x: number, y: number) {
return this.x === x && this.y === y;
@@ -498,7 +498,7 @@ export class Vec2 extends ValueType {
/**
* 返回当前向量的字符串表示。
- * @returns 当前向量的字符串表示。
+ * @return 当前向量的字符串表示。
*/
public toString () {
return `(${this.x.toFixed(2)}, ${this.y.toFixed(2)})`;
@@ -521,7 +521,7 @@ export class Vec2 extends ValueType {
* 设置当前向量的值,使其各个分量都处于指定的范围内。
* @param minInclusive 每个分量都代表了对应分量允许的最小值。
* @param maxInclusive 每个分量都代表了对应分量允许的最大值。
- * @returns `this`
+ * @return `this`
*/
public clampf (minInclusive: Vec2, maxInclusive: Vec2) {
this.x = clamp(this.x, minInclusive.x, maxInclusive.x);
@@ -637,7 +637,7 @@ export class Vec2 extends ValueType {
/**
* 向量点乘。
* @param other 指定的向量。
- * @returns 当前向量与指定向量点乘的结果。
+ * @return 当前向量与指定向量点乘的结果。
*/
public dot (other: Vec2) {
return this.x * other.x + this.y * other.y;
@@ -646,7 +646,7 @@ export class Vec2 extends ValueType {
/**
* 向量叉乘。
* @param other 指定的向量。
- * @returns `out`
+ * @return `out`
*/
public cross (other: Vec2) {
return this.x * other.y - this.y * other.x;
@@ -654,7 +654,7 @@ export class Vec2 extends ValueType {
/**
* 计算向量的长度(模)。
- * @returns 向量的长度(模)。
+ * @return 向量的长度(模)。
*/
public length () {
return Math.sqrt(this.x * this.x + this.y * this.y);
@@ -662,7 +662,7 @@ export class Vec2 extends ValueType {
/**
* 计算向量长度(模)的平方。
- * @returns 向量长度(模)的平方。
+ * @return 向量长度(模)的平方。
*/
public lengthSqr () {
return this.x * this.x + this.y * this.y;
@@ -686,7 +686,7 @@ export class Vec2 extends ValueType {
/**
* 获取当前向量和指定向量之间的角度。
* @param other 指定的向量。
- * @returns 当前向量和指定向量之间的角度(弧度制);若当前向量和指定向量中存在零向量,将返回 0。
+ * @return 当前向量和指定向量之间的角度(弧度制);若当前向量和指定向量中存在零向量,将返回 0。
*/
public angle (other: Vec2) {
const magSqr1 = this.lengthSqr();
@@ -707,7 +707,7 @@ export class Vec2 extends ValueType {
* 获取当前向量和指定向量之间的有符号角度。
* 有符号角度的取值范围为 (-180, 180],当前向量可以通过逆时针旋转有符号角度与指定向量同向。
* @param other 指定的向量。
- * @returns 当前向量和指定向量之间的有符号角度(弧度制);若当前向量和指定向量中存在零向量,将返回 0。
+ * @return 当前向量和指定向量之间的有符号角度(弧度制);若当前向量和指定向量中存在零向量,将返回 0。
*/
public signAngle (other: Vec2) {
const angle = this.angle(other);
diff --git a/cocos/core/pipeline/render-queue.ts b/cocos/core/pipeline/render-queue.ts
index 71035321c9..07a9763b84 100644
--- a/cocos/core/pipeline/render-queue.ts
+++ b/cocos/core/pipeline/render-queue.ts
@@ -10,7 +10,7 @@ import { IRenderObject, IRenderPass, IRenderQueueDesc } from './define';
* @en
* Comparison sorting function. Opaque objects are sorted by depth priority -> depth front to back -> shader id.
* @zh
- * 比较排序函数。不透对象按优先级 -> 深度由前向后 -> ShaderId 顺序排序。
+ * 比较排序函数。不透明对象按优先级 -> 深度由前向后 -> ShaderId 顺序排序。
*/
export function opaqueCompareFn (a: IRenderPass, b: IRenderPass) {
if (a.hash === b.hash) {
@@ -28,7 +28,7 @@ export function opaqueCompareFn (a: IRenderPass, b: IRenderPass) {
* @en
* Comparison sorting function. Transparent objects are sorted by pass priority -> depth back to front -> shader id.
* @zh
- * 比较排序函数。半透对象按优先级 -> 深度由后向前 -> ShaderId 顺序排序。
+ * 比较排序函数。半透明对象按优先级 -> 深度由后向前 -> ShaderId 顺序排序。
*/
export function transparentCompareFn (a: IRenderPass, b: IRenderPass) {
if (a.hash === b.hash) {
diff --git a/cocos/core/platform/event-manager/event-listener.ts b/cocos/core/platform/event-manager/event-listener.ts
index ac1fbf1a22..ff216c7922 100644
--- a/cocos/core/platform/event-manager/event-listener.ts
+++ b/cocos/core/platform/event-manager/event-listener.ts
@@ -54,7 +54,7 @@ export interface ILinstenerMask {
*
* @zh
* 封装用户的事件处理逻辑。
- * 注意:这是一个抽象类,开发者不应该直接实例化这个类,请参考 [[cc.EventListener.create]] 。
+ * 注意:这是一个抽象类,开发者不应该直接实例化这个类,请参考 [[create]] 。
*/
export class EventListener {
diff --git a/cocos/core/scene-graph/base-node.ts b/cocos/core/scene-graph/base-node.ts
index 6f880779c0..2d60599f07 100644
--- a/cocos/core/scene-graph/base-node.ts
+++ b/cocos/core/scene-graph/base-node.ts
@@ -177,12 +177,12 @@ export class BaseNode extends CCObject implements IBaseNode, ISchedulable {
* @en
* The local active state of this node.
* Note that a Node may be inactive because a parent is not active, even if this returns true.
- * Use {{#crossLink "Node/activeInHierarchy:property"}}{{/crossLink}}
+ * Use [[activeInHierarchy]]
* if you want to check if the Node is actually treated as active in the scene.
* @zh
* 当前节点的自身激活状态。
* 值得注意的是,一个节点的父节点如果不被激活,那么即使它自身设为激活,它仍然无法激活。
- * 如果你想检查节点在场景中实际的激活状态可以使用 {{#crossLink "Node/activeInHierarchy:property"}}{{/crossLink}}。
+ * 如果你想检查节点在场景中实际的激活状态可以使用 [[activeInHierarchy]]
* @property active
* @type {Boolean}
* @default true
@@ -216,6 +216,7 @@ export class BaseNode extends CCObject implements IBaseNode, ISchedulable {
* @example
* ```
* cc.log("activeInHierarchy: " + node.activeInHierarchy);
+ * ```
*/
@property
get activeInHierarchy () {
diff --git a/cocos/core/scene-graph/node-event-processor.ts b/cocos/core/scene-graph/node-event-processor.ts
index fa27dda43d..22915f20b9 100644
--- a/cocos/core/scene-graph/node-event-processor.ts
+++ b/cocos/core/scene-graph/node-event-processor.ts
@@ -386,7 +386,7 @@ export class NodeEventProcessor {
* 鼠标或触摸事件会被系统调用 dispatchEvent 方法触发,触发的过程包含三个阶段:
* 1. 捕获阶段:派发事件给捕获目标(通过 `getCapturingTargets` 获取),比如,节点树中注册了捕获阶段的父节点,从根节点开始派发直到目标节点。
* 2. 目标阶段:派发给目标节点的监听器。
- * 3. 冒泡阶段:派发事件给冒泡目标(通过 `getBubblingTargets` 获取),比如,节点树中注册了冒泡阶段的父节点,从目标节点开始派发知道根节点。
+ * 3. 冒泡阶段:派发事件给冒泡目标(通过 `getBubblingTargets` 获取),比如,节点树中注册了冒泡阶段的父节点,从目标节点开始派发直到根节点。
* 同时您可以将事件派发到父节点或者通过调用 stopPropagation 拦截它。
* 推荐使用这种方式来监听节点上的触摸或鼠标事件,请不要在节点上直接使用 cc.eventManager。
* 你也可以注册自定义事件到节点上,并通过 emit 方法触发此类事件,对于这类事件,不会发生捕获冒泡阶段,只会直接派发给注册在该节点上的监听器。
diff --git a/cocos/core/scene-graph/private-node.ts b/cocos/core/scene-graph/private-node.ts
index 04010389e6..d246187b93 100644
--- a/cocos/core/scene-graph/private-node.ts
+++ b/cocos/core/scene-graph/private-node.ts
@@ -38,7 +38,7 @@ const HideInHierarchy = CCObject.Flags.HideInHierarchy;
/**
* @en
- * Class of private entities in Cocos Creator scenes.
+ * Class of private entities in Cocos Creator 3d scenes.
* The PrivateNode is hidden in editor, and completely transparent to users.
* It's normally used as Node's private content created by components in parent node.
* So in theory private nodes are not children, they are part of the parent node.
@@ -48,7 +48,7 @@ const HideInHierarchy = CCObject.Flags.HideInHierarchy;
* In this way, they can be easily kept inside the bounding box.
* Currently, it's used by RichText component and TileMap component.
* @zh
- * Cocos Creator 场景中的私有节点类。
+ * Cocos Creator 3d场景中的私有节点类。
* 私有节点在编辑器中不可见,对用户透明。
* 通常私有节点是被一些特殊的组件创建出来作为父节点的一部分而存在的,理论上来说,它们不是子节点,而是父节点的组成部分。
* 私有节点有两个非常重要的特性:
diff --git a/cocos/core/splash-image.ts b/cocos/core/splash-image.ts
index 598cce4f99..5b97b69c05 100644
--- a/cocos/core/splash-image.ts
+++ b/cocos/core/splash-image.ts
@@ -1,3 +1,7 @@
+/**
+ * @hidden
+ */
+
import { GFXDevice } from "./gfx/device";
import { GFXCommandBuffer } from "./gfx/command-buffer";
import { GFXCommandBufferType, GFXBufferUsageBit, GFXClearFlag, IGFXRect, GFXTextureType, GFXTextureUsageBit, GFXFormat, GFXTextureViewType, GFXMemoryUsageBit, GFXBufferTextureCopy } from "./gfx/define";
diff --git a/cocos/core/utils/interfaces.ts b/cocos/core/utils/interfaces.ts
index cf65787685..387807989c 100644
--- a/cocos/core/utils/interfaces.ts
+++ b/cocos/core/utils/interfaces.ts
@@ -101,12 +101,12 @@ export interface IBaseNode {
* @en
* The local active state of this node.
* Note that a Node may be inactive because a parent is not active, even if this returns true.
- * Use {{#crossLink "Node/activeInHierarchy:property"}}{{/crossLink}}
+ * Use [[activeInHierarchy]]
* if you want to check if the Node is actually treated as active in the scene.
* @zh
* 当前节点的自身激活状态。
* 值得注意的是,一个节点的父节点如果不被激活,那么即使它自身设为激活,它仍然无法激活。
- * 如果你想检查节点在场景中实际的激活状态可以使用 {{#crossLink "Node/activeInHierarchy:property"}}{{/crossLink}}。
+ * 如果你想检查节点在场景中实际的激活状态可以使用 [[activeInHierarchy]]
* @property active
* @type {Boolean}
* @default true
diff --git a/cocos/core/utils/js-typed.ts b/cocos/core/utils/js-typed.ts
index 5523f16fc8..492eb294b7 100644
--- a/cocos/core/utils/js-typed.ts
+++ b/cocos/core/utils/js-typed.ts
@@ -342,7 +342,7 @@ export function mixin (object?: any, ...sources: any[]) {
/**
* Derive the class from the supplied base class.
* Both classes are just native javascript constructors, not created by cc.Class, so
- * usually you will want to inherit using {{#crossLink "cc/Class:method"}}cc.Class {{/crossLink}} instead.
+ * usually you will want to inherit using [[Class]] instead.
* @param base The baseclass to inherit.
* @return The result class.
*/
diff --git a/cocos/particle/particle-system-component.ts b/cocos/particle/particle-system-component.ts
index c0c60ccee0..337b3a2069 100644
--- a/cocos/particle/particle-system-component.ts
+++ b/cocos/particle/particle-system-component.ts
@@ -499,7 +499,7 @@ export class ParticleSystemComponent extends RenderableComponent {
}
/**
- * @zh 获取当前。
+ * @zh 获取当前粒子数量
*/
public getParticleCount () {
return this.renderer!.getParticleCount();
From 5d9c5e3b0925dfbaf5a95cdaa5d3be912cc2a78d Mon Sep 17 00:00:00 2001
From: zxg0622 <247274249@qq.com>
Date: Sun, 29 Sep 2019 11:44:52 +0800
Subject: [PATCH 07/22] add particle 3d scale/rotate in inspector (#5478)
* add particle 3d scale/rotate in inspector
* fix type error
---
cocos/particle/particle-system-component.ts | 80 ++++++++++++++++++---
1 file changed, 72 insertions(+), 8 deletions(-)
diff --git a/cocos/particle/particle-system-component.ts b/cocos/particle/particle-system-component.ts
index 337b3a2069..615ff180d5 100644
--- a/cocos/particle/particle-system-component.ts
+++ b/cocos/particle/particle-system-component.ts
@@ -70,6 +70,21 @@ export class ParticleSystemComponent extends RenderableComponent {
})
public scaleSpace = Space.Local;
+ @property({
+ displayOrder: 10,
+ })
+ public startSize3D = false;
+
+ /**
+ * @zh 粒子初始大小。
+ */
+ @property({
+ type: CurveRange,
+ displayOrder: 10,
+ formerlySerializedAs: 'startSize',
+ })
+ public startSizeX = new CurveRange();
+
/**
* @zh 粒子初始大小。
*/
@@ -77,7 +92,16 @@ export class ParticleSystemComponent extends RenderableComponent {
type: CurveRange,
displayOrder: 10,
})
- public startSize = new CurveRange();
+ public startSizeY = new CurveRange();
+
+ /**
+ * @zh 粒子初始大小。
+ */
+ @property({
+ type: CurveRange,
+ displayOrder: 10,
+ })
+ public startSizeZ = new CurveRange();
/**
* @zh 粒子初始速度。
@@ -89,6 +113,11 @@ export class ParticleSystemComponent extends RenderableComponent {
})
public startSpeed = new CurveRange();
+ @property({
+ displayOrder:12,
+ })
+ public startRotation3D = false;
+
/**
* @zh 粒子初始旋转角度。
*/
@@ -98,7 +127,30 @@ export class ParticleSystemComponent extends RenderableComponent {
radian: true,
displayOrder: 12,
})
- public startRotation = new CurveRange();
+ public startRotationX = new CurveRange();
+
+ /**
+ * @zh 粒子初始旋转角度。
+ */
+ @property({
+ type: CurveRange,
+ range: [-1, 1],
+ radian: true,
+ displayOrder: 12,
+ })
+ public startRotationY = new CurveRange();
+
+ /**
+ * @zh 粒子初始旋转角度。
+ */
+ @property({
+ type: CurveRange,
+ range: [-1, 1],
+ radian: true,
+ displayOrder: 12,
+ formerlySerializedAs: 'startRotation',
+ })
+ public startRotationZ = new CurveRange();
/**
* @zh 粒子系统开始运行后,延迟粒子发射的时间。
@@ -365,7 +417,7 @@ export class ParticleSystemComponent extends RenderableComponent {
this.rateOverTime.constant = 10;
this.startLifetime.constant = 5;
- this.startSize.constant = 1;
+ this.startSizeX.constant = 1;
this.startSpeed.constant = 5;
// internal status
@@ -604,12 +656,24 @@ export class ParticleSystemComponent extends RenderableComponent {
break;
}
Vec3.copy(particle.ultimateVelocity, particle.velocity);
- // apply startRotation. now 2D only.
- Vec3.set(particle.rotation, 0, 0, this.startRotation.evaluate(this._time / this.duration, rand)!);
+ // apply startRotation.
+ if (this.startRotation3D) {
+ Vec3.set(particle.rotation, this.startRotationX.evaluate(this._time / this.duration, rand)!,
+ this.startRotationY.evaluate(this._time / this.duration, rand)!,
+ this.startRotationZ.evaluate(this._time / this.duration, rand)!);
+ } else {
+ Vec3.set(particle.rotation, 0, 0, this.startRotationZ.evaluate(this._time / this.duration, rand)!);
+ }
- // apply startSize. now 2D only.
- Vec3.set(particle.startSize, this.startSize.evaluate(this._time / this.duration, rand)!, 1, 1);
- particle.startSize.y = particle.startSize.x;
+ // apply startSize.
+ if (this.startSize3D) {
+ Vec3.set(particle.startSize, this.startSizeX.evaluate(this._time / this.duration, rand)!,
+ this.startSizeY.evaluate(this._time / this.duration, rand)!,
+ this.startSizeZ.evaluate(this._time / this.duration, rand)!);
+ } else {
+ Vec3.set(particle.startSize, this.startSizeX.evaluate(this._time / this.duration, rand)!, 1, 1);
+ particle.startSize.y = particle.startSize.x;
+ }
Vec3.copy(particle.size, particle.startSize);
// apply startColor.
From 1e5248286adf48a214b3d503f3e7768eca77592b Mon Sep 17 00:00:00 2001
From: zxg0622 <247274249@qq.com>
Date: Sun, 29 Sep 2019 15:36:25 +0800
Subject: [PATCH 08/22] sync emitfrom based on shapetype (#5487)
---
cocos/particle/emitter/shape-module.ts | 32 +++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/cocos/particle/emitter/shape-module.ts b/cocos/particle/emitter/shape-module.ts
index 6c4647a02e..a81917097b 100644
--- a/cocos/particle/emitter/shape-module.ts
+++ b/cocos/particle/emitter/shape-module.ts
@@ -104,8 +104,38 @@ export default class ShapeModule {
@property({
type: ShapeType,
displayOrder: 1,
+ formerlySerializedAs: 'shapeType',
})
- public shapeType = ShapeType.Cone;
+ public _shapeType = ShapeType.Cone;
+
+ @property({
+ type: ShapeType,
+ })
+ public get shapeType () {
+ return this._shapeType;
+ }
+
+ public set shapeType (val) {
+ this._shapeType = val;
+ switch (this._shapeType) {
+ case ShapeType.Box:
+ if (this.emitFrom === EmitLocation.Base) {
+ this.emitFrom = EmitLocation.Volume;
+ }
+ break;
+ case ShapeType.Cone:
+ if (this.emitFrom === EmitLocation.Edge) {
+ this.emitFrom = EmitLocation.Base;
+ }
+ break;
+ case ShapeType.Sphere:
+ case ShapeType.Hemisphere:
+ if (this.emitFrom === EmitLocation.Base || this.emitFrom === EmitLocation.Edge) {
+ this.emitFrom = EmitLocation.Volume;
+ }
+ break;
+ }
+ }
/**
* @zh 粒子从发射器哪个部位发射 [[EmitLocation]]。
From e6a54acd0c3bcecde76f5274515915aacdffb19b Mon Sep 17 00:00:00 2001
From: Santy-Wang
Date: Sun, 29 Sep 2019 19:34:48 +0800
Subject: [PATCH 09/22] update regexp to match uuid (#5488)
---
cocos/core/load-pipeline/md5-pipe.ts | 2 +-
cocos/core/load-pipeline/subpackage-pipe.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cocos/core/load-pipeline/md5-pipe.ts b/cocos/core/load-pipeline/md5-pipe.ts
index 39b5bf7611..380b509445 100644
--- a/cocos/core/load-pipeline/md5-pipe.ts
+++ b/cocos/core/load-pipeline/md5-pipe.ts
@@ -32,7 +32,7 @@ import { Pipeline, IPipe } from './pipeline';
const ID = 'MD5Pipe';
const ExtnameRegex = /(\.[^.\n\\/]*)$/;
-const UuidRegex = /([^/\\]*)\.[^\.]*$/;
+const UuidRegex = /.*[/\\][0-9a-fA-F]{2}[/\\]([0-9a-fA-F-@]{8,}).*/;
function getUuidFromURL (url) {
let matches = url.match(UuidRegex);
diff --git a/cocos/core/load-pipeline/subpackage-pipe.ts b/cocos/core/load-pipeline/subpackage-pipe.ts
index 7988475ee0..1c3087bc2f 100644
--- a/cocos/core/load-pipeline/subpackage-pipe.ts
+++ b/cocos/core/load-pipeline/subpackage-pipe.ts
@@ -27,7 +27,7 @@ import decodeUuid from '../utils/decode-uuid';
import { Pipeline, IPipe } from './pipeline';
const ID = 'SubPackPipe';
-const UuidRegex = /([^/\\]*)\.[^\.]*$/;
+const UuidRegex = /.*[/\\][0-9a-fA-F]{2}[/\\]([0-9a-fA-F-@]{8,}).*/;
function getUuidFromURL(url) {
let matches = url.match(UuidRegex);
From 3badd93ad52bb9fd741064e7b7190e6ed880683e Mon Sep 17 00:00:00 2001
From: JoneLau <32630749+JoneLau@users.noreply.github.com>
Date: Wed, 9 Oct 2019 17:28:26 +0800
Subject: [PATCH 10/22] fix sliced to simple no show bug (#5500)
---
cocos/core/components/ui-base/ui-render-component.ts | 2 --
cocos/ui/components/sprite-component.ts | 9 +++++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/cocos/core/components/ui-base/ui-render-component.ts b/cocos/core/components/ui-base/ui-render-component.ts
index 239d031718..7d9ca8b51d 100644
--- a/cocos/core/components/ui-base/ui-render-component.ts
+++ b/cocos/core/components/ui-base/ui-render-component.ts
@@ -236,8 +236,6 @@ export class UIRenderComponent extends UIComponent {
if (this._flushAssembler){
this._flushAssembler();
}
-
- this._updateColor();
}
public onEnable () {
diff --git a/cocos/ui/components/sprite-component.ts b/cocos/ui/components/sprite-component.ts
index 3f1b9d5d39..b886f75a01 100644
--- a/cocos/ui/components/sprite-component.ts
+++ b/cocos/ui/components/sprite-component.ts
@@ -280,7 +280,9 @@ export class SpriteComponent extends UIRenderComponent {
* sprite.fillStart = 0.5;
* ```
*/
- @property
+ @property({
+ range: [0, 1, 0.1]
+ })
get fillStart () {
return this._fillStart;
}
@@ -303,7 +305,9 @@ export class SpriteComponent extends UIRenderComponent {
* sprite.fillRange = 1;
* ```
*/
- @property
+ @property({
+ range: [0, 1, 0.1]
+ })
get fillRange () {
return this._fillRange;
}
@@ -486,6 +490,7 @@ export class SpriteComponent extends UIRenderComponent {
this._renderData = this._assembler.createData(this);
this._renderData!.material = this._material;
this.markForUpdateRenderData();
+ this._updateColor();
}
}
}
From edae7c596c93f2cd058fe5684591ba9565a99151 Mon Sep 17 00:00:00 2001
From: zxg0622 <247274249@qq.com>
Date: Wed, 9 Oct 2019 17:29:38 +0800
Subject: [PATCH 11/22] fix particle destroy attatched to uimodel (#5504)
---
cocos/core/3d/framework/model-component.ts | 2 +-
cocos/particle/particle-system-component.ts | 2 +-
cocos/particle/renderer/particle-system-renderer.ts | 6 ++++--
cocos/particle/renderer/trail.ts | 2 +-
cocos/ui/components/ui-model-component.ts | 4 +++-
5 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/cocos/core/3d/framework/model-component.ts b/cocos/core/3d/framework/model-component.ts
index 022bb9ba2e..5634b590a4 100644
--- a/cocos/core/3d/framework/model-component.ts
+++ b/cocos/core/3d/framework/model-component.ts
@@ -194,7 +194,7 @@ export class ModelComponent extends RenderableComponent {
public onDestroy () {
if (this._model) {
- this._getRenderScene().destroyModel(this._model);
+ this._model.scene.destroyModel(this._model);
this._model = null;
}
}
diff --git a/cocos/particle/particle-system-component.ts b/cocos/particle/particle-system-component.ts
index 615ff180d5..854756787c 100644
--- a/cocos/particle/particle-system-component.ts
+++ b/cocos/particle/particle-system-component.ts
@@ -466,7 +466,7 @@ export class ParticleSystemComponent extends RenderableComponent {
if (this.isValid) {
const r = this.renderer as any;
if (r && r._model) {
- r._model.destroy();
+ r._model.scene.destroyModel(r._model);
r._model = null;
r.onEnable();
r._updateModel();
diff --git a/cocos/particle/renderer/particle-system-renderer.ts b/cocos/particle/renderer/particle-system-renderer.ts
index 2c19ad8f5d..7b32ef14d0 100644
--- a/cocos/particle/renderer/particle-system-renderer.ts
+++ b/cocos/particle/renderer/particle-system-renderer.ts
@@ -258,8 +258,10 @@ export default class ParticleSystemRenderer {
}
public onDestroy () {
- this._particleSystem._getRenderScene().destroyModel(this._model!);
- this._model = null;
+ if (this._model) {
+ this._model.scene.destroyModel(this._model);
+ this._model = null;
+ }
}
public clear () {
diff --git a/cocos/particle/renderer/trail.ts b/cocos/particle/renderer/trail.ts
index d9f1bf1724..628fa99663 100644
--- a/cocos/particle/renderer/trail.ts
+++ b/cocos/particle/renderer/trail.ts
@@ -357,7 +357,7 @@ export default class TrailModule {
public destroy () {
if (this._trailModel) {
- this._particleSystem._getRenderScene().destroyModel(this._trailModel!);
+ this._trailModel.scene.destroyModel(this._trailModel);
this._trailModel = null;
}
if (this._trailSegments) {
diff --git a/cocos/ui/components/ui-model-component.ts b/cocos/ui/components/ui-model-component.ts
index 19d1b526c1..a031887649 100644
--- a/cocos/ui/components/ui-model-component.ts
+++ b/cocos/ui/components/ui-model-component.ts
@@ -70,7 +70,9 @@ export class UIModelComponent extends UIComponent {
}
this._modelComponent._sceneGetter = null;
- this._modelComponent.recreateModel();
+ if (cc.isValid(this.node, true)) {
+ this._modelComponent.recreateModel();
+ }
}
public updateAssembler (render: UI) {
From 2edfab3b822dbec17985eae8585d44db5e5d38b9 Mon Sep 17 00:00:00 2001
From: SijieWang
Date: Wed, 9 Oct 2019 17:48:11 +0800
Subject: [PATCH 12/22] Update version (#5503)
* Update version
* remove rc
---
predefine.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/predefine.ts b/predefine.ts
index ce8388a93f..0ccb2808bd 100644
--- a/predefine.ts
+++ b/predefine.ts
@@ -213,7 +213,7 @@ if (CC_DEV) {
* If you post a bug to forum, please attach this flag.
* @property {String} ENGINE_VERSION
*/
-const engineVersion = '1.0.0 beta';
+const engineVersion = '1.0.0';
_global['CocosEngine'] = cc.ENGINE_VERSION = engineVersion;
export default cc;
From be5a8333bc719c5250ef945f1682abca676e5877 Mon Sep 17 00:00:00 2001
From: JoneLau <32630749+JoneLau@users.noreply.github.com>
Date: Wed, 9 Oct 2019 22:46:42 +0800
Subject: [PATCH 13/22] fix clear graphics no effect bug (#5496)
---
cocos/core/components/ui-base/ui-component.ts | 10 +++++++++-
cocos/core/components/ui-base/ui-render-component.ts | 10 +++++++++-
cocos/ui/components/graphics-component.ts | 12 ++++++------
cocos/ui/components/mask-component.ts | 5 +++--
4 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/cocos/core/components/ui-base/ui-component.ts b/cocos/core/components/ui-base/ui-component.ts
index f6503e7109..8644a53f53 100644
--- a/cocos/core/components/ui-base/ui-component.ts
+++ b/cocos/core/components/ui-base/ui-component.ts
@@ -84,18 +84,26 @@ export class UIComponent extends Component {
protected _followScreen: CanvasComponent | null = null;
private _lastParent: INode | null = null;
+
+ public __preload () {
+ this.node._uiComp = this;
+ }
+
public onEnable () {
this._lastParent = this.node.parent;
this._updateVisibility();
+
if (this._lastParent) {
this.node.on(SystemEventType.CHILD_REMOVED, this._parentChanged, this);
}
- this.node._uiComp = this;
this._sortSiblings();
}
public onDisable () {
this._cancelEventFromParent();
+ }
+
+ public onDestroy () {
if (this.node._uiComp === this) {
this.node._uiComp = null;
}
diff --git a/cocos/core/components/ui-base/ui-render-component.ts b/cocos/core/components/ui-base/ui-render-component.ts
index 7d9ca8b51d..49f2f5fa24 100644
--- a/cocos/core/components/ui-base/ui-render-component.ts
+++ b/cocos/core/components/ui-base/ui-render-component.ts
@@ -196,6 +196,11 @@ export class UIRenderComponent extends UIComponent {
return this._renderData;
}
+ // Render data can be submitted even if it is not on the node tree
+ set simulate (value) {
+ this._simulate = value;
+ }
+
public static BlendState = GFXBlendFactor;
public static Assembler: IAssemblerManager | null = null;
public static PostAssembler: IAssemblerManager | null = null;
@@ -230,8 +235,10 @@ export class UIRenderComponent extends UIComponent {
depthStencilState: {},
rasterizerState: {},
};
+ protected _simulate = false;
public __preload (){
+ super.__preload();
this._instanceMaterial();
if (this._flushAssembler){
this._flushAssembler();
@@ -253,6 +260,7 @@ export class UIRenderComponent extends UIComponent {
}
public onDestroy () {
+ super.onDestroy();
this.destroyRenderData();
if (this._material){
this._material.destroy();
@@ -337,7 +345,7 @@ export class UIRenderComponent extends UIComponent {
}
protected _canRender () {
- return this.material !== null && this.enabled && this.enabledInHierarchy;
+ return this.material !== null && this.enabled && (this._simulate? true: this.enabledInHierarchy);
}
protected _postCanRender(){}
diff --git a/cocos/ui/components/graphics-component.ts b/cocos/ui/components/graphics-component.ts
index 38fb38f060..81d7ff1e86 100644
--- a/cocos/ui/components/graphics-component.ts
+++ b/cocos/ui/components/graphics-component.ts
@@ -172,17 +172,17 @@ export class GraphicsComponent extends UIRenderComponent {
public impl: Impl | null = null;
public model: Model | null = null;
@property
- private _lineWidth = 1;
+ protected _lineWidth = 1;
@property
- private _strokeColor = Color.BLACK.clone();
+ protected _strokeColor = Color.BLACK.clone();
@property
- private _lineJoin = LineJoin.MITER;
+ protected _lineJoin = LineJoin.MITER;
@property
- private _lineCap = LineCap.BUTT;
+ protected _lineCap = LineCap.BUTT;
@property
- private _fillColor = Color.WHITE.clone();
+ protected _fillColor = Color.WHITE.clone();
@property
- private _miterLimit = 10;
+ protected _miterLimit = 10;
constructor (){
super();
diff --git a/cocos/ui/components/mask-component.ts b/cocos/ui/components/mask-component.ts
index 0c88f07a26..b7b04f7fcd 100644
--- a/cocos/ui/components/mask-component.ts
+++ b/cocos/ui/components/mask-component.ts
@@ -480,7 +480,8 @@ export class MaskComponent extends UIRenderComponent {
clearGraphics.lineWidth = 0;
const color = Color.WHITE.clone();
color.a = 0;
- this._clearGraphics.fillColor = color;
+ clearGraphics.fillColor = color;
+ clearGraphics.simulate = true;
this._updateClearGraphics();
}
@@ -500,7 +501,7 @@ export class MaskComponent extends UIRenderComponent {
if (!this._clearGraphics) {
return;
}
- console.log('resolution changed');
+
const size = visibleRect;
this._clearGraphics.node.setWorldPosition(size.width / 2, size.height / 2, 0);
this._clearGraphics.clear();
From fedaa5de3a01a093eda18a570760ab3c00be8a41 Mon Sep 17 00:00:00 2001
From: Yun Hsiao Wu
Date: Thu, 10 Oct 2019 18:42:58 +0800
Subject: [PATCH 14/22] fix mip filter in GL1 (#5512)
* fix skybox
* missing default clip hint
* fix mip filter in GL1
---
cocos/core/3d/builtin/effects.ts | 18 +++++++++---------
.../animation/skeletal-animation-component.ts | 6 +++---
cocos/core/assets/material.ts | 1 -
cocos/core/assets/simple-texture.ts | 16 +++++++++++++++-
cocos/core/assets/texture-2d.ts | 1 +
cocos/core/renderer/ui/ui.ts | 5 ++---
6 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/cocos/core/3d/builtin/effects.ts b/cocos/core/3d/builtin/effects.ts
index 7a0c9a298a..3f6bf9eb1e 100644
--- a/cocos/core/3d/builtin/effects.ts
+++ b/cocos/core/3d/builtin/effects.ts
@@ -169,14 +169,14 @@ export default [
"shaders": [
{
"name": "builtin-standard|standard-vs:vert|standard-fs:frag",
- "hash": 1575787692,
+ "hash": 610821815,
"glsl3": {
- "vert": `\nprecision highp float;\nuniform CCGlobal {\n vec4 cc_time;\n vec4 cc_screenSize;\n vec4 cc_screenScale;\n vec4 cc_nativeSize;\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_exposure;\n vec4 cc_mainLitDir;\n vec4 cc_mainLitColor;\n vec4 cc_ambientSky;\n vec4 cc_ambientGround;\n};\nuniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp mat4 cc_matWorlds[10];\n};\nstruct StandardAttributes {\n vec4 position;\n vec3 normal;\n vec4 tangent;\n int index;\n};\nin vec3 a_position;\nin vec3 a_normal;\nin vec4 a_tangent;\n#if USE_BATCHING\nin float a_index;\n#endif\nvoid CCDecode (out StandardAttributes attr) {\n attr.position = vec4(a_position, 1.0);\n attr.normal = a_normal;\n attr.tangent = a_tangent;\n#if USE_BATCHING\n attr.index = int(a_index + 0.5);\n#endif\n}\n#if CC_USE_SKINNING\nin vec4 a_weights;\nin vec4 a_joints;\nuniform CCSkinningTexture {\n highp vec4 cc_jointsTextureInfo;\n};\nuniform CCSkinningAnimation {\n highp vec4 cc_jointsAnimInfo;\n};\nuniform sampler2D cc_jointsTexture;\n#if CC_USE_SKINNING == 1\n highp float decode32(highp vec4 rgba) {\n rgba = rgba * 255.0;\n highp float Sign = 1.0 - step(128.0, rgba[3]) * 2.0;\n highp float Exponent = 2.0 * mod(rgba[3], 128.0) + step(128.0, rgba[2]) - 127.0;\n highp float Mantissa = mod(rgba[2], 128.0) * 65536.0 + rgba[1] * 256.0 + rgba[0] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n#endif\n#if CC_USE_SKINNING == 1\n void getJointDQ(float i, out vec4 Qr, out vec4 Qt, out vec3 S) {\n highp float j = 12.0 * (cc_jointsAnimInfo.x * i + cc_jointsAnimInfo.y) + cc_jointsTextureInfo.z;\n highp float invSize = cc_jointsTextureInfo.y;\n highp float y = floor(j * invSize);\n highp float x = j - y * cc_jointsTextureInfo.x;\n y = (y + 0.5) * invSize;\n Qr = vec4(\n decode32(texture(cc_jointsTexture, vec2((x + 0.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 1.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 2.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 3.5) * invSize, y)))\n );\n Qt = vec4(\n decode32(texture(cc_jointsTexture, vec2((x + 4.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 5.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 6.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 7.5) * invSize, y)))\n );\n S = vec3(\n decode32(texture(cc_jointsTexture, vec2((x + 8.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 9.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 10.5) * invSize, y)))\n );\n }\n#elif CC_USE_SKINNING == 2\n void getJointDQ(float i, out vec4 Qr, out vec4 Qt, out vec3 S) {\n highp float j = 3.0 * (cc_jointsAnimInfo.x * i + cc_jointsAnimInfo.y) + cc_jointsTextureInfo.z;\n highp float invSize = cc_jointsTextureInfo.y;\n highp float y = floor(j * invSize);\n highp float x = j - y * cc_jointsTextureInfo.x;\n y = (y + 0.5) * invSize;\n Qr = texture(cc_jointsTexture, vec2((x + 0.5) * invSize, y));\n Qt = texture(cc_jointsTexture, vec2((x + 1.5) * invSize, y));\n S = texture(cc_jointsTexture, vec2((x + 2.5) * invSize, y)).xyz;\n }\n#endif\nvoid skinRTS(out vec4 R, out vec3 T, out vec3 S) {\n vec4 r, t, Qt = vec4(0.0); vec3 s;\n R = vec4(0.0); S = vec3(0.0);\n for (int i = 0; i < 4; i++) {\n float w = a_weights[i];\n getJointDQ(a_joints[i], r, t, s);\n S += s * w; R += r * w; Qt += t * w;\n }\n float invNorm = 1.0 / length(R); R *= invNorm; Qt *= invNorm;\n T = 2.0 * (R.w * Qt.xyz - Qt.w * R.xyz + cross(R.xyz, Qt.xyz));\n}\nvec3 VectorTransformQuat(vec3 v, vec4 Q) {\n return v + 2.0 * cross(Q.xyz, cross(Q.xyz, v) + Q.w * v);\n}\nvoid CCSkin(inout vec4 position) {\n vec4 R; vec3 T, S;\n skinRTS(R, T, S);\n position.xyz = VectorTransformQuat(position.xyz * S, R) + T;\n}\nvoid CCSkin(inout StandardAttributes attr) {\n vec4 R; vec3 T, S;\n skinRTS(R, T, S);\n attr.position.xyz = VectorTransformQuat(attr.position.xyz * S, R) + T;\n attr.normal = VectorTransformQuat(attr.normal, R);\n attr.tangent.xyz = VectorTransformQuat(attr.tangent.xyz, R);\n}\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n int index;\n};\nvoid CCAttrToInput (in StandardAttributes attr, out StandardVertInput In) {\n In.position = attr.position;\n In.normal = attr.normal;\n In.tangent = attr.tangent;\n In.index = attr.index;\n}\nvoid CCVertInput (out StandardVertInput In) {\n StandardAttributes attr;\n CCDecode(attr);\n #if CC_USE_SKINNING\n CCSkin(attr);\n #endif\n CCAttrToInput(attr, In);\n}\nuniform Constants {\n vec4 tilingOffset;\n vec4 albedo;\n vec4 albedoScale;\n vec4 pbrParams;\n vec4 pbrScale;\n vec4 emissive;\n vec4 emissiveScale;\n};\n#define saturate(a) clamp( a, 0.0, 1.0 )\nhighp mat4 transposeMat4(in highp mat4 mat) {\n highp vec4 i0 = mat[0];\n highp vec4 i1 = mat[1];\n highp vec4 i2 = mat[2];\n highp vec4 i3 = mat[3];\n return mat4(vec4(i0.x, i1.x, i2.x, i3.x),\n vec4(i0.y, i1.y, i2.y, i3.y),\n vec4(i0.z, i1.z, i2.z, i3.z),\n vec4(i0.w, i1.w, i2.w, i3.w));\n}\nout vec3 v_position;\nout vec3 v_normal;\n#if USE_NORMAL_MAP\n out vec3 v_tangent;\n out vec3 v_bitangent;\n#endif\n#if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n in vec2 a_texCoord;\n out vec2 v_uv;\n#endif\nvec4 vert () {\n StandardVertInput In;\n CCVertInput(In);\n #if USE_BATCHING\n mat4 matWorld = cc_matWorlds[In.index];\n mat4 matWorldIT = transposeMat4(matWorld);\n #else\n mat4 matWorld = cc_matWorld;\n mat4 matWorldIT = cc_matWorldIT;\n #endif\n vec4 pos = matWorld * In.position;\n v_position = pos.xyz;\n v_normal = normalize((matWorldIT * vec4(In.normal, 0.0)).xyz);\n #if USE_NORMAL_MAP\n v_tangent = normalize((matWorldIT * vec4(In.tangent.xyz, 0.0)).xyz);\n v_bitangent = cross(v_tangent, v_normal) * In.tangent.w;\n #endif\n #if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw;\n #endif\n return cc_matViewProj * pos;\n}\nvoid main() { gl_Position = vert(); }\n`,
- "frag": `\nprecision highp float;\nuniform CCGlobal {\n vec4 cc_time;\n vec4 cc_screenSize;\n vec4 cc_screenScale;\n vec4 cc_nativeSize;\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_exposure;\n vec4 cc_mainLitDir;\n vec4 cc_mainLitColor;\n vec4 cc_ambientSky;\n vec4 cc_ambientGround;\n};\n#if CC_USE_IBL\nuniform samplerCube cc_environment;\n#endif\n#define saturate(a) clamp( a, 0.0, 1.0 )\nhighp mat4 transposeMat4(in highp mat4 mat) {\n highp vec4 i0 = mat[0];\n highp vec4 i1 = mat[1];\n highp vec4 i2 = mat[2];\n highp vec4 i3 = mat[3];\n return mat4(vec4(i0.x, i1.x, i2.x, i3.x),\n vec4(i0.y, i1.y, i2.y, i3.y),\n vec4(i0.z, i1.z, i2.z, i3.z),\n vec4(i0.w, i1.w, i2.w, i3.w));\n}\nvec3 SRGBToLinear(vec3 gamma)\n{\n return pow(gamma, vec3(2.2));\n}\nvec3 LinearToSRGB(vec3 linear)\n{\n return pow(linear, vec3(0.454545));\n}\nuniform CCForwardLight {\n highp vec4 cc_sphereLitPos[2];\n vec4 cc_sphereLitSizeRange[2];\n vec4 cc_sphereLitColor[2];\n highp vec4 cc_spotLitPos[2];\n vec4 cc_spotLitSizeRangeAngle[2];\n vec4 cc_spotLitDir[2];\n vec4 cc_spotLitColor[2];\n};\nfloat SmoothDistAtt2(float distSqr, float invSqrAttRadius) {\n float factor = distSqr * invSqrAttRadius;\n float factor2 = factor * factor;\n float factor3 = factor2 * factor2;\n float smoothFactor = clamp(1.0 - factor3 * factor3, 0.0, 1.0);\n return smoothFactor * smoothFactor;\n}\nfloat SmoothDistAtt(float distSqr, float invSqrAttRadius) {\n float factor = distSqr * invSqrAttRadius;\n float smoothFactor = clamp(1.0 - factor * factor, 0.0, 1.0);\n return smoothFactor * smoothFactor;\n}\nfloat GetDistAtt(float distSqr, float invSqrAttRadius) {\n float attenuation = 1.0 / max(distSqr, 0.01*0.01);\n attenuation *= SmoothDistAtt(distSqr , invSqrAttRadius);\n return attenuation;\n}\nfloat GetAngleAtt(vec3 L, vec3 litDir, float litAngleScale, float litAngleOffset) {\n float cd = dot(litDir, L);\n float attenuation = clamp(cd * litAngleScale + litAngleOffset, 0.0, 1.0);\n return (attenuation * attenuation);\n}\nfloat GGXMobile(float roughness, float NoH, vec3 H, vec3 N) {\n vec3 NxH = cross(N, H);\n float OneMinusNoHSqr = dot(NxH, NxH);\n float a = roughness * roughness;\n float n = NoH * a;\n float p = a / (OneMinusNoHSqr + n * n);\n return p * p;\n}\nfloat CalcSpecular(float roughness, float NoH, vec3 H, vec3 N) {\n return (roughness*0.25 + 0.25) * GGXMobile(roughness, NoH, H, N);\n}\nvec3 BRDFApprox(vec3 specular, float roughness, float NoV) {\n const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);\n const vec4 c1 = vec4(1.0, 0.0425, 1.04, -0.04);\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( -9.28 * NoV ) ) * r.x + r.y;\n vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n AB.y *= clamp(50.0 * specular.g, 0.0, 1.0);\n return specular * AB.x + AB.y;\n}\nvec3 CalcDynamicLighting(vec3 worldPos, vec3 N, vec3 V, vec3 diffuse, vec3 specular, float roughness) {\n vec3 lighting = vec3(0.0);\n vec3 diffuseContrib = diffuse / 3.14159265359;\n for (int i = 0; i < 2; i++) {\n vec3 PLU = cc_sphereLitPos[i].xyz - worldPos;\n vec3 PL = normalize(PLU);\n vec3 PH = normalize(PL + V);\n float PNL = max(dot(N, PL), 0.001);\n float PNH = max(dot(N, PH), 0.0);\n float distSqr = dot(PLU, PLU);\n float litRadius = cc_sphereLitSizeRange[i].x;\n float litRadiusSqr = litRadius * litRadius;\n float illum = 3.14159265359 * (litRadiusSqr / max(litRadiusSqr , distSqr));\n float attRadiusSqrInv = 1.0 / max(cc_sphereLitSizeRange[i].y, 0.01);\n attRadiusSqrInv *= attRadiusSqrInv;\n float att = GetDistAtt(distSqr, attRadiusSqrInv);\n vec3 lspec = specular * CalcSpecular(roughness, PNH, PH, N);\n lighting += PNL * cc_sphereLitColor[i].rgb * cc_sphereLitColor[i].w * illum * att * (diffuseContrib + lspec);\n }\n for (int i = 0; i < 2; i++) {\n vec3 SLU = cc_spotLitPos[i].xyz - worldPos;\n vec3 SL = normalize(SLU);\n vec3 SH = normalize(SL + V);\n float SNL = max(dot(N, SL), 0.001);\n float SNH = max(dot(N, SH), 0.0);\n float distSqr = dot(SLU, SLU);\n float litRadius = cc_spotLitSizeRangeAngle[i].x;\n float litRadiusSqr = litRadius * litRadius;\n float illum = 3.14159265359 * (litRadiusSqr / max(litRadiusSqr , distSqr));\n float attRadiusSqrInv = 1.0 / max(cc_spotLitSizeRangeAngle[i].y, 0.01);\n attRadiusSqrInv *= attRadiusSqrInv;\n float cosInner = max(dot(-cc_spotLitDir[i].xyz, SL), 0.01);\n float cosOuter = cc_spotLitSizeRangeAngle[i].z;\n float litAngleScale = 1.0 / max(0.001, cosInner - cosOuter);\n float litAngleOffset = -cosOuter * litAngleScale;\n float att = GetDistAtt(distSqr, attRadiusSqrInv);\n att *= GetAngleAtt(SL, -cc_spotLitDir[i].xyz, litAngleScale, litAngleOffset);\n vec3 lspec = specular * CalcSpecular(roughness, SNH, SH, N);\n lighting += SNL * cc_spotLitColor[i].rgb * cc_spotLitColor[i].w * illum * att * (diffuseContrib + lspec);\n }\n return lighting;\n}\nstruct StandardSurface {\n vec4 albedo;\n vec3 position;\n vec3 normal;\n vec3 emissive;\n float roughness;\n float metallic;\n float occlusion;\n};\nvec4 CCStandardShading (StandardSurface s) {\n vec3 diffuse = s.albedo.rgb * (1.0 - s.metallic);\n vec3 specular = mix(vec3(0.04), s.albedo.rgb, s.metallic);\n vec3 N = normalize(s.normal);\n vec3 V = normalize(cc_cameraPos.xyz - s.position);\n vec3 L = normalize(-cc_mainLitDir.xyz);\n vec3 H = normalize(L+V);\n float NV = max(abs(dot(N, V)), 0.001);\n float NL = max(dot(N, L), 0.001);\n float NH = max(dot(N, H), 0.0);\n specular = BRDFApprox(specular, s.roughness, NV);\n vec3 diffuseContrib = diffuse / 3.14159265359;\n vec3 specularContrib = specular * CalcSpecular(s.roughness, NH, H, N);\n vec3 finalColor = NL * cc_mainLitColor.rgb * cc_mainLitColor.w * (diffuseContrib + specularContrib);\n finalColor += CalcDynamicLighting(s.position, N, V, diffuse, specular, s.roughness);\n float fAmb = 0.5 - N.y * 0.5;\n vec3 ambDiff = mix(cc_ambientSky.rgb, cc_ambientGround.rgb, fAmb) * cc_ambientSky.w;\n finalColor += (ambDiff.rgb * diffuse);\n #if CC_USE_IBL\n vec3 R = normalize(reflect(-V, N));\n vec3 env = SRGBToLinear(texture(cc_environment, R).rgb) * cc_ambientSky.w;\n finalColor += env * specular;\n #endif\n finalColor = finalColor * s.occlusion;\n #if CC_USE_HDR\n s.emissive *= cc_exposure.w;\n #endif\n finalColor += s.emissive;\n return vec4(finalColor, s.albedo.a);\n}\nvec4 CCFragOutput (vec4 color) {\n #if !CC_USE_HDR\n color.rgb = LinearToSRGB(color.rgb);\n #endif\n return color;\n}\nuniform Constants {\n vec4 tilingOffset;\n vec4 albedo;\n vec4 albedoScale;\n vec4 pbrParams;\n vec4 pbrScale;\n vec4 emissive;\n vec4 emissiveScale;\n};\nin vec3 v_position;\n#if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n in vec2 v_uv;\n#endif\nin vec3 v_normal;\n#if USE_NORMAL_MAP\n in vec3 v_tangent;\n in vec3 v_bitangent;\n#endif\n#if USE_ALBEDO_MAP\n uniform sampler2D albedoMap;\n#endif\n#if USE_NORMAL_MAP\n uniform sampler2D normalMap;\n#endif\n#if USE_PBR_MAP\n uniform sampler2D pbrMap;\n#endif\n#if USE_METALLIC_ROUGHNESS_MAP\n uniform sampler2D metallicRoughnessMap;\n#endif\n#if USE_OCCLUSION_MAP\n uniform sampler2D occlusionMap;\n#endif\n#if USE_EMISSIVE_MAP\n uniform sampler2D emissiveMap;\n#endif\n#if USE_ALPHA_TEST\n#endif\nvoid surf (out StandardSurface s) {\n vec4 baseColor = albedo;\n #if USE_ALBEDO_MAP\n vec4 texColor = texture(albedoMap, v_uv);\n texColor.rgb = SRGBToLinear(texColor.rgb);\n baseColor *= texColor;\n #endif\n s.albedo = baseColor;\n s.albedo.rgb *= albedoScale.xyz;\n #if USE_ALPHA_TEST\n if (s.albedo.ALPHA_TEST_CHANNEL < albedoScale.w) discard;\n #endif\n s.normal = v_normal;\n #if USE_NORMAL_MAP\n vec3 nmmp = texture(normalMap, v_uv).xyz - vec3(0.5);\n s.normal =\n (nmmp.x * pbrScale.w) * normalize(v_tangent) +\n (nmmp.y * pbrScale.w) * normalize(v_bitangent) +\n nmmp.z * normalize(s.normal);\n #endif\n s.position = v_position;\n vec4 pbr = pbrParams;\n #if USE_PBR_MAP\n pbr = texture(pbrMap, v_uv);\n #endif\n #if USE_METALLIC_ROUGHNESS_MAP\n vec4 metallicRoughness = texture(metallicRoughnessMap, v_uv);\n pbr.METALLIC_CHANNEL = metallicRoughness.METALLIC_CHANNEL;\n pbr.ROUGHNESS_CHANNEL = metallicRoughness.ROUGHNESS_CHANNEL;\n #endif\n #if USE_OCCLUSION_MAP\n pbr.OCCLUSION_CHANNEL = texture(occlusionMap, v_uv).OCCLUSION_CHANNEL;\n #endif\n pbr *= pbrScale;\n s.roughness = clamp(pbr.ROUGHNESS_CHANNEL, 0.04, 1.0);\n s.metallic = clamp(pbr.METALLIC_CHANNEL, 0.0, 0.96);\n s.occlusion = pbr.OCCLUSION_CHANNEL;\n s.emissive = emissive.rgb * emissiveScale.xyz;\n #if USE_EMISSIVE_MAP\n s.emissive *= SRGBToLinear(texture(emissiveMap, v_uv).rgb);\n #endif\n}\nvec4 frag () {\n StandardSurface s; surf(s);\n vec4 color = CCStandardShading(s);\n return CCFragOutput(color);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }\n`
+ "vert": `\nprecision highp float;\nuniform CCGlobal {\n vec4 cc_time;\n vec4 cc_screenSize;\n vec4 cc_screenScale;\n vec4 cc_nativeSize;\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_exposure;\n vec4 cc_mainLitDir;\n vec4 cc_mainLitColor;\n vec4 cc_ambientSky;\n vec4 cc_ambientGround;\n};\nuniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp mat4 cc_matWorlds[10];\n};\nstruct StandardAttributes {\n vec4 position;\n vec3 normal;\n vec4 tangent;\n int index;\n};\nin vec3 a_position;\nin vec3 a_normal;\nin vec4 a_tangent;\n#if USE_BATCHING\nin float a_index;\n#endif\nvoid CCDecode (out StandardAttributes attr) {\n attr.position = vec4(a_position, 1.0);\n attr.normal = a_normal;\n attr.tangent = a_tangent;\n#if USE_BATCHING\n attr.index = int(a_index + 0.5);\n#endif\n}\n#if CC_USE_SKINNING\nin vec4 a_weights;\nin vec4 a_joints;\nuniform CCSkinningTexture {\n highp vec4 cc_jointsTextureInfo;\n};\nuniform CCSkinningAnimation {\n highp vec4 cc_jointsAnimInfo;\n};\nuniform sampler2D cc_jointsTexture;\n#if CC_USE_SKINNING == 1\n highp float decode32(highp vec4 rgba) {\n rgba = rgba * 255.0;\n highp float Sign = 1.0 - step(128.0, rgba[3]) * 2.0;\n highp float Exponent = 2.0 * mod(rgba[3], 128.0) + step(128.0, rgba[2]) - 127.0;\n highp float Mantissa = mod(rgba[2], 128.0) * 65536.0 + rgba[1] * 256.0 + rgba[0] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n#endif\n#if CC_USE_SKINNING == 1\n void getJointDQ(float i, out vec4 Qr, out vec4 Qt, out vec3 S) {\n highp float j = 12.0 * (cc_jointsAnimInfo.x * i + cc_jointsAnimInfo.y) + cc_jointsTextureInfo.z;\n highp float invSize = cc_jointsTextureInfo.y;\n highp float y = floor(j * invSize);\n highp float x = j - y * cc_jointsTextureInfo.x;\n y = (y + 0.5) * invSize;\n Qr = vec4(\n decode32(texture(cc_jointsTexture, vec2((x + 0.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 1.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 2.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 3.5) * invSize, y)))\n );\n Qt = vec4(\n decode32(texture(cc_jointsTexture, vec2((x + 4.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 5.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 6.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 7.5) * invSize, y)))\n );\n S = vec3(\n decode32(texture(cc_jointsTexture, vec2((x + 8.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 9.5) * invSize, y))),\n decode32(texture(cc_jointsTexture, vec2((x + 10.5) * invSize, y)))\n );\n }\n#elif CC_USE_SKINNING == 2\n void getJointDQ(float i, out vec4 Qr, out vec4 Qt, out vec3 S) {\n highp float j = 3.0 * (cc_jointsAnimInfo.x * i + cc_jointsAnimInfo.y) + cc_jointsTextureInfo.z;\n highp float invSize = cc_jointsTextureInfo.y;\n highp float y = floor(j * invSize);\n highp float x = j - y * cc_jointsTextureInfo.x;\n y = (y + 0.5) * invSize;\n Qr = texture(cc_jointsTexture, vec2((x + 0.5) * invSize, y));\n Qt = texture(cc_jointsTexture, vec2((x + 1.5) * invSize, y));\n S = texture(cc_jointsTexture, vec2((x + 2.5) * invSize, y)).xyz;\n }\n#endif\nvoid skinRTS(out vec4 R, out vec3 T, out vec3 S) {\n vec4 r, t, Qt = vec4(0.0); vec3 s;\n R = vec4(0.0); S = vec3(0.0);\n for (int i = 0; i < 4; i++) {\n float w = a_weights[i];\n getJointDQ(a_joints[i], r, t, s);\n S += s * w; R += r * w; Qt += t * w;\n }\n float invNorm = 1.0 / length(R); R *= invNorm; Qt *= invNorm;\n T = 2.0 * (R.w * Qt.xyz - Qt.w * R.xyz + cross(R.xyz, Qt.xyz));\n}\nvec3 VectorTransformQuat(vec3 v, vec4 Q) {\n return v + 2.0 * cross(Q.xyz, cross(Q.xyz, v) + Q.w * v);\n}\nvoid CCSkin(inout vec4 position) {\n vec4 R; vec3 T, S;\n skinRTS(R, T, S);\n position.xyz = VectorTransformQuat(position.xyz * S, R) + T;\n}\nvoid CCSkin(inout StandardAttributes attr) {\n vec4 R; vec3 T, S;\n skinRTS(R, T, S);\n attr.position.xyz = VectorTransformQuat(attr.position.xyz * S, R) + T;\n attr.normal = VectorTransformQuat(attr.normal, R);\n attr.tangent.xyz = VectorTransformQuat(attr.tangent.xyz, R);\n}\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n int index;\n};\nvoid CCAttrToInput (in StandardAttributes attr, out StandardVertInput In) {\n In.position = attr.position;\n In.normal = attr.normal;\n In.tangent = attr.tangent;\n In.index = attr.index;\n}\nvoid CCVertInput (out StandardVertInput In) {\n StandardAttributes attr;\n CCDecode(attr);\n #if CC_USE_SKINNING\n CCSkin(attr);\n #endif\n CCAttrToInput(attr, In);\n}\nuniform Constants {\n vec4 tilingOffset;\n vec4 albedo;\n vec4 albedoScale;\n vec4 pbrParams;\n vec4 pbrScale;\n vec4 emissive;\n vec4 emissiveScale;\n};\n#define saturate(a) clamp( a, 0.0, 1.0 )\nhighp mat4 transposeMat4(in highp mat4 mat) {\n highp vec4 i0 = mat[0];\n highp vec4 i1 = mat[1];\n highp vec4 i2 = mat[2];\n highp vec4 i3 = mat[3];\n return mat4(vec4(i0.x, i1.x, i2.x, i3.x),\n vec4(i0.y, i1.y, i2.y, i3.y),\n vec4(i0.z, i1.z, i2.z, i3.z),\n vec4(i0.w, i1.w, i2.w, i3.w));\n}\nout vec3 v_position;\nout vec3 v_normal;\n#if USE_NORMAL_MAP\n out vec3 v_tangent;\n out vec3 v_bitangent;\n#endif\n#if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n in vec2 a_texCoord;\n out vec2 v_uv;\n#endif\nvec4 vert () {\n StandardVertInput In;\n CCVertInput(In);\n #if USE_BATCHING\n mat4 matWorld = cc_matWorlds[In.index];\n mat4 matWorldIT = transposeMat4(matWorld);\n #else\n mat4 matWorld = cc_matWorld;\n mat4 matWorldIT = cc_matWorldIT;\n #endif\n vec4 pos = matWorld * In.position;\n v_position = pos.xyz;\n v_normal = normalize((matWorldIT * vec4(In.normal, 0.0)).xyz);\n #if USE_NORMAL_MAP\n v_tangent = normalize((matWorldIT * vec4(In.tangent.xyz, 0.0)).xyz);\n v_bitangent = cross(v_normal, v_tangent) * In.tangent.w;\n #endif\n #if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw;\n #endif\n return cc_matViewProj * pos;\n}\nvoid main() { gl_Position = vert(); }\n`,
+ "frag": `\nprecision highp float;\nuniform CCGlobal {\n vec4 cc_time;\n vec4 cc_screenSize;\n vec4 cc_screenScale;\n vec4 cc_nativeSize;\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_exposure;\n vec4 cc_mainLitDir;\n vec4 cc_mainLitColor;\n vec4 cc_ambientSky;\n vec4 cc_ambientGround;\n};\n#if CC_USE_IBL\nuniform samplerCube cc_environment;\n#endif\n#define saturate(a) clamp( a, 0.0, 1.0 )\nhighp mat4 transposeMat4(in highp mat4 mat) {\n highp vec4 i0 = mat[0];\n highp vec4 i1 = mat[1];\n highp vec4 i2 = mat[2];\n highp vec4 i3 = mat[3];\n return mat4(vec4(i0.x, i1.x, i2.x, i3.x),\n vec4(i0.y, i1.y, i2.y, i3.y),\n vec4(i0.z, i1.z, i2.z, i3.z),\n vec4(i0.w, i1.w, i2.w, i3.w));\n}\nvec3 SRGBToLinear(vec3 gamma)\n{\n return pow(gamma, vec3(2.2));\n}\nvec3 LinearToSRGB(vec3 linear)\n{\n return pow(linear, vec3(0.454545));\n}\nuniform CCForwardLight {\n highp vec4 cc_sphereLitPos[2];\n vec4 cc_sphereLitSizeRange[2];\n vec4 cc_sphereLitColor[2];\n highp vec4 cc_spotLitPos[2];\n vec4 cc_spotLitSizeRangeAngle[2];\n vec4 cc_spotLitDir[2];\n vec4 cc_spotLitColor[2];\n};\nfloat SmoothDistAtt2(float distSqr, float invSqrAttRadius) {\n float factor = distSqr * invSqrAttRadius;\n float factor2 = factor * factor;\n float factor3 = factor2 * factor2;\n float smoothFactor = clamp(1.0 - factor3 * factor3, 0.0, 1.0);\n return smoothFactor * smoothFactor;\n}\nfloat SmoothDistAtt(float distSqr, float invSqrAttRadius) {\n float factor = distSqr * invSqrAttRadius;\n float smoothFactor = clamp(1.0 - factor * factor, 0.0, 1.0);\n return smoothFactor * smoothFactor;\n}\nfloat GetDistAtt(float distSqr, float invSqrAttRadius) {\n float attenuation = 1.0 / max(distSqr, 0.01*0.01);\n attenuation *= SmoothDistAtt(distSqr , invSqrAttRadius);\n return attenuation;\n}\nfloat GetAngleAtt(vec3 L, vec3 litDir, float litAngleScale, float litAngleOffset) {\n float cd = dot(litDir, L);\n float attenuation = clamp(cd * litAngleScale + litAngleOffset, 0.0, 1.0);\n return (attenuation * attenuation);\n}\nfloat GGXMobile(float roughness, float NoH, vec3 H, vec3 N) {\n vec3 NxH = cross(N, H);\n float OneMinusNoHSqr = dot(NxH, NxH);\n float a = roughness * roughness;\n float n = NoH * a;\n float p = a / (OneMinusNoHSqr + n * n);\n return p * p;\n}\nfloat CalcSpecular(float roughness, float NoH, vec3 H, vec3 N) {\n return (roughness*0.25 + 0.25) * GGXMobile(roughness, NoH, H, N);\n}\nvec3 BRDFApprox(vec3 specular, float roughness, float NoV) {\n const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);\n const vec4 c1 = vec4(1.0, 0.0425, 1.04, -0.04);\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( -9.28 * NoV ) ) * r.x + r.y;\n vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n AB.y *= clamp(50.0 * specular.g, 0.0, 1.0);\n return specular * AB.x + AB.y;\n}\nvec3 CalcDynamicLighting(vec3 worldPos, vec3 N, vec3 V, vec3 diffuse, vec3 specular, float roughness) {\n vec3 lighting = vec3(0.0);\n vec3 diffuseContrib = diffuse / 3.14159265359;\n for (int i = 0; i < 2; i++) {\n vec3 PLU = cc_sphereLitPos[i].xyz - worldPos;\n vec3 PL = normalize(PLU);\n vec3 PH = normalize(PL + V);\n float PNL = max(dot(N, PL), 0.001);\n float PNH = max(dot(N, PH), 0.0);\n float distSqr = dot(PLU, PLU);\n float litRadius = cc_sphereLitSizeRange[i].x;\n float litRadiusSqr = litRadius * litRadius;\n float illum = 3.14159265359 * (litRadiusSqr / max(litRadiusSqr , distSqr));\n float attRadiusSqrInv = 1.0 / max(cc_sphereLitSizeRange[i].y, 0.01);\n attRadiusSqrInv *= attRadiusSqrInv;\n float att = GetDistAtt(distSqr, attRadiusSqrInv);\n vec3 lspec = specular * CalcSpecular(roughness, PNH, PH, N);\n lighting += PNL * cc_sphereLitColor[i].rgb * cc_sphereLitColor[i].w * illum * att * (diffuseContrib + lspec);\n }\n for (int i = 0; i < 2; i++) {\n vec3 SLU = cc_spotLitPos[i].xyz - worldPos;\n vec3 SL = normalize(SLU);\n vec3 SH = normalize(SL + V);\n float SNL = max(dot(N, SL), 0.001);\n float SNH = max(dot(N, SH), 0.0);\n float distSqr = dot(SLU, SLU);\n float litRadius = cc_spotLitSizeRangeAngle[i].x;\n float litRadiusSqr = litRadius * litRadius;\n float illum = 3.14159265359 * (litRadiusSqr / max(litRadiusSqr , distSqr));\n float attRadiusSqrInv = 1.0 / max(cc_spotLitSizeRangeAngle[i].y, 0.01);\n attRadiusSqrInv *= attRadiusSqrInv;\n float cosInner = max(dot(-cc_spotLitDir[i].xyz, SL), 0.01);\n float cosOuter = cc_spotLitSizeRangeAngle[i].z;\n float litAngleScale = 1.0 / max(0.001, cosInner - cosOuter);\n float litAngleOffset = -cosOuter * litAngleScale;\n float att = GetDistAtt(distSqr, attRadiusSqrInv);\n att *= GetAngleAtt(SL, -cc_spotLitDir[i].xyz, litAngleScale, litAngleOffset);\n vec3 lspec = specular * CalcSpecular(roughness, SNH, SH, N);\n lighting += SNL * cc_spotLitColor[i].rgb * cc_spotLitColor[i].w * illum * att * (diffuseContrib + lspec);\n }\n return lighting;\n}\nstruct StandardSurface {\n vec4 albedo;\n vec3 position;\n vec3 normal;\n vec3 emissive;\n float roughness;\n float metallic;\n float occlusion;\n};\nvec4 CCStandardShading (StandardSurface s) {\n vec3 diffuse = s.albedo.rgb * (1.0 - s.metallic);\n vec3 specular = mix(vec3(0.04), s.albedo.rgb, s.metallic);\n vec3 N = normalize(s.normal);\n vec3 V = normalize(cc_cameraPos.xyz - s.position);\n vec3 L = normalize(-cc_mainLitDir.xyz);\n vec3 H = normalize(L+V);\n float NV = max(abs(dot(N, V)), 0.001);\n float NL = max(dot(N, L), 0.001);\n float NH = max(dot(N, H), 0.0);\n specular = BRDFApprox(specular, s.roughness, NV);\n vec3 diffuseContrib = diffuse / 3.14159265359;\n vec3 specularContrib = specular * CalcSpecular(s.roughness, NH, H, N);\n vec3 finalColor = NL * cc_mainLitColor.rgb * cc_mainLitColor.w * (diffuseContrib + specularContrib);\n finalColor += CalcDynamicLighting(s.position, N, V, diffuse, specular, s.roughness);\n float fAmb = 0.5 - N.y * 0.5;\n vec3 ambDiff = mix(cc_ambientSky.rgb, cc_ambientGround.rgb, fAmb) * cc_ambientSky.w;\n finalColor += (ambDiff.rgb * diffuse);\n #if CC_USE_IBL\n vec3 R = normalize(reflect(-V, N));\n vec4 envmap = textureLod(cc_environment, R, s.roughness * 10.0);\n vec3 env = SRGBToLinear(envmap.rgb) * cc_ambientSky.w;\n finalColor += env * specular;\n #endif\n finalColor = finalColor * s.occlusion;\n #if CC_USE_HDR\n s.emissive *= cc_exposure.w;\n #endif\n finalColor += s.emissive;\n return vec4(finalColor, s.albedo.a);\n}\nvec4 CCFragOutput (vec4 color) {\n #if !CC_USE_HDR\n color.rgb = LinearToSRGB(color.rgb);\n #endif\n return color;\n}\nuniform Constants {\n vec4 tilingOffset;\n vec4 albedo;\n vec4 albedoScale;\n vec4 pbrParams;\n vec4 pbrScale;\n vec4 emissive;\n vec4 emissiveScale;\n};\nin vec3 v_position;\n#if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n in vec2 v_uv;\n#endif\nin vec3 v_normal;\n#if USE_NORMAL_MAP\n in vec3 v_tangent;\n in vec3 v_bitangent;\n#endif\n#if USE_ALBEDO_MAP\n uniform sampler2D albedoMap;\n#endif\n#if USE_NORMAL_MAP\n uniform sampler2D normalMap;\n#endif\n#if USE_PBR_MAP\n uniform sampler2D pbrMap;\n#endif\n#if USE_METALLIC_ROUGHNESS_MAP\n uniform sampler2D metallicRoughnessMap;\n#endif\n#if USE_OCCLUSION_MAP\n uniform sampler2D occlusionMap;\n#endif\n#if USE_EMISSIVE_MAP\n uniform sampler2D emissiveMap;\n#endif\n#if USE_ALPHA_TEST\n#endif\nvoid surf (out StandardSurface s) {\n vec4 baseColor = albedo;\n #if USE_ALBEDO_MAP\n vec4 texColor = texture(albedoMap, v_uv);\n texColor.rgb = SRGBToLinear(texColor.rgb);\n baseColor *= texColor;\n #endif\n s.albedo = baseColor;\n s.albedo.rgb *= albedoScale.xyz;\n #if USE_ALPHA_TEST\n if (s.albedo.ALPHA_TEST_CHANNEL < albedoScale.w) discard;\n #endif\n s.normal = v_normal;\n #if USE_NORMAL_MAP\n vec3 nmmp = texture(normalMap, v_uv).xyz - vec3(0.5);\n s.normal =\n (nmmp.x * pbrScale.w) * normalize(v_tangent) +\n (nmmp.y * pbrScale.w) * normalize(v_bitangent) +\n nmmp.z * normalize(s.normal);\n #endif\n s.position = v_position;\n vec4 pbr = pbrParams;\n #if USE_PBR_MAP\n pbr = texture(pbrMap, v_uv);\n #endif\n #if USE_METALLIC_ROUGHNESS_MAP\n vec4 metallicRoughness = texture(metallicRoughnessMap, v_uv);\n pbr.METALLIC_CHANNEL = metallicRoughness.METALLIC_CHANNEL;\n pbr.ROUGHNESS_CHANNEL = metallicRoughness.ROUGHNESS_CHANNEL;\n #endif\n #if USE_OCCLUSION_MAP\n pbr.OCCLUSION_CHANNEL = texture(occlusionMap, v_uv).OCCLUSION_CHANNEL;\n #endif\n pbr *= pbrScale;\n s.roughness = clamp(pbr.ROUGHNESS_CHANNEL, 0.04, 1.0);\n s.metallic = clamp(pbr.METALLIC_CHANNEL, 0.0, 0.96);\n s.occlusion = pbr.OCCLUSION_CHANNEL;\n s.emissive = emissive.rgb * emissiveScale.xyz;\n #if USE_EMISSIVE_MAP\n s.emissive *= SRGBToLinear(texture(emissiveMap, v_uv).rgb);\n #endif\n}\nvec4 frag () {\n StandardSurface s; surf(s);\n vec4 color = CCStandardShading(s);\n return CCFragOutput(color);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }\n`
},
"glsl1": {
- "vert": `\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform highp mat4 cc_matWorld;\nuniform highp mat4 cc_matWorldIT;\nuniform highp mat4 cc_matWorlds[10];\nstruct StandardAttributes {\n vec4 position;\n vec3 normal;\n vec4 tangent;\n int index;\n};\nattribute vec3 a_position;\nattribute vec3 a_normal;\nattribute vec4 a_tangent;\n#if USE_BATCHING\nattribute float a_index;\n#endif\nvoid CCDecode (out StandardAttributes attr) {\n attr.position = vec4(a_position, 1.0);\n attr.normal = a_normal;\n attr.tangent = a_tangent;\n#if USE_BATCHING\n attr.index = int(a_index + 0.5);\n#endif\n}\n#if CC_USE_SKINNING\nattribute vec4 a_weights;\nattribute vec4 a_joints;\nuniform highp vec4 cc_jointsTextureInfo;\nuniform highp vec4 cc_jointsAnimInfo;\nuniform sampler2D cc_jointsTexture;\n#if CC_USE_SKINNING == 1\n highp float decode32(highp vec4 rgba) {\n rgba = rgba * 255.0;\n highp float Sign = 1.0 - step(128.0, rgba[3]) * 2.0;\n highp float Exponent = 2.0 * mod(rgba[3], 128.0) + step(128.0, rgba[2]) - 127.0;\n highp float Mantissa = mod(rgba[2], 128.0) * 65536.0 + rgba[1] * 256.0 + rgba[0] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n#endif\n#if CC_USE_SKINNING == 1\n void getJointDQ(float i, out vec4 Qr, out vec4 Qt, out vec3 S) {\n highp float j = 12.0 * (cc_jointsAnimInfo.x * i + cc_jointsAnimInfo.y) + cc_jointsTextureInfo.z;\n highp float invSize = cc_jointsTextureInfo.y;\n highp float y = floor(j * invSize);\n highp float x = j - y * cc_jointsTextureInfo.x;\n y = (y + 0.5) * invSize;\n Qr = vec4(\n decode32(texture2D(cc_jointsTexture, vec2((x + 0.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 1.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 2.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 3.5) * invSize, y)))\n );\n Qt = vec4(\n decode32(texture2D(cc_jointsTexture, vec2((x + 4.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 5.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 6.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 7.5) * invSize, y)))\n );\n S = vec3(\n decode32(texture2D(cc_jointsTexture, vec2((x + 8.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 9.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 10.5) * invSize, y)))\n );\n }\n#elif CC_USE_SKINNING == 2\n void getJointDQ(float i, out vec4 Qr, out vec4 Qt, out vec3 S) {\n highp float j = 3.0 * (cc_jointsAnimInfo.x * i + cc_jointsAnimInfo.y) + cc_jointsTextureInfo.z;\n highp float invSize = cc_jointsTextureInfo.y;\n highp float y = floor(j * invSize);\n highp float x = j - y * cc_jointsTextureInfo.x;\n y = (y + 0.5) * invSize;\n Qr = texture2D(cc_jointsTexture, vec2((x + 0.5) * invSize, y));\n Qt = texture2D(cc_jointsTexture, vec2((x + 1.5) * invSize, y));\n S = texture2D(cc_jointsTexture, vec2((x + 2.5) * invSize, y)).xyz;\n }\n#endif\nvoid skinRTS(out vec4 R, out vec3 T, out vec3 S) {\n vec4 r, t, Qt = vec4(0.0); vec3 s;\n R = vec4(0.0); S = vec3(0.0);\n for (int i = 0; i < 4; i++) {\n float w = a_weights[i];\n getJointDQ(a_joints[i], r, t, s);\n S += s * w; R += r * w; Qt += t * w;\n }\n float invNorm = 1.0 / length(R); R *= invNorm; Qt *= invNorm;\n T = 2.0 * (R.w * Qt.xyz - Qt.w * R.xyz + cross(R.xyz, Qt.xyz));\n}\nvec3 VectorTransformQuat(vec3 v, vec4 Q) {\n return v + 2.0 * cross(Q.xyz, cross(Q.xyz, v) + Q.w * v);\n}\nvoid CCSkin(inout vec4 position) {\n vec4 R; vec3 T, S;\n skinRTS(R, T, S);\n position.xyz = VectorTransformQuat(position.xyz * S, R) + T;\n}\nvoid CCSkin(inout StandardAttributes attr) {\n vec4 R; vec3 T, S;\n skinRTS(R, T, S);\n attr.position.xyz = VectorTransformQuat(attr.position.xyz * S, R) + T;\n attr.normal = VectorTransformQuat(attr.normal, R);\n attr.tangent.xyz = VectorTransformQuat(attr.tangent.xyz, R);\n}\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n int index;\n};\nvoid CCAttrToInput (in StandardAttributes attr, out StandardVertInput In) {\n In.position = attr.position;\n In.normal = attr.normal;\n In.tangent = attr.tangent;\n In.index = attr.index;\n}\nvoid CCVertInput (out StandardVertInput In) {\n StandardAttributes attr;\n CCDecode(attr);\n #if CC_USE_SKINNING\n CCSkin(attr);\n #endif\n CCAttrToInput(attr, In);\n}\nuniform vec4 tilingOffset;\n#define saturate(a) clamp( a, 0.0, 1.0 )\nhighp mat4 transposeMat4(in highp mat4 mat) {\n highp vec4 i0 = mat[0];\n highp vec4 i1 = mat[1];\n highp vec4 i2 = mat[2];\n highp vec4 i3 = mat[3];\n return mat4(vec4(i0.x, i1.x, i2.x, i3.x),\n vec4(i0.y, i1.y, i2.y, i3.y),\n vec4(i0.z, i1.z, i2.z, i3.z),\n vec4(i0.w, i1.w, i2.w, i3.w));\n}\nvarying vec3 v_position;\nvarying vec3 v_normal;\n#if USE_NORMAL_MAP\n varying vec3 v_tangent;\n varying vec3 v_bitangent;\n#endif\n#if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n attribute vec2 a_texCoord;\n varying vec2 v_uv;\n#endif\nvec4 vert () {\n StandardVertInput In;\n CCVertInput(In);\n #if USE_BATCHING\n mat4 matWorld = cc_matWorlds[In.index];\n mat4 matWorldIT = transposeMat4(matWorld);\n #else\n mat4 matWorld = cc_matWorld;\n mat4 matWorldIT = cc_matWorldIT;\n #endif\n vec4 pos = matWorld * In.position;\n v_position = pos.xyz;\n v_normal = normalize((matWorldIT * vec4(In.normal, 0.0)).xyz);\n #if USE_NORMAL_MAP\n v_tangent = normalize((matWorldIT * vec4(In.tangent.xyz, 0.0)).xyz);\n v_bitangent = cross(v_tangent, v_normal) * In.tangent.w;\n #endif\n #if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw;\n #endif\n return cc_matViewProj * pos;\n}\nvoid main() { gl_Position = vert(); }\n`,
- "frag": `\nprecision highp float;\nuniform vec4 cc_cameraPos;\nuniform vec4 cc_exposure;\nuniform vec4 cc_mainLitDir;\nuniform vec4 cc_mainLitColor;\nuniform vec4 cc_ambientSky;\nuniform vec4 cc_ambientGround;\n#if CC_USE_IBL\nuniform samplerCube cc_environment;\n#endif\n#define saturate(a) clamp( a, 0.0, 1.0 )\nhighp mat4 transposeMat4(in highp mat4 mat) {\n highp vec4 i0 = mat[0];\n highp vec4 i1 = mat[1];\n highp vec4 i2 = mat[2];\n highp vec4 i3 = mat[3];\n return mat4(vec4(i0.x, i1.x, i2.x, i3.x),\n vec4(i0.y, i1.y, i2.y, i3.y),\n vec4(i0.z, i1.z, i2.z, i3.z),\n vec4(i0.w, i1.w, i2.w, i3.w));\n}\nvec3 SRGBToLinear(vec3 gamma)\n{\n return pow(gamma, vec3(2.2));\n}\nvec3 LinearToSRGB(vec3 linear)\n{\n return pow(linear, vec3(0.454545));\n}\nuniform highp vec4 cc_sphereLitPos[2];\nuniform vec4 cc_sphereLitSizeRange[2];\nuniform vec4 cc_sphereLitColor[2];\nuniform highp vec4 cc_spotLitPos[2];\nuniform vec4 cc_spotLitSizeRangeAngle[2];\nuniform vec4 cc_spotLitDir[2];\nuniform vec4 cc_spotLitColor[2];\nfloat SmoothDistAtt2(float distSqr, float invSqrAttRadius) {\n float factor = distSqr * invSqrAttRadius;\n float factor2 = factor * factor;\n float factor3 = factor2 * factor2;\n float smoothFactor = clamp(1.0 - factor3 * factor3, 0.0, 1.0);\n return smoothFactor * smoothFactor;\n}\nfloat SmoothDistAtt(float distSqr, float invSqrAttRadius) {\n float factor = distSqr * invSqrAttRadius;\n float smoothFactor = clamp(1.0 - factor * factor, 0.0, 1.0);\n return smoothFactor * smoothFactor;\n}\nfloat GetDistAtt(float distSqr, float invSqrAttRadius) {\n float attenuation = 1.0 / max(distSqr, 0.01*0.01);\n attenuation *= SmoothDistAtt(distSqr , invSqrAttRadius);\n return attenuation;\n}\nfloat GetAngleAtt(vec3 L, vec3 litDir, float litAngleScale, float litAngleOffset) {\n float cd = dot(litDir, L);\n float attenuation = clamp(cd * litAngleScale + litAngleOffset, 0.0, 1.0);\n return (attenuation * attenuation);\n}\nfloat GGXMobile(float roughness, float NoH, vec3 H, vec3 N) {\n vec3 NxH = cross(N, H);\n float OneMinusNoHSqr = dot(NxH, NxH);\n float a = roughness * roughness;\n float n = NoH * a;\n float p = a / (OneMinusNoHSqr + n * n);\n return p * p;\n}\nfloat CalcSpecular(float roughness, float NoH, vec3 H, vec3 N) {\n return (roughness*0.25 + 0.25) * GGXMobile(roughness, NoH, H, N);\n}\nvec3 BRDFApprox(vec3 specular, float roughness, float NoV) {\n const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);\n const vec4 c1 = vec4(1.0, 0.0425, 1.04, -0.04);\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( -9.28 * NoV ) ) * r.x + r.y;\n vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n AB.y *= clamp(50.0 * specular.g, 0.0, 1.0);\n return specular * AB.x + AB.y;\n}\nvec3 CalcDynamicLighting(vec3 worldPos, vec3 N, vec3 V, vec3 diffuse, vec3 specular, float roughness) {\n vec3 lighting = vec3(0.0);\n vec3 diffuseContrib = diffuse / 3.14159265359;\n for (int i = 0; i < 2; i++) {\n vec3 PLU = cc_sphereLitPos[i].xyz - worldPos;\n vec3 PL = normalize(PLU);\n vec3 PH = normalize(PL + V);\n float PNL = max(dot(N, PL), 0.001);\n float PNH = max(dot(N, PH), 0.0);\n float distSqr = dot(PLU, PLU);\n float litRadius = cc_sphereLitSizeRange[i].x;\n float litRadiusSqr = litRadius * litRadius;\n float illum = 3.14159265359 * (litRadiusSqr / max(litRadiusSqr , distSqr));\n float attRadiusSqrInv = 1.0 / max(cc_sphereLitSizeRange[i].y, 0.01);\n attRadiusSqrInv *= attRadiusSqrInv;\n float att = GetDistAtt(distSqr, attRadiusSqrInv);\n vec3 lspec = specular * CalcSpecular(roughness, PNH, PH, N);\n lighting += PNL * cc_sphereLitColor[i].rgb * cc_sphereLitColor[i].w * illum * att * (diffuseContrib + lspec);\n }\n for (int i = 0; i < 2; i++) {\n vec3 SLU = cc_spotLitPos[i].xyz - worldPos;\n vec3 SL = normalize(SLU);\n vec3 SH = normalize(SL + V);\n float SNL = max(dot(N, SL), 0.001);\n float SNH = max(dot(N, SH), 0.0);\n float distSqr = dot(SLU, SLU);\n float litRadius = cc_spotLitSizeRangeAngle[i].x;\n float litRadiusSqr = litRadius * litRadius;\n float illum = 3.14159265359 * (litRadiusSqr / max(litRadiusSqr , distSqr));\n float attRadiusSqrInv = 1.0 / max(cc_spotLitSizeRangeAngle[i].y, 0.01);\n attRadiusSqrInv *= attRadiusSqrInv;\n float cosInner = max(dot(-cc_spotLitDir[i].xyz, SL), 0.01);\n float cosOuter = cc_spotLitSizeRangeAngle[i].z;\n float litAngleScale = 1.0 / max(0.001, cosInner - cosOuter);\n float litAngleOffset = -cosOuter * litAngleScale;\n float att = GetDistAtt(distSqr, attRadiusSqrInv);\n att *= GetAngleAtt(SL, -cc_spotLitDir[i].xyz, litAngleScale, litAngleOffset);\n vec3 lspec = specular * CalcSpecular(roughness, SNH, SH, N);\n lighting += SNL * cc_spotLitColor[i].rgb * cc_spotLitColor[i].w * illum * att * (diffuseContrib + lspec);\n }\n return lighting;\n}\nstruct StandardSurface {\n vec4 albedo;\n vec3 position;\n vec3 normal;\n vec3 emissive;\n float roughness;\n float metallic;\n float occlusion;\n};\nvec4 CCStandardShading (StandardSurface s) {\n vec3 diffuse = s.albedo.rgb * (1.0 - s.metallic);\n vec3 specular = mix(vec3(0.04), s.albedo.rgb, s.metallic);\n vec3 N = normalize(s.normal);\n vec3 V = normalize(cc_cameraPos.xyz - s.position);\n vec3 L = normalize(-cc_mainLitDir.xyz);\n vec3 H = normalize(L+V);\n float NV = max(abs(dot(N, V)), 0.001);\n float NL = max(dot(N, L), 0.001);\n float NH = max(dot(N, H), 0.0);\n specular = BRDFApprox(specular, s.roughness, NV);\n vec3 diffuseContrib = diffuse / 3.14159265359;\n vec3 specularContrib = specular * CalcSpecular(s.roughness, NH, H, N);\n vec3 finalColor = NL * cc_mainLitColor.rgb * cc_mainLitColor.w * (diffuseContrib + specularContrib);\n finalColor += CalcDynamicLighting(s.position, N, V, diffuse, specular, s.roughness);\n float fAmb = 0.5 - N.y * 0.5;\n vec3 ambDiff = mix(cc_ambientSky.rgb, cc_ambientGround.rgb, fAmb) * cc_ambientSky.w;\n finalColor += (ambDiff.rgb * diffuse);\n #if CC_USE_IBL\n vec3 R = normalize(reflect(-V, N));\n vec3 env = SRGBToLinear(textureCube(cc_environment, R).rgb) * cc_ambientSky.w;\n finalColor += env * specular;\n #endif\n finalColor = finalColor * s.occlusion;\n #if CC_USE_HDR\n s.emissive *= cc_exposure.w;\n #endif\n finalColor += s.emissive;\n return vec4(finalColor, s.albedo.a);\n}\nvec4 CCFragOutput (vec4 color) {\n #if !CC_USE_HDR\n color.rgb = LinearToSRGB(color.rgb);\n #endif\n return color;\n}\nuniform vec4 albedo;\nuniform vec4 albedoScale;\nuniform vec4 pbrParams;\nuniform vec4 pbrScale;\nuniform vec4 emissive;\nuniform vec4 emissiveScale;\nvarying vec3 v_position;\n#if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n varying vec2 v_uv;\n#endif\nvarying vec3 v_normal;\n#if USE_NORMAL_MAP\n varying vec3 v_tangent;\n varying vec3 v_bitangent;\n#endif\n#if USE_ALBEDO_MAP\n uniform sampler2D albedoMap;\n#endif\n#if USE_NORMAL_MAP\n uniform sampler2D normalMap;\n#endif\n#if USE_PBR_MAP\n uniform sampler2D pbrMap;\n#endif\n#if USE_METALLIC_ROUGHNESS_MAP\n uniform sampler2D metallicRoughnessMap;\n#endif\n#if USE_OCCLUSION_MAP\n uniform sampler2D occlusionMap;\n#endif\n#if USE_EMISSIVE_MAP\n uniform sampler2D emissiveMap;\n#endif\n#if USE_ALPHA_TEST\n#endif\nvoid surf (out StandardSurface s) {\n vec4 baseColor = albedo;\n #if USE_ALBEDO_MAP\n vec4 texColor = texture2D(albedoMap, v_uv);\n texColor.rgb = SRGBToLinear(texColor.rgb);\n baseColor *= texColor;\n #endif\n s.albedo = baseColor;\n s.albedo.rgb *= albedoScale.xyz;\n #if USE_ALPHA_TEST\n if (s.albedo.ALPHA_TEST_CHANNEL < albedoScale.w) discard;\n #endif\n s.normal = v_normal;\n #if USE_NORMAL_MAP\n vec3 nmmp = texture2D(normalMap, v_uv).xyz - vec3(0.5);\n s.normal =\n (nmmp.x * pbrScale.w) * normalize(v_tangent) +\n (nmmp.y * pbrScale.w) * normalize(v_bitangent) +\n nmmp.z * normalize(s.normal);\n #endif\n s.position = v_position;\n vec4 pbr = pbrParams;\n #if USE_PBR_MAP\n pbr = texture2D(pbrMap, v_uv);\n #endif\n #if USE_METALLIC_ROUGHNESS_MAP\n vec4 metallicRoughness = texture2D(metallicRoughnessMap, v_uv);\n pbr.METALLIC_CHANNEL = metallicRoughness.METALLIC_CHANNEL;\n pbr.ROUGHNESS_CHANNEL = metallicRoughness.ROUGHNESS_CHANNEL;\n #endif\n #if USE_OCCLUSION_MAP\n pbr.OCCLUSION_CHANNEL = texture2D(occlusionMap, v_uv).OCCLUSION_CHANNEL;\n #endif\n pbr *= pbrScale;\n s.roughness = clamp(pbr.ROUGHNESS_CHANNEL, 0.04, 1.0);\n s.metallic = clamp(pbr.METALLIC_CHANNEL, 0.0, 0.96);\n s.occlusion = pbr.OCCLUSION_CHANNEL;\n s.emissive = emissive.rgb * emissiveScale.xyz;\n #if USE_EMISSIVE_MAP\n s.emissive *= SRGBToLinear(texture2D(emissiveMap, v_uv).rgb);\n #endif\n}\nvec4 frag () {\n StandardSurface s; surf(s);\n vec4 color = CCStandardShading(s);\n return CCFragOutput(color);\n}\nvoid main() { gl_FragColor = frag(); }\n`
+ "vert": `\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform highp mat4 cc_matWorld;\nuniform highp mat4 cc_matWorldIT;\nuniform highp mat4 cc_matWorlds[10];\nstruct StandardAttributes {\n vec4 position;\n vec3 normal;\n vec4 tangent;\n int index;\n};\nattribute vec3 a_position;\nattribute vec3 a_normal;\nattribute vec4 a_tangent;\n#if USE_BATCHING\nattribute float a_index;\n#endif\nvoid CCDecode (out StandardAttributes attr) {\n attr.position = vec4(a_position, 1.0);\n attr.normal = a_normal;\n attr.tangent = a_tangent;\n#if USE_BATCHING\n attr.index = int(a_index + 0.5);\n#endif\n}\n#if CC_USE_SKINNING\nattribute vec4 a_weights;\nattribute vec4 a_joints;\nuniform highp vec4 cc_jointsTextureInfo;\nuniform highp vec4 cc_jointsAnimInfo;\nuniform sampler2D cc_jointsTexture;\n#if CC_USE_SKINNING == 1\n highp float decode32(highp vec4 rgba) {\n rgba = rgba * 255.0;\n highp float Sign = 1.0 - step(128.0, rgba[3]) * 2.0;\n highp float Exponent = 2.0 * mod(rgba[3], 128.0) + step(128.0, rgba[2]) - 127.0;\n highp float Mantissa = mod(rgba[2], 128.0) * 65536.0 + rgba[1] * 256.0 + rgba[0] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n#endif\n#if CC_USE_SKINNING == 1\n void getJointDQ(float i, out vec4 Qr, out vec4 Qt, out vec3 S) {\n highp float j = 12.0 * (cc_jointsAnimInfo.x * i + cc_jointsAnimInfo.y) + cc_jointsTextureInfo.z;\n highp float invSize = cc_jointsTextureInfo.y;\n highp float y = floor(j * invSize);\n highp float x = j - y * cc_jointsTextureInfo.x;\n y = (y + 0.5) * invSize;\n Qr = vec4(\n decode32(texture2D(cc_jointsTexture, vec2((x + 0.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 1.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 2.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 3.5) * invSize, y)))\n );\n Qt = vec4(\n decode32(texture2D(cc_jointsTexture, vec2((x + 4.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 5.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 6.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 7.5) * invSize, y)))\n );\n S = vec3(\n decode32(texture2D(cc_jointsTexture, vec2((x + 8.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 9.5) * invSize, y))),\n decode32(texture2D(cc_jointsTexture, vec2((x + 10.5) * invSize, y)))\n );\n }\n#elif CC_USE_SKINNING == 2\n void getJointDQ(float i, out vec4 Qr, out vec4 Qt, out vec3 S) {\n highp float j = 3.0 * (cc_jointsAnimInfo.x * i + cc_jointsAnimInfo.y) + cc_jointsTextureInfo.z;\n highp float invSize = cc_jointsTextureInfo.y;\n highp float y = floor(j * invSize);\n highp float x = j - y * cc_jointsTextureInfo.x;\n y = (y + 0.5) * invSize;\n Qr = texture2D(cc_jointsTexture, vec2((x + 0.5) * invSize, y));\n Qt = texture2D(cc_jointsTexture, vec2((x + 1.5) * invSize, y));\n S = texture2D(cc_jointsTexture, vec2((x + 2.5) * invSize, y)).xyz;\n }\n#endif\nvoid skinRTS(out vec4 R, out vec3 T, out vec3 S) {\n vec4 r, t, Qt = vec4(0.0); vec3 s;\n R = vec4(0.0); S = vec3(0.0);\n for (int i = 0; i < 4; i++) {\n float w = a_weights[i];\n getJointDQ(a_joints[i], r, t, s);\n S += s * w; R += r * w; Qt += t * w;\n }\n float invNorm = 1.0 / length(R); R *= invNorm; Qt *= invNorm;\n T = 2.0 * (R.w * Qt.xyz - Qt.w * R.xyz + cross(R.xyz, Qt.xyz));\n}\nvec3 VectorTransformQuat(vec3 v, vec4 Q) {\n return v + 2.0 * cross(Q.xyz, cross(Q.xyz, v) + Q.w * v);\n}\nvoid CCSkin(inout vec4 position) {\n vec4 R; vec3 T, S;\n skinRTS(R, T, S);\n position.xyz = VectorTransformQuat(position.xyz * S, R) + T;\n}\nvoid CCSkin(inout StandardAttributes attr) {\n vec4 R; vec3 T, S;\n skinRTS(R, T, S);\n attr.position.xyz = VectorTransformQuat(attr.position.xyz * S, R) + T;\n attr.normal = VectorTransformQuat(attr.normal, R);\n attr.tangent.xyz = VectorTransformQuat(attr.tangent.xyz, R);\n}\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n int index;\n};\nvoid CCAttrToInput (in StandardAttributes attr, out StandardVertInput In) {\n In.position = attr.position;\n In.normal = attr.normal;\n In.tangent = attr.tangent;\n In.index = attr.index;\n}\nvoid CCVertInput (out StandardVertInput In) {\n StandardAttributes attr;\n CCDecode(attr);\n #if CC_USE_SKINNING\n CCSkin(attr);\n #endif\n CCAttrToInput(attr, In);\n}\nuniform vec4 tilingOffset;\n#define saturate(a) clamp( a, 0.0, 1.0 )\nhighp mat4 transposeMat4(in highp mat4 mat) {\n highp vec4 i0 = mat[0];\n highp vec4 i1 = mat[1];\n highp vec4 i2 = mat[2];\n highp vec4 i3 = mat[3];\n return mat4(vec4(i0.x, i1.x, i2.x, i3.x),\n vec4(i0.y, i1.y, i2.y, i3.y),\n vec4(i0.z, i1.z, i2.z, i3.z),\n vec4(i0.w, i1.w, i2.w, i3.w));\n}\nvarying vec3 v_position;\nvarying vec3 v_normal;\n#if USE_NORMAL_MAP\n varying vec3 v_tangent;\n varying vec3 v_bitangent;\n#endif\n#if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n attribute vec2 a_texCoord;\n varying vec2 v_uv;\n#endif\nvec4 vert () {\n StandardVertInput In;\n CCVertInput(In);\n #if USE_BATCHING\n mat4 matWorld = cc_matWorlds[In.index];\n mat4 matWorldIT = transposeMat4(matWorld);\n #else\n mat4 matWorld = cc_matWorld;\n mat4 matWorldIT = cc_matWorldIT;\n #endif\n vec4 pos = matWorld * In.position;\n v_position = pos.xyz;\n v_normal = normalize((matWorldIT * vec4(In.normal, 0.0)).xyz);\n #if USE_NORMAL_MAP\n v_tangent = normalize((matWorldIT * vec4(In.tangent.xyz, 0.0)).xyz);\n v_bitangent = cross(v_normal, v_tangent) * In.tangent.w;\n #endif\n #if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw;\n #endif\n return cc_matViewProj * pos;\n}\nvoid main() { gl_Position = vert(); }\n`,
+ "frag": `\n#if CC_USE_IBL\n #ifdef GL_EXT_shader_texture_lod\n #extension GL_EXT_shader_texture_lod : enable\n #endif\n#endif\nprecision highp float;\nuniform vec4 cc_cameraPos;\nuniform vec4 cc_exposure;\nuniform vec4 cc_mainLitDir;\nuniform vec4 cc_mainLitColor;\nuniform vec4 cc_ambientSky;\nuniform vec4 cc_ambientGround;\n#if CC_USE_IBL\nuniform samplerCube cc_environment;\n#endif\n#define saturate(a) clamp( a, 0.0, 1.0 )\nhighp mat4 transposeMat4(in highp mat4 mat) {\n highp vec4 i0 = mat[0];\n highp vec4 i1 = mat[1];\n highp vec4 i2 = mat[2];\n highp vec4 i3 = mat[3];\n return mat4(vec4(i0.x, i1.x, i2.x, i3.x),\n vec4(i0.y, i1.y, i2.y, i3.y),\n vec4(i0.z, i1.z, i2.z, i3.z),\n vec4(i0.w, i1.w, i2.w, i3.w));\n}\nvec3 SRGBToLinear(vec3 gamma)\n{\n return pow(gamma, vec3(2.2));\n}\nvec3 LinearToSRGB(vec3 linear)\n{\n return pow(linear, vec3(0.454545));\n}\nuniform highp vec4 cc_sphereLitPos[2];\nuniform vec4 cc_sphereLitSizeRange[2];\nuniform vec4 cc_sphereLitColor[2];\nuniform highp vec4 cc_spotLitPos[2];\nuniform vec4 cc_spotLitSizeRangeAngle[2];\nuniform vec4 cc_spotLitDir[2];\nuniform vec4 cc_spotLitColor[2];\nfloat SmoothDistAtt2(float distSqr, float invSqrAttRadius) {\n float factor = distSqr * invSqrAttRadius;\n float factor2 = factor * factor;\n float factor3 = factor2 * factor2;\n float smoothFactor = clamp(1.0 - factor3 * factor3, 0.0, 1.0);\n return smoothFactor * smoothFactor;\n}\nfloat SmoothDistAtt(float distSqr, float invSqrAttRadius) {\n float factor = distSqr * invSqrAttRadius;\n float smoothFactor = clamp(1.0 - factor * factor, 0.0, 1.0);\n return smoothFactor * smoothFactor;\n}\nfloat GetDistAtt(float distSqr, float invSqrAttRadius) {\n float attenuation = 1.0 / max(distSqr, 0.01*0.01);\n attenuation *= SmoothDistAtt(distSqr , invSqrAttRadius);\n return attenuation;\n}\nfloat GetAngleAtt(vec3 L, vec3 litDir, float litAngleScale, float litAngleOffset) {\n float cd = dot(litDir, L);\n float attenuation = clamp(cd * litAngleScale + litAngleOffset, 0.0, 1.0);\n return (attenuation * attenuation);\n}\nfloat GGXMobile(float roughness, float NoH, vec3 H, vec3 N) {\n vec3 NxH = cross(N, H);\n float OneMinusNoHSqr = dot(NxH, NxH);\n float a = roughness * roughness;\n float n = NoH * a;\n float p = a / (OneMinusNoHSqr + n * n);\n return p * p;\n}\nfloat CalcSpecular(float roughness, float NoH, vec3 H, vec3 N) {\n return (roughness*0.25 + 0.25) * GGXMobile(roughness, NoH, H, N);\n}\nvec3 BRDFApprox(vec3 specular, float roughness, float NoV) {\n const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);\n const vec4 c1 = vec4(1.0, 0.0425, 1.04, -0.04);\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( -9.28 * NoV ) ) * r.x + r.y;\n vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n AB.y *= clamp(50.0 * specular.g, 0.0, 1.0);\n return specular * AB.x + AB.y;\n}\nvec3 CalcDynamicLighting(vec3 worldPos, vec3 N, vec3 V, vec3 diffuse, vec3 specular, float roughness) {\n vec3 lighting = vec3(0.0);\n vec3 diffuseContrib = diffuse / 3.14159265359;\n for (int i = 0; i < 2; i++) {\n vec3 PLU = cc_sphereLitPos[i].xyz - worldPos;\n vec3 PL = normalize(PLU);\n vec3 PH = normalize(PL + V);\n float PNL = max(dot(N, PL), 0.001);\n float PNH = max(dot(N, PH), 0.0);\n float distSqr = dot(PLU, PLU);\n float litRadius = cc_sphereLitSizeRange[i].x;\n float litRadiusSqr = litRadius * litRadius;\n float illum = 3.14159265359 * (litRadiusSqr / max(litRadiusSqr , distSqr));\n float attRadiusSqrInv = 1.0 / max(cc_sphereLitSizeRange[i].y, 0.01);\n attRadiusSqrInv *= attRadiusSqrInv;\n float att = GetDistAtt(distSqr, attRadiusSqrInv);\n vec3 lspec = specular * CalcSpecular(roughness, PNH, PH, N);\n lighting += PNL * cc_sphereLitColor[i].rgb * cc_sphereLitColor[i].w * illum * att * (diffuseContrib + lspec);\n }\n for (int i = 0; i < 2; i++) {\n vec3 SLU = cc_spotLitPos[i].xyz - worldPos;\n vec3 SL = normalize(SLU);\n vec3 SH = normalize(SL + V);\n float SNL = max(dot(N, SL), 0.001);\n float SNH = max(dot(N, SH), 0.0);\n float distSqr = dot(SLU, SLU);\n float litRadius = cc_spotLitSizeRangeAngle[i].x;\n float litRadiusSqr = litRadius * litRadius;\n float illum = 3.14159265359 * (litRadiusSqr / max(litRadiusSqr , distSqr));\n float attRadiusSqrInv = 1.0 / max(cc_spotLitSizeRangeAngle[i].y, 0.01);\n attRadiusSqrInv *= attRadiusSqrInv;\n float cosInner = max(dot(-cc_spotLitDir[i].xyz, SL), 0.01);\n float cosOuter = cc_spotLitSizeRangeAngle[i].z;\n float litAngleScale = 1.0 / max(0.001, cosInner - cosOuter);\n float litAngleOffset = -cosOuter * litAngleScale;\n float att = GetDistAtt(distSqr, attRadiusSqrInv);\n att *= GetAngleAtt(SL, -cc_spotLitDir[i].xyz, litAngleScale, litAngleOffset);\n vec3 lspec = specular * CalcSpecular(roughness, SNH, SH, N);\n lighting += SNL * cc_spotLitColor[i].rgb * cc_spotLitColor[i].w * illum * att * (diffuseContrib + lspec);\n }\n return lighting;\n}\nstruct StandardSurface {\n vec4 albedo;\n vec3 position;\n vec3 normal;\n vec3 emissive;\n float roughness;\n float metallic;\n float occlusion;\n};\nvec4 CCStandardShading (StandardSurface s) {\n vec3 diffuse = s.albedo.rgb * (1.0 - s.metallic);\n vec3 specular = mix(vec3(0.04), s.albedo.rgb, s.metallic);\n vec3 N = normalize(s.normal);\n vec3 V = normalize(cc_cameraPos.xyz - s.position);\n vec3 L = normalize(-cc_mainLitDir.xyz);\n vec3 H = normalize(L+V);\n float NV = max(abs(dot(N, V)), 0.001);\n float NL = max(dot(N, L), 0.001);\n float NH = max(dot(N, H), 0.0);\n specular = BRDFApprox(specular, s.roughness, NV);\n vec3 diffuseContrib = diffuse / 3.14159265359;\n vec3 specularContrib = specular * CalcSpecular(s.roughness, NH, H, N);\n vec3 finalColor = NL * cc_mainLitColor.rgb * cc_mainLitColor.w * (diffuseContrib + specularContrib);\n finalColor += CalcDynamicLighting(s.position, N, V, diffuse, specular, s.roughness);\n float fAmb = 0.5 - N.y * 0.5;\n vec3 ambDiff = mix(cc_ambientSky.rgb, cc_ambientGround.rgb, fAmb) * cc_ambientSky.w;\n finalColor += (ambDiff.rgb * diffuse);\n #if CC_USE_IBL\n vec3 R = normalize(reflect(-V, N));\n #ifdef GL_EXT_shader_texture_lod\n vec4 envmap = textureCubeLodEXT(cc_environment, R, s.roughness * 10.0);\n #else\n vec4 envmap = textureCube(cc_environment, R);\n #endif\n vec3 env = SRGBToLinear(envmap.rgb) * cc_ambientSky.w;\n finalColor += env * specular;\n #endif\n finalColor = finalColor * s.occlusion;\n #if CC_USE_HDR\n s.emissive *= cc_exposure.w;\n #endif\n finalColor += s.emissive;\n return vec4(finalColor, s.albedo.a);\n}\nvec4 CCFragOutput (vec4 color) {\n #if !CC_USE_HDR\n color.rgb = LinearToSRGB(color.rgb);\n #endif\n return color;\n}\nuniform vec4 albedo;\nuniform vec4 albedoScale;\nuniform vec4 pbrParams;\nuniform vec4 pbrScale;\nuniform vec4 emissive;\nuniform vec4 emissiveScale;\nvarying vec3 v_position;\n#if USE_ALBEDO_MAP || USE_NORMAL_MAP || USE_PBR_MAP || USE_EMISSIVE_MAP || USE_METALLIC_ROUGHNESS_MAP || USE_OCCLUSION_MAP\n varying vec2 v_uv;\n#endif\nvarying vec3 v_normal;\n#if USE_NORMAL_MAP\n varying vec3 v_tangent;\n varying vec3 v_bitangent;\n#endif\n#if USE_ALBEDO_MAP\n uniform sampler2D albedoMap;\n#endif\n#if USE_NORMAL_MAP\n uniform sampler2D normalMap;\n#endif\n#if USE_PBR_MAP\n uniform sampler2D pbrMap;\n#endif\n#if USE_METALLIC_ROUGHNESS_MAP\n uniform sampler2D metallicRoughnessMap;\n#endif\n#if USE_OCCLUSION_MAP\n uniform sampler2D occlusionMap;\n#endif\n#if USE_EMISSIVE_MAP\n uniform sampler2D emissiveMap;\n#endif\n#if USE_ALPHA_TEST\n#endif\nvoid surf (out StandardSurface s) {\n vec4 baseColor = albedo;\n #if USE_ALBEDO_MAP\n vec4 texColor = texture2D(albedoMap, v_uv);\n texColor.rgb = SRGBToLinear(texColor.rgb);\n baseColor *= texColor;\n #endif\n s.albedo = baseColor;\n s.albedo.rgb *= albedoScale.xyz;\n #if USE_ALPHA_TEST\n if (s.albedo.ALPHA_TEST_CHANNEL < albedoScale.w) discard;\n #endif\n s.normal = v_normal;\n #if USE_NORMAL_MAP\n vec3 nmmp = texture2D(normalMap, v_uv).xyz - vec3(0.5);\n s.normal =\n (nmmp.x * pbrScale.w) * normalize(v_tangent) +\n (nmmp.y * pbrScale.w) * normalize(v_bitangent) +\n nmmp.z * normalize(s.normal);\n #endif\n s.position = v_position;\n vec4 pbr = pbrParams;\n #if USE_PBR_MAP\n pbr = texture2D(pbrMap, v_uv);\n #endif\n #if USE_METALLIC_ROUGHNESS_MAP\n vec4 metallicRoughness = texture2D(metallicRoughnessMap, v_uv);\n pbr.METALLIC_CHANNEL = metallicRoughness.METALLIC_CHANNEL;\n pbr.ROUGHNESS_CHANNEL = metallicRoughness.ROUGHNESS_CHANNEL;\n #endif\n #if USE_OCCLUSION_MAP\n pbr.OCCLUSION_CHANNEL = texture2D(occlusionMap, v_uv).OCCLUSION_CHANNEL;\n #endif\n pbr *= pbrScale;\n s.roughness = clamp(pbr.ROUGHNESS_CHANNEL, 0.04, 1.0);\n s.metallic = clamp(pbr.METALLIC_CHANNEL, 0.0, 0.96);\n s.occlusion = pbr.OCCLUSION_CHANNEL;\n s.emissive = emissive.rgb * emissiveScale.xyz;\n #if USE_EMISSIVE_MAP\n s.emissive *= SRGBToLinear(texture2D(emissiveMap, v_uv).rgb);\n #endif\n}\nvec4 frag () {\n StandardSurface s; surf(s);\n vec4 color = CCStandardShading(s);\n return CCFragOutput(color);\n}\nvoid main() { gl_FragColor = frag(); }\n`
},
"builtins": {"globals":{"blocks":[{"name":"CCGlobal", "defines":[]}], "samplers":[{"name":"cc_environment", "defines":["CC_USE_IBL"]}]}, "locals":{"blocks":[{"name":"CCLocal", "defines":[]}, {"name":"CCSkinningTexture", "defines":["CC_USE_SKINNING"]}, {"name":"CCSkinningAnimation", "defines":["CC_USE_SKINNING"]}, {"name":"CCForwardLight", "defines":[]}], "samplers":[{"name":"cc_jointsTexture", "defines":["CC_USE_SKINNING"]}]}},
"defines": [
@@ -333,7 +333,7 @@ export default [
{
"name": "pipeline/planar-shadow",
"techniques": [
- {"passes":[{"phase":"planarShadow", "blendState":{"targets":[{"blend":true, "blendSrc":2, "blendDst":4, "blendDstAlpha":4}]}, "program":"pipeline/planar-shadow|planar-shadow-vs:vert|planar-shadow-fs:frag", "depthStencilState":{"depthTest":true, "depthWrite":false, "stencilTestFront":true, "stencilFuncFront":5, "stencilPassOpFront":2, "stencilWriteMaskBack":128, "stencilWriteMaskFront":128, "stencilReadMaskBack":128, "stencilReadMaskFront":128, "stencilRefBack":128, "stencilRefFront":128}}]}
+ {"passes":[{"phase":"planarShadow", "blendState":{"targets":[{"blend":true, "blendSrc":2, "blendDst":4, "blendDstAlpha":4}]}, "program":"pipeline/planar-shadow|planar-shadow-vs:vert|planar-shadow-fs:frag", "depthStencilState":{"depthTest":true, "depthWrite":false, "stencilTestFront":true, "stencilFuncFront":5, "stencilPassOpFront":2, "stencilRefBack":128, "stencilRefFront":128, "stencilReadMaskBack":128, "stencilReadMaskFront":128, "stencilWriteMaskBack":128, "stencilWriteMaskFront":128}}]}
],
"shaders": [
{
@@ -365,13 +365,13 @@ export default [
"shaders": [
{
"name": "pipeline/skybox|sky-vs:vert|sky-fs:frag",
- "hash": 1957154815,
+ "hash": 3661265017,
"glsl3": {
- "vert": `\nprecision mediump float;\nuniform CCGlobal {\n vec4 cc_time;\n vec4 cc_screenSize;\n vec4 cc_screenScale;\n vec4 cc_nativeSize;\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_exposure;\n vec4 cc_mainLitDir;\n vec4 cc_mainLitColor;\n vec4 cc_ambientSky;\n vec4 cc_ambientGround;\n};\nin vec3 a_position;\nvoid CCDecode (out vec4 position) {\n position = vec4(a_position, 1.0);\n}\nout vec4 viewDir;\nhighp vec4 vert () {\n CCDecode(viewDir);\n mat4 matViewRotOnly = mat4(mat3(cc_matView));\n highp vec4 pos = matViewRotOnly * viewDir;\n highp vec2 f = cc_matProj[3][3] > 0.0 ? vec2(2.0, 1.0) : vec2(cc_matProj[1][1]);\n pos.xy *= vec2(cc_screenSize.y * cc_screenSize.z, 1.0) * f;\n pos.zw = vec2(-0.99999 * pos.z, -pos.z);\n return pos;\n}\nvoid main() { gl_Position = vert(); }\n`,
+ "vert": `\nprecision mediump float;\nuniform CCGlobal {\n vec4 cc_time;\n vec4 cc_screenSize;\n vec4 cc_screenScale;\n vec4 cc_nativeSize;\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_exposure;\n vec4 cc_mainLitDir;\n vec4 cc_mainLitColor;\n vec4 cc_ambientSky;\n vec4 cc_ambientGround;\n};\nin vec3 a_position;\nvoid CCDecode (out vec4 position) {\n position = vec4(a_position, 1.0);\n}\nout vec4 viewDir;\nhighp vec4 vert () {\n CCDecode(viewDir);\n mat4 matViewRotOnly = mat4(mat3(cc_matView));\n highp vec4 pos = matViewRotOnly * viewDir;\n highp vec2 f = cc_matProj[3][3] > 0.0 ? vec2(4.8, 2.4) : vec2(cc_matProj[1][1]);\n pos.xy *= vec2(cc_screenSize.y * cc_screenSize.z, 1.0) * f;\n pos.zw = vec2(-0.99999 * pos.z, -pos.z);\n return pos;\n}\nvoid main() { gl_Position = vert(); }\n`,
"frag": `\nprecision mediump float;\nuniform samplerCube cc_environment;\nvec3 unpackNormal(vec4 nmap) {\n return nmap.xyz * 2.0 - 1.0;\n}\nvec3 unpackRGBE(vec4 rgbe) {\n return rgbe.rgb * pow(2.0, rgbe.a * 255.0 - 128.0);\n}\nvec3 SRGBToLinear(vec3 gamma)\n{\n return pow(gamma, vec3(2.2));\n}\nvec3 LinearToSRGB(vec3 linear)\n{\n return pow(linear, vec3(0.454545));\n}\nuniform CCGlobal {\n vec4 cc_time;\n vec4 cc_screenSize;\n vec4 cc_screenScale;\n vec4 cc_nativeSize;\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_exposure;\n vec4 cc_mainLitDir;\n vec4 cc_mainLitColor;\n vec4 cc_ambientSky;\n vec4 cc_ambientGround;\n};\nvec4 CCFragOutput(vec4 color) {\n #if CC_USE_HDR\n color.rgb = mix(color.rgb, SRGBToLinear(color.rgb) * cc_exposure.w, vec3(cc_exposure.z));\n #endif\n return color;\n}\nin vec4 viewDir;\nvec4 frag () {\n #if USE_RGBE_CUBEMAP\n vec3 c = unpackRGBE(texture(cc_environment, viewDir.xyz));\n c = LinearToSRGB(c / (1.0 + c));\n vec4 o = vec4(c, 1.0);\n #else\n vec4 o = texture(cc_environment, viewDir.xyz);\n #endif\n return CCFragOutput(o);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }\n`
},
"glsl1": {
- "vert": `\nprecision mediump float;\nuniform vec4 cc_screenSize;\nuniform mat4 cc_matView;\nuniform mat4 cc_matProj;\nattribute vec3 a_position;\nvoid CCDecode (out vec4 position) {\n position = vec4(a_position, 1.0);\n}\nvarying vec4 viewDir;\nhighp vec4 vert () {\n CCDecode(viewDir);\n mat4 matViewRotOnly = mat4(mat3(cc_matView));\n highp vec4 pos = matViewRotOnly * viewDir;\n highp vec2 f = cc_matProj[3][3] > 0.0 ? vec2(2.0, 1.0) : vec2(cc_matProj[1][1]);\n pos.xy *= vec2(cc_screenSize.y * cc_screenSize.z, 1.0) * f;\n pos.zw = vec2(-0.99999 * pos.z, -pos.z);\n return pos;\n}\nvoid main() { gl_Position = vert(); }\n`,
+ "vert": `\nprecision mediump float;\nuniform vec4 cc_screenSize;\nuniform mat4 cc_matView;\nuniform mat4 cc_matProj;\nattribute vec3 a_position;\nvoid CCDecode (out vec4 position) {\n position = vec4(a_position, 1.0);\n}\nvarying vec4 viewDir;\nhighp vec4 vert () {\n CCDecode(viewDir);\n mat4 matViewRotOnly = mat4(mat3(cc_matView));\n highp vec4 pos = matViewRotOnly * viewDir;\n highp vec2 f = cc_matProj[3][3] > 0.0 ? vec2(4.8, 2.4) : vec2(cc_matProj[1][1]);\n pos.xy *= vec2(cc_screenSize.y * cc_screenSize.z, 1.0) * f;\n pos.zw = vec2(-0.99999 * pos.z, -pos.z);\n return pos;\n}\nvoid main() { gl_Position = vert(); }\n`,
"frag": `\nprecision mediump float;\nuniform samplerCube cc_environment;\nvec3 unpackNormal(vec4 nmap) {\n return nmap.xyz * 2.0 - 1.0;\n}\nvec3 unpackRGBE(vec4 rgbe) {\n return rgbe.rgb * pow(2.0, rgbe.a * 255.0 - 128.0);\n}\nvec3 SRGBToLinear(vec3 gamma)\n{\n return pow(gamma, vec3(2.2));\n}\nvec3 LinearToSRGB(vec3 linear)\n{\n return pow(linear, vec3(0.454545));\n}\nuniform vec4 cc_exposure;\nvec4 CCFragOutput(vec4 color) {\n #if CC_USE_HDR\n color.rgb = mix(color.rgb, SRGBToLinear(color.rgb) * cc_exposure.w, vec3(cc_exposure.z));\n #endif\n return color;\n}\nvarying vec4 viewDir;\nvec4 frag () {\n #if USE_RGBE_CUBEMAP\n vec3 c = unpackRGBE(textureCube(cc_environment, viewDir.xyz));\n c = LinearToSRGB(c / (1.0 + c));\n vec4 o = vec4(c, 1.0);\n #else\n vec4 o = textureCube(cc_environment, viewDir.xyz);\n #endif\n return CCFragOutput(o);\n}\nvoid main() { gl_FragColor = frag(); }\n`
},
"builtins": {"globals":{"blocks":[{"name":"CCGlobal", "defines":[]}], "samplers":[{"name":"cc_environment", "defines":[]}]}, "locals":{"blocks":[], "samplers":[]}},
diff --git a/cocos/core/animation/skeletal-animation-component.ts b/cocos/core/animation/skeletal-animation-component.ts
index e8fbadb0ac..570a4087f5 100644
--- a/cocos/core/animation/skeletal-animation-component.ts
+++ b/cocos/core/animation/skeletal-animation-component.ts
@@ -116,10 +116,10 @@ export class SkeletalAnimationComponent extends AnimationComponent {
}
public querySockets () {
+ const animPaths = this._defaultClip && Object.keys((this._defaultClip as SkeletalAnimationClip).convertedData).sort().reduce((acc, cur) =>
+ cur.startsWith(acc[acc.length - 1]) ? acc : (acc.push(cur), acc), [] as string[]) || [];
+ if (!animPaths.length) { return ['default animation clip missing/invalid']; }
const out: string[] = [];
- if (!this._defaultClip) { return out; }
- const animPaths = Object.keys((this._defaultClip as SkeletalAnimationClip).convertedData).sort().reduce((acc, cur) =>
- cur.startsWith(acc[acc.length - 1]) ? acc : (acc.push(cur), acc), [] as string[]);
for (let i = 0; i < animPaths.length; i++) {
const path = animPaths[i];
const node = this.node.getChildByPath(path);
diff --git a/cocos/core/assets/material.ts b/cocos/core/assets/material.ts
index 15948868d2..9dd53f6836 100644
--- a/cocos/core/assets/material.ts
+++ b/cocos/core/assets/material.ts
@@ -34,7 +34,6 @@ import { builtinResMgr } from '../3d/builtin';
import { RenderableComponent } from '../3d/framework/renderable-component';
import { GFXBindingType } from '../gfx/define';
import { GFXTextureView } from '../gfx/texture-view';
-import { BatchedBuffer } from '../pipeline/batched-buffer';
import { IDefineMap, Pass, PassOverrides } from '../renderer/core/pass';
import { samplerLib } from '../renderer/core/sampler-lib';
import { Asset } from './asset';
diff --git a/cocos/core/assets/simple-texture.ts b/cocos/core/assets/simple-texture.ts
index 07b6c54959..1f65ee7067 100644
--- a/cocos/core/assets/simple-texture.ts
+++ b/cocos/core/assets/simple-texture.ts
@@ -38,6 +38,15 @@ export type PresumedGFXTextureInfo = Pick;
+function getMipLevel (width: number, height: number) {
+ let size = Math.max(width, height);
+ let level = 0;
+ while (size) { size >>= 1; level++; }
+ return level;
+}
+
+function isPOT (n: number) { return n && (n & (n - 1)) === 0; }
+
/**
* 简单贴图基类。
* 简单贴图内部创建了 GFX 贴图和该贴图上的 GFX 贴图视图。
@@ -198,11 +207,16 @@ export class SimpleTexture extends TextureBase {
}
protected _createTexture (device: GFXDevice) {
+ let flags = GFXTextureFlagBit.NONE;
+ if (this._mipFilter !== Filter.NONE && isPOT(this._width) && isPOT(this._height)) {
+ this._mipmapLevel = getMipLevel(this._width, this._height);
+ flags = GFXTextureFlagBit.GEN_MIPMAP;
+ }
const textureCreateInfo = this._getGfxTextureCreateInfo({
usage: GFXTextureUsageBit.SAMPLED | GFXTextureUsageBit.TRANSFER_DST,
format: this._getGFXFormat(),
mipLevel: this._mipmapLevel,
- flags: (this._mipFilter !== Filter.NONE ? GFXTextureFlagBit.GEN_MIPMAP : GFXTextureFlagBit.NONE),
+ flags,
});
if (!textureCreateInfo) {
return;
diff --git a/cocos/core/assets/texture-2d.ts b/cocos/core/assets/texture-2d.ts
index 3540440cf3..d778d4e74e 100644
--- a/cocos/core/assets/texture-2d.ts
+++ b/cocos/core/assets/texture-2d.ts
@@ -77,6 +77,7 @@ export class Texture2D extends SimpleTexture {
set mipmaps (value) {
this._mipmaps = value;
+ this._setMipmapLevel(this._mipmaps.length);
if (this._mipmaps.length > 0) {
const imageAsset: ImageAsset = this._mipmaps[0];
this.reset({
diff --git a/cocos/core/renderer/ui/ui.ts b/cocos/core/renderer/ui/ui.ts
index 4a79c9b589..491610e927 100644
--- a/cocos/core/renderer/ui/ui.ts
+++ b/cocos/core/renderer/ui/ui.ts
@@ -42,13 +42,13 @@ import { Camera } from '../../renderer/scene/camera';
import { Model } from '../../renderer/scene/model';
import { RenderScene } from '../../renderer/scene/render-scene';
import { Root } from '../../root';
+import { Layers } from '../../scene-graph';
import { INode } from '../../utils/interfaces';
import { MeshBuffer } from './mesh-buffer';
import { StencilManager } from './stencil-manager';
import { UIBatchModel } from './ui-batch-model';
import { UIMaterial } from './ui-material';
import * as UIVertexFormat from './ui-vertex-format';
-import { Layers } from '../../scene-graph';
export class UIDrawBatch {
public camera: Camera | null = null;
@@ -509,7 +509,6 @@ export class UI {
}
private _preprocess (c: INode) {
- // ts-ignore
const render = c._uiComp;
if (render && render.enabledInHierarchy) {
render.updateAssembler(this);
@@ -565,7 +564,7 @@ export class UI {
}
}
- private _screenSort(a: CanvasComponent, b: CanvasComponent){
+ private _screenSort (a: CanvasComponent, b: CanvasComponent){
return a.priority - b.priority;
}
}
From c1d158677feacb995d860c0c7b0e5c8682395af0 Mon Sep 17 00:00:00 2001
From: JoneLau <32630749+JoneLau@users.noreply.github.com>
Date: Fri, 11 Oct 2019 10:00:52 +0800
Subject: [PATCH 15/22] adjust canvas camera frustum (#5511)
---
cocos/core/components/ui-base/canvas-component.ts | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/cocos/core/components/ui-base/canvas-component.ts b/cocos/core/components/ui-base/canvas-component.ts
index 7912e7b8fc..2fe71911fe 100644
--- a/cocos/core/components/ui-base/canvas-component.ts
+++ b/cocos/core/components/ui-base/canvas-component.ts
@@ -213,16 +213,17 @@ export class CanvasComponent extends Component {
flows: ['UIFlow'],
});
- this._camera!.fov = 45;
- this._camera!.clearFlag = this.clearFlag;
+ this._camera.fov = 45;
+ this._camera.clearFlag = this.clearFlag;
+ this._camera.farClip = 2000;
this.color = this._color;
const device = director.root!.device;
- this._camera!.resize(device.width, device.height);
+ this._camera.resize(device.width, device.height);
if (this._targetTexture) {
const window = this._targetTexture.getGFXWindow();
- this._camera!.changeTargetWindow(window);
- this._camera!.setFixedSize(window!.width, window!.height);
+ this._camera.changeTargetWindow(window);
+ this._camera.setFixedSize(window!.width, window!.height);
}
}
@@ -314,7 +315,7 @@ export class CanvasComponent extends Component {
const size = game.canvas!;
this._camera.resize(size.width, size.height);
this._camera.orthoHeight = game.canvas!.height / view.getScaleY() / 2;
- this._camera.node.setPosition(_worldPos.x, _worldPos.y, 999);
+ this._camera.node.setPosition(_worldPos.x, _worldPos.y, 1000);
this._camera.update();
}
}
From d581995f2388f5b14e800fb621389aac93805221 Mon Sep 17 00:00:00 2001
From: ChiaNing
Date: Fri, 11 Oct 2019 10:33:53 +0800
Subject: [PATCH 16/22] widgetComponent value format adjustment (#5509)
---
cocos/ui/components/widget-component.ts | 16 ++++++++--------
cocos/ui/components/widget-manager.ts | 12 ++++++------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/cocos/ui/components/widget-component.ts b/cocos/ui/components/widget-component.ts
index 0a0590f467..18b6d6c691 100644
--- a/cocos/ui/components/widget-component.ts
+++ b/cocos/ui/components/widget-component.ts
@@ -676,7 +676,7 @@ export class WidgetComponent extends Component {
const targetSize = getReadonlyNodeSize(target);
const deltaInPercent = new Vec3();
if (targetSize.width !== 0 && targetSize.height !== 0) {
- Vec3.set(deltaInPercent, delta.x / targetSize.width, delta.y / targetSize.height, deltaInPercent.z);
+ Vec3.set(deltaInPercent, delta.x / targetSize.width * 100, delta.y / targetSize.height * 100, deltaInPercent.z);
}
if (self.isAlignTop) {
@@ -728,7 +728,7 @@ export class WidgetComponent extends Component {
const targetSize = getReadonlyNodeSize(target);
const deltaInPercent = new Vec3();
if (targetSize.width !== 0 && targetSize.height !== 0) {
- Vec3.set(deltaInPercent, delta.x / targetSize.width, delta.y / targetSize.height, deltaInPercent.z);
+ Vec3.set(deltaInPercent, delta.x / targetSize.width * 100, delta.y / targetSize.height * 100, deltaInPercent.z);
}
const anchor = self.node.getAnchorPoint();
@@ -785,17 +785,17 @@ export class WidgetComponent extends Component {
const size = this.node.parent!.getContentSize();
if (this.isAlignLeft && flag === AlignFlags.LEFT) {
- this._left = isAbs ? this._left * size.width : this._left / size.width;
+ this._left = isAbs ? this._left / 100 * size.width : this._left * 100 / size.width;
} else if (this.isAlignRight && flag === AlignFlags.RIGHT) {
- this._right = isAbs ? this._right * size.width : this._right / size.width;
+ this._right = isAbs ? this._right / 100 * size.width : this._right * 100 / size.width;
} else if (this.isAlignHorizontalCenter && flag === AlignFlags.CENTER) {
- this._horizontalCenter = isAbs ? this._horizontalCenter * size.width : this._horizontalCenter / size.width;
+ this._horizontalCenter = isAbs ? this._horizontalCenter / 100 * size.width : this._horizontalCenter * 100 / size.width;
} else if (this.isAlignTop && flag === AlignFlags.TOP) {
- this._top = isAbs ? this._top * size.height : this._top / size.height;
+ this._top = isAbs ? this._top / 100 * size.height : this._top * 100 / size.height;
} else if (this.isAlignBottom && flag === AlignFlags.BOT) {
- this._bottom = isAbs ? this._bottom * size.height : this._bottom / size.height;
+ this._bottom = isAbs ? this._bottom / 100 * size.height : this._bottom * 100 / size.height;
} else if (this.isAbsoluteVerticalCenter && flag === AlignFlags.MID) {
- this._verticalCenter = isAbs ? this._verticalCenter * size.height : this._verticalCenter / size.height;
+ this._verticalCenter = isAbs ? this._verticalCenter / 100 * size.height : this._verticalCenter * 100 / size.height;
}
this._recursiveDirty();
diff --git a/cocos/ui/components/widget-manager.ts b/cocos/ui/components/widget-manager.ts
index 4aaa7b9bc3..5562c41445 100644
--- a/cocos/ui/components/widget-manager.ts
+++ b/cocos/ui/components/widget-manager.ts
@@ -90,8 +90,8 @@ function align (node: INode, widget: WidgetComponent) {
}
// adjust borders according to offsets
- localLeft += widget.isAbsoluteLeft ? widget.left : widget.left * targetWidth;
- localRight -= widget.isAbsoluteRight ? widget.right : widget.right * targetWidth;
+ localLeft += widget.isAbsoluteLeft ? widget.left : widget.left / 100 * targetWidth;
+ localRight -= widget.isAbsoluteRight ? widget.right : widget.right / 100 * targetWidth;
if (hasTarget) {
localLeft += inverseTranslate.x;
@@ -117,7 +117,7 @@ function align (node: INode, widget: WidgetComponent) {
width = node.width * scaleX;
if (widget.isAlignHorizontalCenter) {
let localHorizontalCenter = widget.isAbsoluteHorizontalCenter ?
- widget.horizontalCenter : widget.horizontalCenter * targetWidth;
+ widget.horizontalCenter : widget.horizontalCenter / 100 * targetWidth;
let targetCenter = (0.5 - targetAnchor.x) * targetSize.width;
if (hasTarget) {
localHorizontalCenter *= inverseScale.x;
@@ -149,8 +149,8 @@ function align (node: INode, widget: WidgetComponent) {
}
// adjust borders according to offsets
- localBottom += widget.isAbsoluteBottom ? widget.bottom : widget.bottom * targetHeight;
- localTop -= widget.isAbsoluteTop ? widget.top : widget.top * targetHeight;
+ localBottom += widget.isAbsoluteBottom ? widget.bottom : widget.bottom / 100 * targetHeight;
+ localTop -= widget.isAbsoluteTop ? widget.top : widget.top / 100 * targetHeight;
if (hasTarget) {
// transform
@@ -177,7 +177,7 @@ function align (node: INode, widget: WidgetComponent) {
height = node.height * scaleY;
if (widget.isAlignVerticalCenter) {
let localVerticalCenter = widget.isAbsoluteVerticalCenter ?
- widget.verticalCenter : widget.verticalCenter * targetHeight;
+ widget.verticalCenter : widget.verticalCenter / 100 * targetHeight;
let targetMiddle = (0.5 - targetAnchor.y) * targetSize.height;
if (hasTarget) {
localVerticalCenter *= inverseScale.y;
From de32d9b22d7471237dfc3a7066ccda6d4fdee319 Mon Sep 17 00:00:00 2001
From: ftershock <53322920+ftershock@users.noreply.github.com>
Date: Sat, 12 Oct 2019 10:18:27 +0800
Subject: [PATCH 17/22] API Doc update (#5481)
* update
* API Doc update
* API Doc update
* API Doc update
* API Doc update
---
cocos/core/3d/framework/camera-component.ts | 4 +-
cocos/core/3d/framework/model-component.ts | 4 +-
cocos/core/animation/animation-clip.ts | 25 +--
cocos/core/animation/animation-component.ts | 3 +-
cocos/core/assets/simple-texture.ts | 3 +-
cocos/core/components/component.ts | 12 +-
cocos/core/data/class-decorator.ts | 22 ++-
cocos/core/director.ts | 8 +-
cocos/core/geom-utils/intersect.ts | 100 +++--------
cocos/core/geom-utils/octree.ts | 15 +-
cocos/core/geom-utils/sphere.ts | 5 +-
cocos/core/load-pipeline/CCLoader.ts | 4 +-
cocos/core/load-pipeline/downloader.ts | 3 +-
cocos/core/load-pipeline/loading-items.ts | 4 +-
cocos/core/load-pipeline/pipeline.ts | 4 +-
cocos/core/load-pipeline/plist-parser.ts | 3 +-
cocos/core/math/bits.ts | 30 ++--
cocos/core/math/color.ts | 48 +++---
cocos/core/math/mat3.ts | 28 +--
cocos/core/math/mat4.ts | 36 ++--
cocos/core/math/quat.ts | 17 +-
cocos/core/math/utils.ts | 51 +++---
cocos/core/math/vec2.ts | 62 +++----
cocos/core/math/vec3.ts | 53 +++---
cocos/core/math/vec4.ts | 52 +++---
cocos/core/pipeline/render-view.ts | 3 +-
.../platform/event-manager/event-listener.ts | 160 ++++++++----------
.../platform/event-manager/system-event.ts | 43 ++---
cocos/core/primitive/circle.ts | 1 +
cocos/core/scene-graph/base-node.ts | 12 +-
cocos/core/scene-graph/layers.ts | 3 +-
cocos/core/scene-graph/node-activator.ts | 3 +-
cocos/ui/components/graphics-component.ts | 2 +-
cocos/ui/components/rich-text-component.ts | 3 +-
34 files changed, 391 insertions(+), 435 deletions(-)
diff --git a/cocos/core/3d/framework/camera-component.ts b/cocos/core/3d/framework/camera-component.ts
index 2fd618bf25..15f5688a37 100644
--- a/cocos/core/3d/framework/camera-component.ts
+++ b/cocos/core/3d/framework/camera-component.ts
@@ -41,9 +41,7 @@ import { Enum } from '../../value-types';
import { CameraDefaultMask } from '../../pipeline/define';
/**
- * @en
- * The projection type
- * @zh
+ * The projection type
* 投影类型。
* @static
* @enum CameraComponent.Projection
diff --git a/cocos/core/3d/framework/model-component.ts b/cocos/core/3d/framework/model-component.ts
index 5634b590a4..bd5897608a 100644
--- a/cocos/core/3d/framework/model-component.ts
+++ b/cocos/core/3d/framework/model-component.ts
@@ -36,8 +36,8 @@ import { builtinResMgr } from '../builtin';
import { RenderableComponent } from './renderable-component';
/**
- * @en Shadow projection mode
- * @zh 阴影投射方式。
+ * Shadow projection mode
+ * 阴影投射方式。
*/
const ModelShadowCastingMode = Enum({
/**
diff --git a/cocos/core/animation/animation-clip.ts b/cocos/core/animation/animation-clip.ts
index c134a96424..36aa47a313 100644
--- a/cocos/core/animation/animation-clip.ts
+++ b/cocos/core/animation/animation-clip.ts
@@ -121,25 +121,25 @@ export class AnimationClip extends Asset {
}
/**
- * 动画帧率,单位为帧/秒。
+ * @zh 动画帧率,单位为帧/秒。
*/
@property
public sample = 60;
/**
- * 动画的播放速度。
+ * @zh 动画的播放速度。
*/
@property
public speed = 1;
/**
- * 动画的循环模式。
+ * @zh 动画的循环模式。
*/
@property
public wrapMode = AnimationWrapMode.Normal;
/**
- * 动画的曲线数据。
+ * @zh 动画的曲线数据。
* @deprecated 请转用 `this.curves`
*/
@property
@@ -149,7 +149,7 @@ export class AnimationClip extends Asset {
private _curves: ITargetCurveData[] = [];
/**
- * 动画包含的事件数据。
+ * @zh 动画包含的事件数据。
*/
@property({visible: false})
public events: IAnimationEventData[] = [];
@@ -177,7 +177,7 @@ export class AnimationClip extends Asset {
protected _hash = 0;
/**
- * 动画的周期。
+ * @zh 动画的周期。
*/
get duration () {
return this._duration;
@@ -188,7 +188,7 @@ export class AnimationClip extends Asset {
}
/**
- * 动画所有时间轴。
+ * @zh 动画所有时间轴。
*/
get keys () {
return this._keys;
@@ -250,8 +250,8 @@ export class AnimationClip extends Asset {
}
/**
- * 提交曲线数据的修改。
- * 当你修改了 `this.curveDatas`、`this.keys` 或 `this.duration`时,
+ * @zh 提交曲线数据的修改。
+ * 当你修改了 `this.curveDatas`、`this.keys` 或 `this.duration`时,
* 必须调用 `this.updateCurveDatas()` 使修改生效。
* @deprecated
*/
@@ -261,7 +261,7 @@ export class AnimationClip extends Asset {
}
/**
- * 提交事件数据的修改。
+ * @zh 提交事件数据的修改。
* 当你修改了 `this.events` 时,必须调用 `this.updateEventDatas()` 使修改生效。
* @protected
*/
@@ -270,7 +270,8 @@ export class AnimationClip extends Asset {
}
/**
- * Gets the event group shall be processed at specified ratio.
+ * @en Gets the event group shall be processed at specified ratio.
+ * @zh 获取事件组应按指定比例处理。
* @param ratio The ratio.
* @protected
*/
@@ -283,7 +284,7 @@ export class AnimationClip extends Asset {
}
/**
- * 返回本动画是否包含事件数据。
+ * @zh 返回本动画是否包含事件数据。
* @protected
*/
public hasEvents () {
diff --git a/cocos/core/animation/animation-component.ts b/cocos/core/animation/animation-component.ts
index f2b66c1c8c..c1c5674d19 100644
--- a/cocos/core/animation/animation-component.ts
+++ b/cocos/core/animation/animation-component.ts
@@ -425,7 +425,8 @@ export class AnimationComponent extends Component implements IEventTarget {
}
/**
- * IEventTarget implementations, they will be overwrote with the same implementation in EventTarget by applyMixins
+ * @en IEventTarget implementations, they will be overwrote with the same implementation in EventTarget by applyMixins
+ * @zh IEventTarget 实现,它们将被 applyMixins 在 EventTarget 中用相同的实现覆盖。
*/
public targetOff (keyOrTarget?: string | Object | undefined): void {}
public once (type: string, callback: Function, target?: Object | undefined): Function | undefined {
diff --git a/cocos/core/assets/simple-texture.ts b/cocos/core/assets/simple-texture.ts
index 1f65ee7067..2ab906baf4 100644
--- a/cocos/core/assets/simple-texture.ts
+++ b/cocos/core/assets/simple-texture.ts
@@ -182,7 +182,8 @@ export class SimpleTexture extends TextureBase {
}
/**
- * This method is overrided by derived classes to provide GFX texture info.
+ * @en This method is overrided by derived classes to provide GFX texture info.
+ * @zh 这个方法被派生类重写以提供GFX纹理信息。
* @param presumed The presumed GFX texture info.
*/
protected _getGfxTextureCreateInfo (presumed: PresumedGFXTextureInfo): IGFXTextureInfo | null {
diff --git a/cocos/core/components/component.ts b/cocos/core/components/component.ts
index 43741e2632..fd2cb400fb 100644
--- a/cocos/core/components/component.ts
+++ b/cocos/core/components/component.ts
@@ -454,7 +454,7 @@ class Component extends CCObject {
* @en Schedules a callback function that runs only once, with a delay of 0 or larger.
* @zh 调度一个只运行一次的回调函数,可以指定 0 让回调函数在下一帧立即执行或者在一定的延时之后执行。
* @method scheduleOnce
- * @see [[Node.schedule]]
+ * @see [[schedule]]
* @param {function} callback 回调函数。
* @param {Number} delay 第一次执行前等待的时间(延时执行)。
* @example
@@ -527,10 +527,14 @@ class Component extends CCObject {
protected lateUpdate? (dt: number): void;
/**
- * `__preload` is called before every onLoad.
- * It is used to initialize the builtin components internally,
- * to avoid checking whether onLoad is called before every public method calls.
+ * @en `__preload` is called before every onLoad.
+ * It is used to initialize the builtin components internally,
+ * to avoid checking whether onLoad is called before every public method calls.
* This method should be removed if script priority is supported.
+ * @zh `__preload` 在每次onLoad之前调用。
+ * 它用于在内部初始化内置组件,
+ * 以避免在每次公有方法调用之前检查是否调用了onLoad。
+ * 如果支持脚本优先级,则应删除此方法。
* @private
*/
protected __preload? (): void;
diff --git a/cocos/core/data/class-decorator.ts b/cocos/core/data/class-decorator.ts
index 7afb2e2a8a..6602aa6ae8 100644
--- a/cocos/core/data/class-decorator.ts
+++ b/cocos/core/data/class-decorator.ts
@@ -37,8 +37,8 @@
// tslint:disable:no-empty-interface
/**
- * @en Some JavaScript decorators which can be accessed with "cc._decorator".
- * @zh 一些 JavaScript 装饰器,目前可以通过 "cc._decorator" 来访问。
+ * Some JavaScript decorators which can be accessed with "cc._decorator".
+ * 一些 JavaScript 装饰器,目前可以通过 "cc._decorator" 来访问。
* (这些 API 仍不完全稳定,有可能随着 JavaScript 装饰器的标准实现而调整)
*
* @submodule _decorator
@@ -312,26 +312,26 @@ export type SimplePropertyType = Function | string | typeof CCString | typeof CC
export type PropertyType = SimplePropertyType | SimplePropertyType[];
/**
- * cc 属性选项。
+ * @zh cc 属性选项。
*/
export interface IPropertyOptions extends IExposedAttributes {
}
/**
- * 标注属性为 cc 属性。
+ * @zh 标注属性为 cc 属性。
* @param options 选项。
*/
export function property (options?: IPropertyOptions): PropertyDecorator;
/**
- * 标注属性为 cc 属性。
+ * @zh 标注属性为 cc 属性。
* 等价于`@property({type})`。
* @param type cc 属性的类型。
*/
export function property (type: PropertyType): PropertyDecorator;
/**
- * 标注属性为 cc 属性。
+ * @zh 标注属性为 cc 属性。
* 等价于`@property()`。
*/
export function property (target: Object, propertyKey: string | symbol): void;
@@ -373,12 +373,10 @@ function createDummyDecorator (argCheckFunc) {
}
/**
- * @en
- * Makes a CCClass that inherit from component execute in edit mode.
- * By default, all components are only executed in play mode,
- * which means they will not have their callback functions executed while the Editor is in edit mode.
- * @zh
- * 允许继承自 Component 的 CCClass 在编辑器里执行。
+ * Makes a CCClass that inherit from component execute in edit mode.
+ * By default, all components are only executed in play mode,
+ * which means they will not have their callback functions executed while the Editor is in edit mode.
+ * 允许继承自 Component 的 CCClass 在编辑器里执行。
* 默认情况下,所有 Component 都只会在运行时才会执行,也就是说它们的生命周期回调不会在编辑器里触发。
*
* @method executeInEditMode
diff --git a/cocos/core/director.ts b/cocos/core/director.ts
index 297468d21e..8f91efec78 100644
--- a/cocos/core/director.ts
+++ b/cocos/core/director.ts
@@ -237,16 +237,16 @@ export class Director extends EventTarget {
public static readonly EVENT_AFTER_DRAW = 'director_after_draw';
/**
- * @en The event which will be triggered before the physics process.
- * @zh 物理过程之前所触发的事件。
+ * The event which will be triggered before the physics process.
+ * 物理过程之前所触发的事件。
* @event Director.EVENT_BEFORE_PHYSICS
* @readonly
*/
public static readonly EVENT_BEFORE_PHYSICS = 'director_before_physics';
/**
- * @en The event which will be triggered after the physics process.
- * @zh 物理过程之后所触发的事件。
+ * The event which will be triggered after the physics process.
+ * 物理过程之后所触发的事件。
* @event Director.EVENT_AFTER_PHYSICS
* @readonly
*/
diff --git a/cocos/core/geom-utils/intersect.ts b/cocos/core/geom-utils/intersect.ts
index a015205444..4100b13fc8 100644
--- a/cocos/core/geom-utils/intersect.ts
+++ b/cocos/core/geom-utils/intersect.ts
@@ -21,9 +21,7 @@ import triangle from './triangle';
// tslint:disable:no-shadowed-variable
/**
- * @en
- * ray-plane intersect
- * @zh
+ * ray-plane intersect
* 射线与平面的相交性检测。
* @param {ray} ray 射线
* @param {plane} plane 平面
@@ -43,9 +41,7 @@ const ray_plane = (function () {
})();
/**
- * @en
- * line-plane intersect
- * @zh
+ * line-plane intersect
* 线段与平面的相交性检测。
* @param {line} line 线段
* @param {plane} plane 平面
@@ -64,9 +60,7 @@ const line_plane = (function () {
// based on http://fileadmin.cs.lth.se/cs/Personal/Tomas_Akenine-Moller/raytri/
/**
- * @en
- * ray-triangle intersect
- * @zh
+ * ray-triangle intersect
* 射线与三角形的相交性检测。
* @param {ray} ray 射线
* @param {triangle} triangle 三角形
@@ -104,9 +98,7 @@ const ray_triangle = (function () {
})();
/**
- * @en
- * line-triangle intersect
- * @zh
+ * line-triangle intersect
* 线段与三角形的相交性检测。
* @param {line} line 线段
* @param {triangle} triangle 三角形
@@ -169,9 +161,7 @@ const line_triangle = (function () {
})();
/**
- * @en
- * line-quad intersect
- * @zh
+ * line-quad intersect
* 线段与四边形的相交性检测。
* @param {Vec3} p 线段的一点
* @param {Vec3} q 线段的另一点
@@ -262,9 +252,7 @@ const line_quad = (function () {
})();
/**
- * @en
- * ray-sphere intersect
- * @zh
+ * ray-sphere intersect
* 射线和球的相交性检测。
* @param {ray} ray 射线
* @param {sphere} sphere 球
@@ -293,9 +281,7 @@ const ray_sphere = (function () {
})();
/**
- * @en
- * ray-aabb intersect
- * @zh
+ * ray-aabb intersect
* 射线和轴对齐包围盒的相交性检测。
* @param {ray} ray 射线
* @param {aabb} aabb 轴对齐包围盒
@@ -323,9 +309,7 @@ const ray_aabb = (function () {
})();
/**
- * @en
- * ray-obb intersect
- * @zh
+ * ray-obb intersect
* 射线和方向包围盒的相交性检测。
* @param {ray} ray 射线
* @param {obb} obb 方向包围盒
@@ -401,9 +385,7 @@ const ray_obb = (function () {
})();
/**
- * @en
- * aabb-aabb intersect
- * @zh
+ * aabb-aabb intersect
* 轴对齐包围盒和轴对齐包围盒的相交性检测。
* @param {aabb} aabb1 轴对齐包围盒1
* @param {aabb} aabb2 轴对齐包围盒2
@@ -490,9 +472,7 @@ function getInterval (vertices: any[] | Vec3[], axis: Vec3) {
}
/**
- * @en
- * aabb-obb intersect
- * @zh
+ * aabb-obb intersect
* 轴对齐包围盒和方向包围盒的相交性检测。
* @param {aabb} aabb 轴对齐包围盒
* @param {obb} obb 方向包围盒
@@ -543,9 +523,7 @@ const aabb_obb = (function () {
})();
/**
- * @en
- * aabb-plane intersect
- * @zh
+ * aabb-plane intersect
* 轴对齐包围盒和平面的相交性检测。
* @param {aabb} aabb 轴对齐包围盒
* @param {plane} plane 平面
@@ -562,9 +540,7 @@ const aabb_plane = function (aabb: aabb, plane: plane): number {
};
/**
- * @en
- * aabb-frustum intersect, faster but has false positive corner cases
- * @zh
+ * aabb-frustum intersect, faster but has false positive corner cases
* 轴对齐包围盒和锥台相交性检测,速度快,但有错误情况。
* @param {aabb} aabb 轴对齐包围盒
* @param {frustum} frustum 锥台
@@ -582,9 +558,7 @@ const aabb_frustum = function (aabb: aabb, frustum: frustum): number {
// https://cesium.com/blog/2017/02/02/tighter-frustum-culling-and-why-you-may-want-to-disregard-it/
/**
- * @en
- * aabb-frustum intersect, handles most of the false positives correctly
- * @zh
+ * aabb-frustum intersect, handles most of the false positives correctly
* 轴对齐包围盒和锥台相交性检测,正确处理大多数错误情况。
* @param {aabb} aabb 轴对齐包围盒
* @param {frustum} frustum 锥台
@@ -634,9 +608,7 @@ const aabb_frustum_accurate = (function () {
})();
/**
- * @en
- * obb-point intersect
- * @zh
+ * obb-point intersect
* 方向包围盒和点的相交性检测。
* @param {obb} obb 方向包围盒
* @param {Vec3} point 点
@@ -653,9 +625,7 @@ const obb_point = (function () {
})();
/**
- * @en
- * obb-plane intersect
- * @zh
+ * obb-plane intersect
* 方向包围盒和平面的相交性检测。
* @param {obb} obb 方向包围盒
* @param {plane} plane 平面
@@ -679,9 +649,7 @@ const obb_plane = (function () {
})();
/**
- * @en
- * obb-frustum intersect, faster but has false positive corner cases
- * @zh
+ * obb-frustum intersect, faster but has false positive corner cases
* 方向包围盒和锥台相交性检测,速度快,但有错误情况。
* @param {obb} obb 方向包围盒
* @param {frustum} frustum 锥台
@@ -699,9 +667,7 @@ const obb_frustum = function (obb: obb, frustum: frustum): number {
// https://cesium.com/blog/2017/02/02/tighter-frustum-culling-and-why-you-may-want-to-disregard-it/
/**
- * @en
- * obb-frustum intersect, handles most of the false positives correctly
- * @zh
+ * obb-frustum intersect, handles most of the false positives correctly
* 方向包围盒和锥台相交性检测,正确处理大多数错误情况。
* @param {obb} obb 方向包围盒
* @param {frustum} frustum 锥台
@@ -757,9 +723,7 @@ const obb_frustum_accurate = (function () {
})();
/**
- * @en
- * obb-obb intersect
- * @zh
+ * obb-obb intersect
* 方向包围盒和方向包围盒的相交性检测。
* @param {obb} obb1 方向包围盒1
* @param {obb} obb2 方向包围盒2
@@ -808,11 +772,9 @@ const obb_obb = (function () {
})();
/**
- * @en
- * sphere-plane intersect, not necessarily faster than obb-plane
- * due to the length calculation of the plane normal to factor out
- * the unnomalized plane distance
- * @zh
+ * sphere-plane intersect, not necessarily faster than obb-plane
+ * due to the length calculation of the plane normal to factor out
+ * the unnomalized plane distance
* 球与平面的相交性检测。
* @param {sphere} sphere 球
* @param {plane} plane 平面
@@ -827,9 +789,7 @@ const sphere_plane = function (sphere: sphere, plane: plane): number {
};
/**
- * @en
- * sphere-frustum intersect, faster but has false positive corner cases
- * @zh
+ * sphere-frustum intersect, faster but has false positive corner cases
* 球和锥台的相交性检测,速度快,但有错误情况。
* @param {sphere} sphere 球
* @param {frustum} frustum 锥台
@@ -847,9 +807,7 @@ const sphere_frustum = function (sphere: sphere, frustum: frustum): number {
// https://stackoverflow.com/questions/20912692/view-frustum-culling-corner-cases
/**
- * @en
- * sphere-frustum intersect, handles the false positives correctly
- * @zh
+ * sphere-frustum intersect, handles the false positives correctly
* 球和锥台的相交性检测,正确处理大多数错误情况。
* @param {sphere} sphere 球
* @param {frustum} frustum 锥台
@@ -880,9 +838,7 @@ const sphere_frustum_accurate = (function () {
})();
/**
- * @en
- * sphere-sphere intersect
- * @zh
+ * sphere-sphere intersect
* 球和球的相交性检测。
* @param {sphere} sphere0 球0
* @param {sphere} sphere1 球1
@@ -894,9 +850,7 @@ const sphere_sphere = function (sphere0: sphere, sphere1: sphere): boolean {
};
/**
- * @en
- * sphere-aabb intersect
- * @zh
+ * sphere-aabb intersect
* 球和轴对齐包围盒的相交性检测。
* @param {sphere} sphere 球
* @param {aabb} aabb 轴对齐包围盒
@@ -911,9 +865,7 @@ const sphere_aabb = (function () {
})();
/**
- * @en
- * sphere-obb intersect
- * @zh
+ * sphere-obb intersect
* 球和方向包围盒的相交性检测。
* @param {sphere} sphere 球
* @param {obb} obb 方向包围盒
diff --git a/cocos/core/geom-utils/octree.ts b/cocos/core/geom-utils/octree.ts
index d65e90d3a3..6243533b4d 100644
--- a/cocos/core/geom-utils/octree.ts
+++ b/cocos/core/geom-utils/octree.ts
@@ -103,7 +103,8 @@ class OctreeBlock {
export default class Octree {
/**
- * Create sub blocks and populate them with given entries
+ * @en Create sub blocks and populate them with given entries
+ * @zh 创建子块,并用给定的条目填充它们
* @param {Vec3} worldMin - min position of the parent bounding box
* @param {Vec3} worldMax - max position of the parent bounding box
* @param {Array
* 封装用户的事件处理逻辑。
* 注意:这是一个抽象类,开发者不应该直接实例化这个类,请参考 [[create]] 。
*/
@@ -62,43 +59,43 @@ export class EventListener {
return this._onEvent;
}
/**
- * @en The type code of unknown event listener.
+ * @en The type code of unknown event listener.
* @zh 未知的事件监听器类型
*/
public static UNKNOWN = 0;
/**
- * @en The type code of one by one touch event listener.
+ * @en The type code of one by one touch event listener.
* @zh 触摸事件监听器类型,触点会一个一个得分开被派发
*/
public static TOUCH_ONE_BY_ONE = 1;
/**
- * @en The type code of all at once touch event listener.
+ * @en The type code of all at once touch event listener.
* @zh 触摸事件监听器类型,触点会被一次性全部派发
*/
public static TOUCH_ALL_AT_ONCE = 2;
/**
- * @en The type code of keyboard event listener.
+ * @en The type code of keyboard event listener.
* @zh 键盘事件监听器类型
*/
public static KEYBOARD = 3;
/**
- * @en The type code of mouse event listener.
+ * @en The type code of mouse event listener.
* @zh 鼠标事件监听器类型
*/
public static MOUSE = 4;
/**
- * @en The type code of acceleration event listener.
+ * @en The type code of acceleration event listener.
* @zh 加速器事件监听器类型
*/
public static ACCELERATION = 6;
/**
- * @en The type code of custom event listener.
+ * @en The type code of custom event listener.
* @zh 自定义事件监听器类型
*/
public static CUSTOM = 8;
@@ -112,11 +109,10 @@ export class EventListener {
};
/**
- * @en
- * Create a EventListener object with configuration including the event type, handlers and other parameters.
- * In handlers, this refer to the event listener object itself.
- * You can also pass custom parameters in the configuration object,
- * all custom parameters will be polyfilled into the event listener object and can be accessed in handlers.
+ * @en Create a EventListener object with configuration including the event type, handlers and other parameters.
+ * In handlers, this refer to the event listener object itself.
+ * You can also pass custom parameters in the configuration object,
+ * all custom parameters will be polyfilled into the event listener object and can be accessed in handlers.
* @zh 通过指定不同的 Event 对象来设置想要创建的事件监听器。
* @param {Object} argObj a json object
*/
@@ -190,23 +186,23 @@ export class EventListener {
/**
* @en
- *
- * Sets paused state for the listener
- * The paused state is only used for scene graph priority listeners.
- * `EventDispatcher::resumeAllEventListenersForTarget(node)` will set the paused state to `true`,
- * while `EventDispatcher::pauseAllEventListenersForTarget(node)` will set it to `false`.
- * @note 1) Fixed priority listeners will never get paused. If a fixed priority doesn't want to receive events,
- * call `setEnabled(false)` instead.
- * 2) In `Node`'s onEnter and onExit, the `paused state` of the listeners
- * which associated with that node will be automatically updated.
- *
+ *
+ * Sets paused state for the listener
+ * The paused state is only used for scene graph priority listeners.
+ * `EventDispatcher::resumeAllEventListenersForTarget(node)` will set the paused state to `true`,
+ * while `EventDispatcher::pauseAllEventListenersForTarget(node)` will set it to `false`.
+ * @note 1) Fixed priority listeners will never get paused. If a fixed priority doesn't want to receive events,
+ * call `setEnabled(false)` instead.
+ * 2) In `Node`'s onEnter and onExit, the `paused state` of the listeners
+ * which associated with that node will be automatically updated.
+ *