mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 08:42:43 +08:00
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -112,8 +112,8 @@ var textureCache = /** @lends cc.textureCache# */{
|
||||
},
|
||||
|
||||
/**
|
||||
* #en get all textures
|
||||
* #zh 获取所有贴图
|
||||
* !#en get all textures
|
||||
* !#zh 获取所有贴图
|
||||
* @method getAllTextures
|
||||
* @return {Texture2D[]}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user