src/virtual-machine.js
/**
     * Add a costume to the current editing target.
     * @param {string} md5ext - the MD5 and extension of the costume to be loaded.
     * @param {!object} costumeObject Object representing the costume.
     * @property {int} skinId - the ID of the costume's render skin, once installed.
     * @property {number} rotationCenterX - the X component of the costume's origin.
     * @property {number} rotationCenterY - the Y component of the costume's origin.
     * @property {number} [bitmapResolution] - the resolution scale for a bitmap costume.
     * @returns {?Promise} - a promise that resolves when the costume has been added
     */
Add a costume to the current editing target.
@param {string} md5ext - the MD5 and extension of the costume to be loaded.
@param {!object} costumeObject Object representing the costume.
@property {int} skinId - the ID of the costume's render skin, once installed.
@property {number} rotationCenterX - the X component of the costume's origin.
@property {number} rotationCenterY - the Y component of the costume's origin.
@property {number} [bitmapResolution] - the resolution scale for a bitmap costume.
@returns {?Promise} - a promise that resolves when the costume has been added
Add a costume to the current editing target . @param { string } md5ext - the MD5 and extension of the costume to be loaded . @param { !object } costumeObject Object representing the costume . @property { int } skinId - the ID of the costume ' s render skin once installed . @property { number } rotationCenterX - the X component of the costume ' s origin . @property { number } rotationCenterY - the Y component of the costume ' s origin . @property { number } [ bitmapResolution ] - the resolution scale for a bitmap costume . @returns { ?Promise } - a promise that resolves when the costume has been added
addCostume (md5ext, costumeObject) {
        return loadCostume(md5ext, costumeObject, this.runtime).then(() => {
            this.editingTarget.addCostume(costumeObject);
            this.editingTarget.setCostume(
                this.editingTarget.getCostumes().length - 1
            );
        });
    }
addCostume ( md5ext , costumeObject ) { return loadCostume ( md5ext , costumeObject , this . runtime ) . then ( ( ) => { this . editingTarget . addCostume ( costumeObject ) ; this . editingTarget . setCostume ( this . editingTarget . getCostumes ( ) . length - 1 ) ; } ) ; }
Add a costume to the current editing target.
Add a costume to the current editing target .