src/SpriteFrameCache.js
function (opts) {
        var name = opts.name || opts

        var frame = this.spriteFrames[name]

        if (!frame) {
            // No frame, look for an alias
            var key = this.spriteFrameAliases[name]

            if (key) {
                frame = this.spriteFrames[key]
            }

            if (!frame) {
                throw "Unable to find frame: " + name
            }
        }

        return frame
    }
function (opts) {
        var name = opts.name || opts

        var frame = this.spriteFrames[name]

        if (!frame) {
            // No frame, look for an alias
            var key = this.spriteFrameAliases[name]

            if (key) {
                frame = this.spriteFrames[key]
            }

            if (!frame) {
                throw "Unable to find frame: " + name
            }
        }

        return frame
    }
function ( opts ) { var name = opts . name || opts var frame = this . spriteFrames [ name ] if ( ! frame ) { // No frame, look for an alias var key = this . spriteFrameAliases [ name ] if ( key ) { frame = this . spriteFrames [ key ] } if ( ! frame ) { throw "Unable to find frame: " + name } } return frame }
Get a single SpriteFrame

@param {String} opts.name The name of the sprite frame
@returns {cocos.SpriteFrame} The sprite frame
Get a single SpriteFrame