Merge pull request #2173 from jareguo/v1.7-release

fix api
This commit is contained in:
Jare Guo
2017-12-08 16:13:22 +08:00
committed by GitHub
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -832,7 +832,7 @@ function declareProperties (cls, className, properties, baseClass, mixins, es6)
* @param {String} [options.name] - The class name used for serialization.
* @param {Function} [options.extends] - The base class.
* @param {Function} [options.ctor] - The constructor.
* @param {Function} [options.__ctor__] - The same as ctor, but less encapsulated.
* @param {Function} [options.__ctor__] - The same as ctor, but less encapsulated.
* @param {Object} [options.properties] - The property definitions.
* @param {Object} [options.statics] - The static members.
* @param {Function[]} [options.mixins]
+2 -2
View File
@@ -621,9 +621,9 @@ js.shiftArguments = function () {
};
/**
* #en
* !#en
* A simple wrapper of `Object.create(null)` which ensures the return object have no prototype (and thus no inherited members). So we can skip `hasOwnProperty` calls on property lookups. It is a worthwhile optimization than the `{}` literal when `hasOwnProperty` calls are necessary.
* #zh
* !#zh
* 该方法是对 `Object.create(null)` 的简单封装。`Object.create(null)` 用于创建无 prototype (也就无继承)的空对象。这样我们在该对象上查找属性时,就不用进行 `hasOwnProperty` 判断。在需要频繁判断 `hasOwnProperty` 时,使用这个方法性能会比 `{}` 更高。
*
* @method createMap
+2 -2
View File
@@ -355,8 +355,8 @@ cc.SpriteFrame = cc.Class(/** @lends cc.SpriteFrame# */{
},
/**
* #en Set SpriteFrame with Texture, rect, rotated, offset and originalSize.<br/>
* #zh 通过 Texture,rect,rotated,offset 和 originalSize 设置 SpriteFrame
* !#en Set SpriteFrame with Texture, rect, rotated, offset and originalSize.<br/>
* !#zh 通过 Texture,rect,rotated,offset 和 originalSize 设置 SpriteFrame
* @method setTexture
* @param {String|Texture2D} textureOrTextureFile
* @param {Rect} [rect=null]
+2 -2
View File
@@ -112,8 +112,8 @@ var textureCache = /** @lends cc.textureCache# */{
},
/**
* #en get all textures
* #zh 获取所有贴图
* !#en get all textures
* !#zh 获取所有贴图
* @method getAllTextures
* @return {Texture2D[]}
*/