shareCostumeToTarget (costumeIndex, targetId) {
        this.emit('shareCostumeToTarget*');
        const originalCostume = this.editingTarget.getCostumes()[costumeIndex];
        const clone = Object.assign({}, originalCostume);
        const md5ext = `${clone.assetId}.${clone.dataFormat}`;
        return loadCostume(md5ext, clone, this.runtime).then(() => {
            const target = this.runtime.getTargetById(targetId);
            if (target) {
                target.addCostume(clone);
                target.setCostume(
                    target.getCostumes().length - 1
                );
            }
        });
    }
/**
     * Called when costumes are dragged from editing target to another target.
     * Sets the newly added costume as the current costume.
     * @param {!number} costumeIndex Index of the costume of the editing target to share.
     * @param {!string} targetId Id of target to add the costume.
     * @return {Promise} Promise that resolves when the new costume has been loaded.
     */
Called when costumes are dragged from editing target to another target.
Sets the newly added costume as the current costume.
@param {!number} costumeIndex Index of the costume of the editing target to share.
@param {!string} targetId Id of target to add the costume.
@return {Promise} Promise that resolves when the new costume has been loaded.
Called when costumes are dragged from editing target to another target . Sets the newly added costume as the current costume . @param { !number } costumeIndex Index of the costume of the editing target to share . @param { !string } targetId Id of target to add the costume . @return { Promise } Promise that resolves when the new costume has been loaded .
shareCostumeToTarget (costumeIndex, targetId) {
        this.emit('shareCostumeToTarget*');
        const originalCostume = this.editingTarget.getCostumes()[costumeIndex];
        const clone = Object.assign({}, originalCostume);
        const md5ext = `${clone.assetId}.${clone.dataFormat}`;
        return loadCostume(md5ext, clone, this.runtime).then(() => {
            const target = this.runtime.getTargetById(targetId);
            if (target) {
                target.addCostume(clone);
                target.setCostume(
                    target.getCostumes().length - 1
                );
            }
        });
    }
shareCostumeToTarget ( costumeIndex , targetId ) { this . emit ( 'shareCostumeToTarget*' ) ; const originalCostume = this . editingTarget . getCostumes ( ) [ costumeIndex ] ; const clone = Object . assign ( { } , originalCostume ) ; const md5ext = ` ${ clone . assetId } ${ clone . dataFormat } ` ; return loadCostume ( md5ext , clone , this . runtime ) . then ( ( ) => { const target = this . runtime . getTargetById ( targetId ) ; if ( target ) { target . addCostume ( clone ) ; target . setCostume ( target . getCostumes ( ) . length - 1 ) ; } } ) ; }
Called when costumes are dragged from editing target to another target.
Called when costumes are dragged from editing target to another target .