mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-10-09 09:15:23 +00:00
[engine] [cocos2d-x] [jsb-adapter] 适配引擎 v2.4.10 版本
This commit is contained in:
@@ -148,6 +148,6 @@ For details below:
|
||||
|
||||
* [Official site](https://www.cocos.com/products#CocosCreator)
|
||||
* [Download](https://www.cocos.com/creator)
|
||||
* [Documentation](https://docs.cocos.com/creator/manual/)
|
||||
* [API References](https://docs.cocos.com/creator/api/)
|
||||
* [Documentation](https://docs.cocos.com/creator/2.4/manual/)
|
||||
* [API References](https://docs.cocos.com/creator/2.4/api/)
|
||||
* [Forum](https://discuss.cocos2d-x.org/c/creator)
|
||||
|
25
engine/api.d.ts
vendored
25
engine/api.d.ts
vendored
@@ -1,10 +1,21 @@
|
||||
|
||||
declare let CC_JSB: boolean
|
||||
declare let CC_NATIVERENDERER: boolean
|
||||
declare let CC_EDITOR: boolean
|
||||
declare let CC_PREVIEW: boolean
|
||||
declare let CC_TEST: boolean
|
||||
declare let CC_DEBUG: boolean
|
||||
/** Running in the editor. */
|
||||
declare const CC_EDITOR: boolean;
|
||||
/** Preview in browser or simulator. */
|
||||
declare const CC_PREVIEW: boolean;
|
||||
/** Running in the editor or preview. */
|
||||
declare const CC_DEV: boolean;
|
||||
/** Running in the editor or preview, or build in debug mode. */
|
||||
declare const CC_DEBUG: boolean;
|
||||
/** Running in published project. */
|
||||
declare const CC_BUILD: boolean;
|
||||
/** Running in native platforms (mobile app, desktop app, or simulator). */
|
||||
declare const CC_JSB: boolean;
|
||||
/** Running in runtime environments. */
|
||||
declare const CC_RUNTIME: boolean;
|
||||
/** Running in the engine's unit test. */
|
||||
declare const CC_TEST: boolean;
|
||||
/** Running in the WeChat Mini Game. */
|
||||
declare const CC_WECHATGAME: boolean;
|
||||
|
||||
declare let cc: {
|
||||
// polyfills: {
|
||||
|
@@ -218,7 +218,7 @@ Tween.stopAllByTarget = function (target) {
|
||||
* Insert an action or tween to this sequence
|
||||
* !#zh
|
||||
* 插入一个 action 或者 tween 到队列中
|
||||
* @method then
|
||||
* @method then
|
||||
* @param {Action|Tween} other
|
||||
* @return {Tween}
|
||||
* @typescript then(other: Action|Tween<T>): Tween<T>
|
||||
@@ -294,6 +294,7 @@ Tween.prototype.start = function () {
|
||||
Tween.prototype.stop = function () {
|
||||
if (this._finalAction) {
|
||||
cc.director.getActionManager().removeAction(this._finalAction);
|
||||
this._finalAction = null;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
@@ -414,7 +415,7 @@ Object.assign(Tween.prototype, {
|
||||
*/
|
||||
flipX () {
|
||||
return this.call(() => { this._target.scaleX *= -1; }, this);
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* !#en Flips target's scaleY
|
||||
@@ -703,4 +704,4 @@ cc.tween = function (target) {
|
||||
};
|
||||
|
||||
cc.Tween = Tween;
|
||||
|
||||
|
||||
|
@@ -845,7 +845,7 @@ cc.Director.prototype = {
|
||||
|
||||
// Update
|
||||
if (!this._paused) {
|
||||
this.emit(cc.Director.EVENT_BEFORE_UPDATE);
|
||||
this.emit(cc.Director.EVENT_BEFORE_UPDATE, deltaTime);
|
||||
|
||||
this._compScheduler.startPhase();
|
||||
this._compScheduler.updatePhase(deltaTime);
|
||||
@@ -856,15 +856,15 @@ cc.Director.prototype = {
|
||||
|
||||
this._compScheduler.lateUpdatePhase(deltaTime);
|
||||
|
||||
this.emit(cc.Director.EVENT_AFTER_UPDATE);
|
||||
this.emit(cc.Director.EVENT_AFTER_UPDATE, deltaTime);
|
||||
}
|
||||
|
||||
// Render
|
||||
this.emit(cc.Director.EVENT_BEFORE_DRAW);
|
||||
this.emit(cc.Director.EVENT_BEFORE_DRAW, deltaTime);
|
||||
renderer.render(this._scene, deltaTime);
|
||||
|
||||
// After draw
|
||||
this.emit(cc.Director.EVENT_AFTER_DRAW);
|
||||
this.emit(cc.Director.EVENT_AFTER_DRAW, deltaTime);
|
||||
|
||||
this._totalFrames++;
|
||||
|
||||
@@ -877,35 +877,36 @@ cc.Director.prototype = {
|
||||
// calculate "global" dt
|
||||
this.calculateDeltaTime(now);
|
||||
|
||||
const deltaTime = this._deltaTime;
|
||||
// Update
|
||||
if (!this._paused) {
|
||||
// before update
|
||||
this.emit(cc.Director.EVENT_BEFORE_UPDATE);
|
||||
this.emit(cc.Director.EVENT_BEFORE_UPDATE, deltaTime);
|
||||
|
||||
// Call start for new added components
|
||||
this._compScheduler.startPhase();
|
||||
|
||||
// Update for components
|
||||
this._compScheduler.updatePhase(this._deltaTime);
|
||||
this._compScheduler.updatePhase(deltaTime);
|
||||
// Engine update with scheduler
|
||||
this._scheduler.update(this._deltaTime);
|
||||
this._scheduler.update(deltaTime);
|
||||
|
||||
// Late update for components
|
||||
this._compScheduler.lateUpdatePhase(this._deltaTime);
|
||||
this._compScheduler.lateUpdatePhase(deltaTime);
|
||||
|
||||
// User can use this event to do things after update
|
||||
this.emit(cc.Director.EVENT_AFTER_UPDATE);
|
||||
this.emit(cc.Director.EVENT_AFTER_UPDATE, deltaTime);
|
||||
|
||||
// Destroy entities that have been removed recently
|
||||
Obj._deferredDestroy();
|
||||
}
|
||||
|
||||
// Render
|
||||
this.emit(cc.Director.EVENT_BEFORE_DRAW);
|
||||
renderer.render(this._scene, this._deltaTime);
|
||||
this.emit(cc.Director.EVENT_BEFORE_DRAW, deltaTime);
|
||||
renderer.render(this._scene, deltaTime);
|
||||
|
||||
// After draw
|
||||
this.emit(cc.Director.EVENT_AFTER_DRAW);
|
||||
this.emit(cc.Director.EVENT_AFTER_DRAW, deltaTime);
|
||||
|
||||
eventManager.frameUpdateListeners();
|
||||
this._totalFrames++;
|
||||
|
@@ -149,6 +149,7 @@ export abstract class CacheManager {
|
||||
* 通过原始 url 移除缓存
|
||||
*
|
||||
* @method removeCache
|
||||
* @param {string} originUrl
|
||||
*/
|
||||
public abstract removeCache (originUrl: string): void;
|
||||
}
|
||||
|
@@ -677,7 +677,7 @@ Object.defineProperties(cc, {
|
||||
if (CC_DEBUG) {
|
||||
if (onceWarns.loader) {
|
||||
onceWarns.loader = false;
|
||||
cc.log('cc.loader is deprecated, use cc.assetManager instead please. See https://docs.cocos.com/creator/manual/zh/release-notes/asset-manager-upgrade-guide.html');
|
||||
cc.log('cc.loader is deprecated, use cc.assetManager instead please. See https://docs.cocos.com/creator/2.4/manual/zh/release-notes/asset-manager-upgrade-guide.html');
|
||||
}
|
||||
}
|
||||
return loader;
|
||||
|
@@ -383,11 +383,11 @@ let SpriteFrame = cc.Class(/** @lends cc.SpriteFrame# */{
|
||||
}
|
||||
|
||||
if (!self._originalSize) {
|
||||
self.setOriginalSize(cc.size(w, h));
|
||||
self._originalSize = cc.size(w, h);
|
||||
}
|
||||
|
||||
if (!self._offset) {
|
||||
self.setOffset(cc.v2(0, 0));
|
||||
self._offset = cc.v2(0, 0);
|
||||
}
|
||||
|
||||
self._calculateUV();
|
||||
|
@@ -674,6 +674,18 @@ let Label = cc.Class({
|
||||
this._super();
|
||||
},
|
||||
|
||||
onRestore: CC_EDITOR && function () {
|
||||
// Because undo/redo will not call onEnable/onDisable,
|
||||
// we need call onEnable/onDisable manually to active/disactive children nodes.
|
||||
if (this.enabledInHierarchy) {
|
||||
this.node._renderComponent = null;
|
||||
this.onEnable();
|
||||
}
|
||||
else {
|
||||
this.onDisable();
|
||||
}
|
||||
},
|
||||
|
||||
_nodeSizeChanged () {
|
||||
// Because the content size is automatically updated when overflow is NONE.
|
||||
// And this will conflict with the alignment of the CCWidget.
|
||||
|
@@ -62,6 +62,7 @@ var MotionStreak = cc.Class({
|
||||
ctor () {
|
||||
this._points = [];
|
||||
this._lastWPos = new cc.Vec2();
|
||||
this._lastWPosUpdated = false;
|
||||
},
|
||||
|
||||
properties: {
|
||||
@@ -313,8 +314,7 @@ var MotionStreak = cc.Class({
|
||||
reset () {
|
||||
this._points.length = 0;
|
||||
this._assembler && this._assembler._renderData.clear();
|
||||
this._lastWPos.x = 0;
|
||||
this._lastWPos.y = 0;
|
||||
this._lastWPosUpdated = false;
|
||||
if (CC_EDITOR) {
|
||||
cc.engine.repaintInEditMode();
|
||||
}
|
||||
|
@@ -68,14 +68,14 @@ function ConvexPartition(vertices) {
|
||||
var list = [];
|
||||
var d, lowerDist, upperDist;
|
||||
var p;
|
||||
var lowerInt = cc.v2();
|
||||
var upperInt = cc.v2(); // intersection points
|
||||
var lowerInt = null;
|
||||
var upperInt = null; // intersection points
|
||||
var lowerIndex = 0, upperIndex = 0;
|
||||
var lowerPoly, upperPoly;
|
||||
|
||||
for (var i = 0; i < vertices.length; ++i) {
|
||||
if (Reflex(i, vertices)) {
|
||||
lowerDist = upperDist = 10e7; // std::numeric_limits<qreal>::max();
|
||||
lowerDist = upperDist = Number.MAX_SAFE_INTEGER || 9999999999999; // std::numeric_limits<qreal>::max();
|
||||
for (var j = 0; j < vertices.length; ++j) {
|
||||
// if line intersects with an edge
|
||||
if (Left(At(i - 1, vertices), At(i, vertices), At(j, vertices)) &&
|
||||
|
@@ -316,12 +316,12 @@ cc.macro = {
|
||||
|
||||
/**
|
||||
* !#en
|
||||
* Whether to clear the original image cache after uploaded a texture to GPU. If cleared, [Dynamic Atlas](https://docs.cocos.com/creator/manual/en/advanced-topics/dynamic-atlas.html) will not be supported.
|
||||
* Whether to clear the original image cache after uploaded a texture to GPU. If cleared, [Dynamic Atlas](https://docs.cocos.com/creator/2.4/manual/en/advanced-topics/dynamic-atlas.html) will not be supported.
|
||||
* Normally you don't need to enable this option on the web platform, because Image object doesn't consume too much memory.
|
||||
* But on WeChat Game platform, the current version cache decoded data in Image object, which has high memory usage.
|
||||
* So we enabled this option by default on WeChat, so that we can release Image cache immediately after uploaded to GPU.
|
||||
* !#zh
|
||||
* 是否在将贴图上传至 GPU 之后删除原始图片缓存,删除之后图片将无法进行 [动态合图](https://docs.cocos.com/creator/manual/zh/advanced-topics/dynamic-atlas.html)。
|
||||
* 是否在将贴图上传至 GPU 之后删除原始图片缓存,删除之后图片将无法进行 [动态合图](https://docs.cocos.com/creator/2.4/manual/zh/advanced-topics/dynamic-atlas.html)。
|
||||
* 在 Web 平台,你通常不需要开启这个选项,因为在 Web 平台 Image 对象所占用的内存很小。
|
||||
* 但是在微信小游戏平台的当前版本,Image 对象会缓存解码后的图片数据,它所占用的内存空间很大。
|
||||
* 所以我们在微信平台默认开启了这个选项,这样我们就可以在上传 GL 贴图之后立即释放 Image 对象的内存,避免过高的内存占用。
|
||||
|
@@ -32,8 +32,8 @@ function beforeSceneLoad() {
|
||||
let _enabled = false;
|
||||
|
||||
/**
|
||||
* !#en Manage Dynamic Atlas Manager. Dynamic Atlas Manager is used for merging textures at runtime, see [Dynamic Atlas](https://docs.cocos.com/creator/manual/en/advanced-topics/dynamic-atlas.html) for details.
|
||||
* !#zh 管理动态图集。动态图集用于在运行时对贴图进行合并,详见 [动态合图](https://docs.cocos.com/creator/manual/zh/advanced-topics/dynamic-atlas.html)。
|
||||
* !#en Manage Dynamic Atlas Manager. Dynamic Atlas Manager is used for merging textures at runtime, see [Dynamic Atlas](https://docs.cocos.com/creator/2.4/manual/en/advanced-topics/dynamic-atlas.html) for details.
|
||||
* !#zh 管理动态图集。动态图集用于在运行时对贴图进行合并,详见 [动态合图](https://docs.cocos.com/creator/2.4/manual/zh/advanced-topics/dynamic-atlas.html)。
|
||||
* @class DynamicAtlasManager
|
||||
*/
|
||||
let dynamicAtlasManager = {
|
||||
@@ -41,8 +41,8 @@ let dynamicAtlasManager = {
|
||||
Rect: Rect,
|
||||
|
||||
/**
|
||||
* !#en Enable or disable the dynamic atlas, see [Dynamic Atlas](https://docs.cocos.com/creator/manual/en/advanced-topics/dynamic-atlas.html) for details.
|
||||
* !#zh 开启或者关闭动态图集,详见 [动态合图](https://docs.cocos.com/creator/manual/zh/advanced-topics/dynamic-atlas.html)。
|
||||
* !#en Enable or disable the dynamic atlas, see [Dynamic Atlas](https://docs.cocos.com/creator/2.4/manual/en/advanced-topics/dynamic-atlas.html) for details.
|
||||
* !#zh 开启或者关闭动态图集,详见 [动态合图](https://docs.cocos.com/creator/2.4/manual/zh/advanced-topics/dynamic-atlas.html)。
|
||||
* @property enabled
|
||||
* @type {Boolean}
|
||||
*/
|
||||
@@ -192,6 +192,7 @@ let dynamicAtlasManager = {
|
||||
* !#zh 添加碎图进入动态图集。
|
||||
* @method insertSpriteFrame
|
||||
* @param {SpriteFrame} spriteFrame
|
||||
* @return {Object} frame
|
||||
*/
|
||||
insertSpriteFrame(spriteFrame) {
|
||||
if (CC_EDITOR) return null;
|
||||
|
@@ -25,6 +25,8 @@
|
||||
|
||||
import MotionStreakAssembler from "./motion-streak";
|
||||
import { vfmtPosUvColorTexId } from '../../webgl/vertex-format';
|
||||
import Mat4 from '../../../value-types/mat4';
|
||||
|
||||
const MotionStreak = require('../../../components/CCMotionStreak');
|
||||
const RenderFlow = require('../../render-flow');
|
||||
|
||||
@@ -47,6 +49,7 @@ Point.prototype.setDir = function (x, y) {
|
||||
|
||||
let _normal = cc.v2();
|
||||
let _vec2 = cc.v2();
|
||||
let _worldMat = new Mat4();
|
||||
|
||||
function normal (out, dir) {
|
||||
//get perpendicular
|
||||
@@ -74,14 +77,14 @@ export default class MultiMotionStreakAssembler extends MotionStreakAssembler {
|
||||
let stroke = comp._stroke / 2;
|
||||
|
||||
let node = comp.node;
|
||||
let matrix = node._worldMatrix.m;
|
||||
let tx = matrix[12], ty = matrix[13];
|
||||
node.getWorldMatrix(_worldMat);
|
||||
let tx = _worldMat.m[12], ty = _worldMat.m[13];
|
||||
|
||||
let points = comp._points;
|
||||
let lastPos = comp._lastWPos;
|
||||
let fadeTime = comp._fadeTime;
|
||||
|
||||
let moved = lastPos.x !== tx || lastPos.y !== ty;
|
||||
let moved = comp._lastWPosUpdated && (lastPos.x !== tx || lastPos.y !== ty);
|
||||
if (moved) {
|
||||
let cur;
|
||||
let newHead = false;
|
||||
@@ -126,7 +129,8 @@ export default class MultiMotionStreakAssembler extends MotionStreakAssembler {
|
||||
|
||||
lastPos.x = tx;
|
||||
lastPos.y = ty;
|
||||
|
||||
comp._lastWPosUpdated = true;
|
||||
|
||||
if (points.length < 2) {
|
||||
return;
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
import Assembler2D from '../../assembler-2d';
|
||||
import Mat4 from '../../../value-types/mat4';
|
||||
|
||||
const RenderFlow = require('../../render-flow');
|
||||
|
||||
@@ -48,6 +49,7 @@ let _tangent = cc.v2();
|
||||
let _miter = cc.v2();
|
||||
let _normal = cc.v2();
|
||||
let _vec2 = cc.v2();
|
||||
let _worldMat = new Mat4();
|
||||
|
||||
function normal (out, dir) {
|
||||
//get perpendicular
|
||||
@@ -91,14 +93,14 @@ export default class MotionStreakAssembler extends Assembler2D {
|
||||
let stroke = comp._stroke / 2;
|
||||
|
||||
let node = comp.node;
|
||||
let matrix = node._worldMatrix.m;
|
||||
let tx = matrix[12], ty = matrix[13];
|
||||
node.getWorldMatrix(_worldMat);
|
||||
let tx = _worldMat.m[12], ty = _worldMat.m[13];
|
||||
|
||||
let points = comp._points;
|
||||
let lastPos = comp._lastWPos;
|
||||
let fadeTime = comp._fadeTime;
|
||||
|
||||
let moved = lastPos.x !== tx || lastPos.y !== ty;
|
||||
let moved = comp._lastWPosUpdated && (lastPos.x !== tx || lastPos.y !== ty);
|
||||
if (moved) {
|
||||
let cur;
|
||||
let newHead = false;
|
||||
@@ -143,7 +145,8 @@ export default class MotionStreakAssembler extends Assembler2D {
|
||||
|
||||
lastPos.x = tx;
|
||||
lastPos.y = ty;
|
||||
|
||||
comp._lastWPosUpdated = true;
|
||||
|
||||
if (points.length < 2) {
|
||||
return;
|
||||
}
|
||||
|
@@ -820,6 +820,18 @@ var ParticleSystem = cc.Class({
|
||||
}
|
||||
},
|
||||
|
||||
onRestore: CC_EDITOR && function () {
|
||||
// Because undo/redo will not call onEnable/onDisable,
|
||||
// we need call onEnable/onDisable manually to active/disactive children nodes.
|
||||
if (this.enabledInHierarchy) {
|
||||
this.node._renderComponent = null;
|
||||
this.onEnable();
|
||||
}
|
||||
else {
|
||||
this.onDisable();
|
||||
}
|
||||
},
|
||||
|
||||
_startPreview: CC_EDITOR && function () {
|
||||
if (this.preview) {
|
||||
this.resetSystem();
|
||||
|
@@ -1,33 +1,33 @@
|
||||
module.exports = {
|
||||
'COMPONENT': {
|
||||
"help_url": {
|
||||
"audiosource": "https://docs.cocos.com/creator/manual/en/components/audiosource.html",
|
||||
"animation": "https://docs.cocos.com/creator/manual/en/components/animation.html",
|
||||
"sprite": "https://docs.cocos.com/creator/manual/en/components/sprite.html",
|
||||
"label": "https://docs.cocos.com/creator/manual/en/components/label.html",
|
||||
"canvas": "https://docs.cocos.com/creator/manual/en/components/canvas.html",
|
||||
"spine": "https://docs.cocos.com/creator/manual/en/components/spine.html",
|
||||
"widget": "https://docs.cocos.com/creator/manual/en/components/widget.html",
|
||||
"button": "https://docs.cocos.com/creator/manual/en/components/button.html",
|
||||
"progressbar": "https://docs.cocos.com/creator/manual/en/components/progress.html",
|
||||
"mask": "https://docs.cocos.com/creator/manual/en/components/mask.html",
|
||||
"scrollview": "https://docs.cocos.com/creator/manual/en/components/scrollview.html",
|
||||
"scrollbar": "https://docs.cocos.com/creator/manual/en/components/scrollbar.html",
|
||||
"layout": "https://docs.cocos.com/creator/manual/en/components/layout.html",
|
||||
"tiledmap": "https://docs.cocos.com/creator/manual/en/components/tiledmap.html",
|
||||
"editbox": "https://docs.cocos.com/creator/manual/en/components/editbox.html",
|
||||
"videoplayer": "https://docs.cocos.com/creator/manual/en/components/videoplayer.html",
|
||||
"motionStreak": "https://docs.cocos.com/creator/manual/en/components/motion-streak.html",
|
||||
"richtext": "https://docs.cocos.com/creator/manual/en/components/richtext.html",
|
||||
"pageview": "https://docs.cocos.com/creator/manual/en/components/pageview.html",
|
||||
"pageviewIndicator": "https://docs.cocos.com/creator/manual/en/components/pageviewindicator.html",
|
||||
"toggle": "https://docs.cocos.com/creator/manual/en/components/toggle.html",
|
||||
"toggleGroup": "https://docs.cocos.com/creator/manual/en/components/toggleGroup.html",
|
||||
"toggleContainer": "https://docs.cocos.com/creator/manual/en/components/toggleContainer.html",
|
||||
"slider": "https://docs.cocos.com/creator/manual/en/components/slider.html",
|
||||
"block_input_events": "https://docs.cocos.com/creator/manual/en/components/block-input-events.html",
|
||||
"subcontext_view": "https://docs.cocos.com/creator/manual/en/publish/publish-wechatgame-sub-domain.html",
|
||||
"safe_area": "https://docs.cocos.com/creator/manual/en/components/safearea.html"
|
||||
"audiosource": "https://docs.cocos.com/creator/2.4/manual/en/components/audiosource.html",
|
||||
"animation": "https://docs.cocos.com/creator/2.4/manual/en/components/animation.html",
|
||||
"sprite": "https://docs.cocos.com/creator/2.4/manual/en/components/sprite.html",
|
||||
"label": "https://docs.cocos.com/creator/2.4/manual/en/components/label.html",
|
||||
"canvas": "https://docs.cocos.com/creator/2.4/manual/en/components/canvas.html",
|
||||
"spine": "https://docs.cocos.com/creator/2.4/manual/en/components/spine.html",
|
||||
"widget": "https://docs.cocos.com/creator/2.4/manual/en/components/widget.html",
|
||||
"button": "https://docs.cocos.com/creator/2.4/manual/en/components/button.html",
|
||||
"progressbar": "https://docs.cocos.com/creator/2.4/manual/en/components/progress.html",
|
||||
"mask": "https://docs.cocos.com/creator/2.4/manual/en/components/mask.html",
|
||||
"scrollview": "https://docs.cocos.com/creator/2.4/manual/en/components/scrollview.html",
|
||||
"scrollbar": "https://docs.cocos.com/creator/2.4/manual/en/components/scrollbar.html",
|
||||
"layout": "https://docs.cocos.com/creator/2.4/manual/en/components/layout.html",
|
||||
"tiledmap": "https://docs.cocos.com/creator/2.4/manual/en/components/tiledmap.html",
|
||||
"editbox": "https://docs.cocos.com/creator/2.4/manual/en/components/editbox.html",
|
||||
"videoplayer": "https://docs.cocos.com/creator/2.4/manual/en/components/videoplayer.html",
|
||||
"motionStreak": "https://docs.cocos.com/creator/2.4/manual/en/components/motion-streak.html",
|
||||
"richtext": "https://docs.cocos.com/creator/2.4/manual/en/components/richtext.html",
|
||||
"pageview": "https://docs.cocos.com/creator/2.4/manual/en/components/pageview.html",
|
||||
"pageviewIndicator": "https://docs.cocos.com/creator/2.4/manual/en/components/pageviewindicator.html",
|
||||
"toggle": "https://docs.cocos.com/creator/2.4/manual/en/components/toggle.html",
|
||||
"toggleGroup": "https://docs.cocos.com/creator/2.4/manual/en/components/toggleGroup.html",
|
||||
"toggleContainer": "https://docs.cocos.com/creator/2.4/manual/en/components/toggleContainer.html",
|
||||
"slider": "https://docs.cocos.com/creator/2.4/manual/en/components/slider.html",
|
||||
"block_input_events": "https://docs.cocos.com/creator/2.4/manual/en/components/block-input-events.html",
|
||||
"subcontext_view": "https://docs.cocos.com/creator/2.4/manual/en/publish/publish-wechatgame-sub-domain.html",
|
||||
"safe_area": "https://docs.cocos.com/creator/2.4/manual/en/components/safearea.html"
|
||||
},
|
||||
"animation": {
|
||||
"default_clip": "When checking, the deault animation clip is automatically played.",
|
||||
|
@@ -1,33 +1,33 @@
|
||||
module.exports = {
|
||||
'COMPONENT': {
|
||||
"help_url": {
|
||||
"audiosource": "https://docs.cocos.com/creator/manual/zh/components/audiosource.html",
|
||||
"animation": "https://docs.cocos.com/creator/manual/zh/components/animation.html",
|
||||
"sprite": "https://docs.cocos.com/creator/manual/zh/components/sprite.html",
|
||||
"label": "https://docs.cocos.com/creator/manual/zh/components/label.html",
|
||||
"canvas": "https://docs.cocos.com/creator/manual/zh/components/canvas.html",
|
||||
"spine": "https://docs.cocos.com/creator/manual/zh/components/spine.html",
|
||||
"widget": "https://docs.cocos.com/creator/manual/zh/components/widget.html",
|
||||
"button": "https://docs.cocos.com/creator/manual/zh/components/button.html",
|
||||
"progressbar": "https://docs.cocos.com/creator/manual/zh/components/progress.html",
|
||||
"mask": "https://docs.cocos.com/creator/manual/zh/components/mask.html",
|
||||
"scrollview": "https://docs.cocos.com/creator/manual/zh/components/scrollview.html",
|
||||
"scrollbar": "https://docs.cocos.com/creator/manual/zh/components/scrollbar.html",
|
||||
"layout": "https://docs.cocos.com/creator/manual/zh/components/layout.html",
|
||||
"tiledmap": "https://docs.cocos.com/creator/manual/zh/components/tiledmap.html",
|
||||
"editbox": "https://docs.cocos.com/creator/manual/zh/components/editbox.html",
|
||||
"videoplayer": "https://docs.cocos.com/creator/manual/zh/components/videoplayer.html",
|
||||
"motionStreak": "https://docs.cocos.com/creator/manual/zh/components/motion-streak.html",
|
||||
"richtext": "https://docs.cocos.com/creator/manual/zh/components/richtext.html",
|
||||
"pageview": "https://docs.cocos.com/creator/manual/zh/components/pageview.html",
|
||||
"pageviewIndicator": "https://docs.cocos.com/creator/manual/zh/components/pageviewindicator.html",
|
||||
"toggle": "https://docs.cocos.com/creator/manual/zh/components/toggle.html",
|
||||
"toggleGroup": "https://docs.cocos.com/creator/manual/zh/components/toggleGroup.html",
|
||||
"toggleContainer": "https://docs.cocos.com/creator/manual/zh/components/toggleContainer.html",
|
||||
"slider": "https://docs.cocos.com/creator/manual/zh/components/slider.html",
|
||||
"block_input_events": "https://docs.cocos.com/creator/manual/zh/components/block-input-events.html",
|
||||
"subcontext_view": "https://docs.cocos.com/creator/manual/zh/publish/publish-wechatgame-sub-domain.html",
|
||||
"safe_area": "https://docs.cocos.com/creator/manual/zh/components/safearea.html",
|
||||
"audiosource": "https://docs.cocos.com/creator/2.4/manual/zh/components/audiosource.html",
|
||||
"animation": "https://docs.cocos.com/creator/2.4/manual/zh/components/animation.html",
|
||||
"sprite": "https://docs.cocos.com/creator/2.4/manual/zh/components/sprite.html",
|
||||
"label": "https://docs.cocos.com/creator/2.4/manual/zh/components/label.html",
|
||||
"canvas": "https://docs.cocos.com/creator/2.4/manual/zh/components/canvas.html",
|
||||
"spine": "https://docs.cocos.com/creator/2.4/manual/zh/components/spine.html",
|
||||
"widget": "https://docs.cocos.com/creator/2.4/manual/zh/components/widget.html",
|
||||
"button": "https://docs.cocos.com/creator/2.4/manual/zh/components/button.html",
|
||||
"progressbar": "https://docs.cocos.com/creator/2.4/manual/zh/components/progress.html",
|
||||
"mask": "https://docs.cocos.com/creator/2.4/manual/zh/components/mask.html",
|
||||
"scrollview": "https://docs.cocos.com/creator/2.4/manual/zh/components/scrollview.html",
|
||||
"scrollbar": "https://docs.cocos.com/creator/2.4/manual/zh/components/scrollbar.html",
|
||||
"layout": "https://docs.cocos.com/creator/2.4/manual/zh/components/layout.html",
|
||||
"tiledmap": "https://docs.cocos.com/creator/2.4/manual/zh/components/tiledmap.html",
|
||||
"editbox": "https://docs.cocos.com/creator/2.4/manual/zh/components/editbox.html",
|
||||
"videoplayer": "https://docs.cocos.com/creator/2.4/manual/zh/components/videoplayer.html",
|
||||
"motionStreak": "https://docs.cocos.com/creator/2.4/manual/zh/components/motion-streak.html",
|
||||
"richtext": "https://docs.cocos.com/creator/2.4/manual/zh/components/richtext.html",
|
||||
"pageview": "https://docs.cocos.com/creator/2.4/manual/zh/components/pageview.html",
|
||||
"pageviewIndicator": "https://docs.cocos.com/creator/2.4/manual/zh/components/pageviewindicator.html",
|
||||
"toggle": "https://docs.cocos.com/creator/2.4/manual/zh/components/toggle.html",
|
||||
"toggleGroup": "https://docs.cocos.com/creator/2.4/manual/zh/components/toggleGroup.html",
|
||||
"toggleContainer": "https://docs.cocos.com/creator/2.4/manual/zh/components/toggleContainer.html",
|
||||
"slider": "https://docs.cocos.com/creator/2.4/manual/zh/components/slider.html",
|
||||
"block_input_events": "https://docs.cocos.com/creator/2.4/manual/zh/components/block-input-events.html",
|
||||
"subcontext_view": "https://docs.cocos.com/creator/2.4/manual/zh/publish/publish-wechatgame-sub-domain.html",
|
||||
"safe_area": "https://docs.cocos.com/creator/2.4/manual/zh/components/safearea.html",
|
||||
},
|
||||
'animation': {
|
||||
'default_clip': '在勾选自动播放或调用 play() 时默认播放的动画 clip。',
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cocos-creator-js",
|
||||
"version": "2.4.9",
|
||||
"version": "2.4.10",
|
||||
"description": "Cocos Creator is a complete package of game development tools and workflow, including a game engine, resource management, scene editing, game preview, debug and publish one project to multiple platforms.",
|
||||
"homepage": "https://www.cocos.com",
|
||||
"license": "MIT",
|
||||
|
@@ -132,7 +132,7 @@ function defineDeprecatedMacroGetter (name, defaultValue) {
|
||||
recommandedUsage = 'cc.sys.platform === cc.sys.WECHAT_GAME_SUB';
|
||||
}
|
||||
else if (name === 'CC_WECHATGAME') {
|
||||
recommandedUsage = 'cc.sys.platform === cc.sys.WECHAT_GAME';
|
||||
recommandedUsage = 'cc.sys.platform === cc.sys.WECHAT_GAME';
|
||||
}
|
||||
else if (name === 'CC_QQPLAY') {
|
||||
recommandedUsage = 'cc.sys.platform === cc.sys.QQ_PLAY';
|
||||
@@ -185,7 +185,7 @@ else {
|
||||
defineMacro('CC_JSB', defined('jsb') && !CC_RUNTIME);
|
||||
}
|
||||
|
||||
// deprecated
|
||||
// deprecated
|
||||
const WECHATGAMESUB = !!(defined('wx') && wx.getSharedCanvas);
|
||||
const WECHATGAME = !!(defined('wx') && (wx.getSystemInfoSync || wx.getSharedCanvas));
|
||||
const QQPLAY = defined('bk');
|
||||
@@ -211,5 +211,5 @@ if (CC_DEV) {
|
||||
* If you post a bug to forum, please attach this flag.
|
||||
* @property {String} ENGINE_VERSION
|
||||
*/
|
||||
const engineVersion = '2.4.9';
|
||||
const engineVersion = '2.4.10';
|
||||
_global['CocosEngine'] = cc.ENGINE_VERSION = engineVersion;
|
||||
|
Reference in New Issue
Block a user