async makeScene(picture) {
        return new Promise(async (resolve, reject) => {
            let sceneName = picture.split("%20")[0].split(".(svg|png|jpg|jpeg|webm)")[0];

            const ogWidth = parseInt(this.mapWidth);
            const ogHeight = parseInt(this.mapHeight);

            const newWidth = parseInt(this.element.find("#mapX").val()) || ogWidth;
            const newHeight = parseInt(this.element.find("#mapY").val()) || ogHeight;

            const widthMultiplier = newWidth / ogWidth;
            const heightMultiplier = newHeight / ogHeight;

            //Create The Map Scene
            let sceneData = await Scene.create({
                name: sceneName,
                width: newWidth,
                height: newHeight,
                padding: 0.0,
                img: picture,
                // Flags for making pinfix work immediately.
                "flags.pinfix.enable": true,
                "flags.pinfix.minScale": 1,
                "flags.pinfix.maxScale": 1,
                "flags.pinfix.zoomFloor": 0.1,
                "flags.pinfix.zoomCeil": 3,
                "flags.pinfix.hudScale": 1,
            });

            await sceneData.activate();

            resolve([sceneData, widthMultiplier, heightMultiplier]);
        });
    }
/**
     * Make a new scene with the picture as the background
     *
     * @param  {string} picture    File path to the picture asset
     * @return {Scene}         New Scene to work on
     */
Make a new scene with the picture as the background
@param  {string} picture    File path to the picture asset
@return {Scene}         New Scene to work on
Make a new scene with the picture as the background @param { string } picture File path to the picture asset @return { Scene } New Scene to work on
async makeScene(picture) {
        return new Promise(async (resolve, reject) => {
            let sceneName = picture.split("%20")[0].split(".(svg|png|jpg|jpeg|webm)")[0];
            const ogWidth = parseInt(this.mapWidth);
            const ogHeight = parseInt(this.mapHeight);
            const newWidth = parseInt(this.element.find("#mapX").val()) || ogWidth;
            const newHeight = parseInt(this.element.find("#mapY").val()) || ogHeight;
            const widthMultiplier = newWidth / ogWidth;
            const heightMultiplier = newHeight / ogHeight;
            let sceneData = await Scene.create({
                name: sceneName,
                width: newWidth,
                height: newHeight,
                padding: 0.0,
                img: picture,
                "flags.pinfix.enable": true,
                "flags.pinfix.minScale": 1,
                "flags.pinfix.maxScale": 1,
                "flags.pinfix.zoomFloor": 0.1,
                "flags.pinfix.zoomCeil": 3,
                "flags.pinfix.hudScale": 1,
            });
            await sceneData.activate();
            resolve([sceneData, widthMultiplier, heightMultiplier]);
        });
    }
async makeScene ( picture ) { return new Promise ( async ( resolve , reject ) => { let sceneName = picture . split ( "%20" ) [ 0 ] . split ( ".(svg|png|jpg|jpeg|webm)" ) [ 0 ] ; const ogWidth = parseInt ( this . mapWidth ) ; const ogHeight = parseInt ( this . mapHeight ) ; const newWidth = parseInt ( this . element . find ( "#mapX" ) . val ( ) ) || ogWidth ; const newHeight = parseInt ( this . element . find ( "#mapY" ) . val ( ) ) || ogHeight ; const widthMultiplier = newWidth / ogWidth ; const heightMultiplier = newHeight / ogHeight ; let sceneData = await Scene . create ( { name : sceneName , width : newWidth , height : newHeight , padding : 0.0 , img : picture , "flags.pinfix.enable" : true , "flags.pinfix.minScale" : 1 , "flags.pinfix.maxScale" : 1 , "flags.pinfix.zoomFloor" : 0.1 , "flags.pinfix.zoomCeil" : 3 , "flags.pinfix.hudScale" : 1 , } ) ; await sceneData . activate ( ) ; resolve ( [ sceneData , widthMultiplier , heightMultiplier ] ) ; } ) ; }
Make a new scene with the picture as the background
 @param  {string} picture    File path to the picture asset
 @return {Scene}         New Scene to work on
Make a new scene with the picture as the background @param { string } picture File path to the picture asset @return { Scene } New Scene to work on
//Create The Map Scene // Flags for making pinfix work immediately.