duplicateCostume (costumeIndex) {
        const originalCostume = this.editingTarget.getCostumes()[costumeIndex];
        this.emit('duplicateCostume*', {name: originalCostume.name});
        const clone = Object.assign({}, originalCostume);
        const md5ext = `${clone.assetId}.${clone.dataFormat}`;
        return loadCostume(md5ext, clone, this.runtime).then(() => {
            this.editingTarget.addCostume(clone, costumeIndex + 1);
            this.editingTarget.setCostume(costumeIndex + 1);
            this.emitTargetsUpdate();
        });
    }
/**
     * Duplicate the costume at the given index. Add it at that index + 1.
     * @param {!int} costumeIndex Index of costume to duplicate
     * @returns {?Promise} - a promise that resolves when the costume has been decoded and added
     */
Duplicate the costume at the given index. Add it at that index + 1.
@param {!int} costumeIndex Index of costume to duplicate
@returns {?Promise} - a promise that resolves when the costume has been decoded and added
Duplicate the costume at the given index . Add it at that index + 1 . @param { !int } costumeIndex Index of costume to duplicate @returns { ?Promise } - a promise that resolves when the costume has been decoded and added
duplicateCostume (costumeIndex) {
        const originalCostume = this.editingTarget.getCostumes()[costumeIndex];
        this.emit('duplicateCostume*', {name: originalCostume.name});
        const clone = Object.assign({}, originalCostume);
        const md5ext = `${clone.assetId}.${clone.dataFormat}`;
        return loadCostume(md5ext, clone, this.runtime).then(() => {
            this.editingTarget.addCostume(clone, costumeIndex + 1);
            this.editingTarget.setCostume(costumeIndex + 1);
            this.emitTargetsUpdate();
        });
    }
duplicateCostume ( costumeIndex ) { const originalCostume = this . editingTarget . getCostumes ( ) [ costumeIndex ] ; this . emit ( 'duplicateCostume*' , { name : originalCostume . name } ) ; const clone = Object . assign ( { } , originalCostume ) ; const md5ext = ` ${ clone . assetId } ${ clone . dataFormat } ` ; return loadCostume ( md5ext , clone , this . runtime ) . then ( ( ) => { this . editingTarget . addCostume ( clone , costumeIndex + 1 ) ; this . editingTarget . setCostume ( costumeIndex + 1 ) ; this . emitTargetsUpdate ( ) ; } ) ; }
Duplicate the costume at the given index.
Duplicate the costume at the given index .