Bind Pictures To Map conflicting with Yscale

Fighting against a maddening small bug.
I use bind pictures to map together with YScale, and every time the camera moves in a large map, the binded pictures slightly wobble.
Have a bad gif, look at the tree behind the character:
zNqvNju.gif


I believe I know why this is happening, but I can't seem fix it! It's because of this bit in bind pics to map:
Code:
    //=============================================================================
    // Game_Picture
    //=============================================================================
    /**
    * Fix to displayX's returned decimal value to hinder JS rounding errors
    */
    Game_Map.prototype.displayX = function() {
        return Math.ceil10(this._displayX, -8);
    };
    /**
    * Fix to displayY's returned decimal value to hinder JS rounding errors
    */
    Game_Map.prototype.displayY = function() {
        return Math.ceil10(this._displayY, -8);
    };
//=============================================================================
    // Math additions
    //=============================================================================
    /**
    * Decimal adjustment of a number.
    *
    * @param {String}  type  The type of adjustment.
    * @param {Number}  value The number.
    * @param {Integer} exp   The exponent (the 10 logarithm of the adjustment base).
    * @returns {Number} The adjusted value.
    */
    function decimalAdjust(type, value, exp) {
        // If the exp is undefined or zero...
        if (typeof exp === 'undefined' || +exp === 0) {
            return Math[type](value);
        }
        value = +value;
        exp = +exp;
        // If the value is not a number or the exp is not an integer...
        if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
            return NaN;
        }
        // Shift
        value = value.toString().split('e');
        value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
        // Shift back
        value = value.toString().split('e');
        return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
    }

    // Decimal ceil
    if (!Math.ceil10) {
        Math.ceil10 = function(value, exp) {
            return decimalAdjust('ceil', value, exp);
        };
    }

Since Yscale aliases Game_Map, the two functions get ignored - and thus the pictures get slightly missplacen every few steps due to rounding errors.

I'm pretty sure this is the issue, but Ihaven't managed to fix it on my own ;__; I tried pasting this code into Yscale and calling the function from there, but with no avail.
Will send cat pictures for help.
this is not decimal issu but bad code optimisation.
I had the same problem.
the problem is solved by optimizing the codes.

ex: this is very fast way, i not have time to explain or edit, i copy past my bindpicture code, look how i bindpicture.

ps: dont use
TDDP_BindPicturesToMap, is very poor optimised for game.
you can test with performance.now()
https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
PHP:
// PROTOTYPE RMMV
□─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// □ [spine] □ [setAngle] □ [setRot] □ [bindToMap] □ [bindToMap] □ [addProp]
// └─────────────────────────────────────────────□□□-Game_Picture-□□□───────────────────────────────────────────────────────────────┘
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
Game_Picture.prototype.addChild = function(objectSprite){ // simply add a custom var object (sprite) to child
        var CurrentSprite = SceneManager._scene._spriteset._pictureContainer.children[this._PID-1];
        CurrentSprite.width = 1600;
        CurrentSprite.height = 900;
        CurrentSprite.addChild(objectSprite);
        console.log('CurrentSprite: ', CurrentSprite);
        return this
    };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
Game_Picture.prototype.addMask = function(maskID){
        this._maskParent = maskID; // info about the mask
        var theMask = SceneManager._scene._spriteset._pictureContainer.children[maskID-1];
        var masked = SceneManager._scene._spriteset._pictureContainer.children[this._PID-1];
        masked.mask = theMask;
        return this
    };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
Game_Picture.prototype.spine = function(spineID){
        this._parentSpinePID = spineID; // parent Reference info
        var parentSpine = SceneManager._scene._spriteset._pictureContainer.children[spineID-1];
        var childSpine = SceneManager._scene._spriteset._pictureContainer.children[this._PID-1];
        childSpine.parent=parentSpine;
        return this
    };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
Game_Picture.prototype.setAngle = function(a){
        this._angle = a; return this
    };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
Game_Picture.prototype.setRot = function(r){
    this._rotationSpeed = r; return this
    };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
Game_Picture.prototype.bindToMap = function(){
    // voir si on peut ajouter le child a spritmap plutot TODO:
    this._BindToMap=true; return this
};
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
Game_Picture.prototype.addProp = function(prop){
    this._prop = prop; return this
};
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
    Game_Picture.prototype.show = function(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode) { // also will add pixi.matix
        this._PID = pictureId;
        this._name = name;
        this._origin = origin;
        this._x = x;
        this._y = y;
        this._scaleX = (typeof scaleX!=="number")&&100||scaleX;
        this._scaleY = (typeof scaleY!=="number")&&100||scaleY;
        this._opacity = (typeof opacity!=="number")&&255||opacity;
        this._blendMode = blendMode||0;
        this._angle = 0; //+
        this._rotationSpeed = 0; //+
        this._BindToMap = false; //+
        this._bindX=x;//+
        this._bindY=y; //+
        this._parentSpinePID = 0;
        this._hasPixiTxt = false; //  for easy delete
        this.initTarget();
        this.initTone();
    };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
    //$gameScreen._pictures[30].bindToMap()
    Game_Picture.prototype.bindToMap = function(aX,aY) {
        this._bindX = aX||($gameMap.displayX()*48)+this._x;
        this._bindY = aY||($gameMap.displayY()*48)+this._y;
        this._BindToMap = true;
    };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
    Game_Picture.prototype.update = function() {
        this.updateMove();
        this.updateTone();
        this.updateRotation();
        this.updateBindPos();//++
    };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
    Game_Picture.prototype.updateBindPos = function() {
        if(this._BindToMap){
            this._x = this._bindX-$gameMap._displayX*48;
            this._y = this._bindY-$gameMap._displayY*48;
        }
    };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑

very old video.
it show the same issu with the plugin?
Yeah, it's the same issue I'm having!

ex: this is very fast way, i not have time to explain or edit, i copy past my bindpicture code, look how i bindpicture.
Thanks for the help, but if I understood your script correctly, it lacks the ability to bind pictures above or below players.
That's the main feature I needed from Bind Pictures To Map... So your script is not really a solution

Original thread: https://forums.rpgmakerweb.com/threads/bind-pictures-to-map-conflicting-with-yscale.83653/