- Joined
- Oct 3, 2020
- Messages
- 39
- Reaction score
- 48
- First Language
- chinese
- Primarily Uses
- RMMV
RMMZ in open_beta updates the nwjs from 0.48.4 to 0.69.1.
But performance degrades when the globalAlpha of CanvasRenderingContext2D is not 1.
It means performance degrades when the paintOpacity of Bitmap is not 255.
For example:
If the project runs with the code above in the nwjs in 0.69.1, the frame rate of the game will drop seriously.
But in the old 0.48.4 version of nwjs or the latest 0.70.1 version of nwjs , it works well without FPS dropping.
But performance degrades when the globalAlpha of CanvasRenderingContext2D is not 1.
It means performance degrades when the paintOpacity of Bitmap is not 255.
For example:
(($ = {}) => {
$.Spriteset_Map_createLowerLayer = Spriteset_Map.prototype.createLowerLayer;
Spriteset_Map.prototype.createLowerLayer = function() {
$.Spriteset_Map_createLowerLayer.apply(this,arguments);
this.addChild(this._testSprite = new Sprite(new Bitmap(Graphics.width,Graphics.height)));
this._testSprite.bitmap.paintOpacity = 200;
this._testSprite.update = function() {
this.bitmap.clear();
for (let i=0;i<30;i++) {
this.bitmap.fillRect(0,0,100,100,"#ff0000");
}
}
};
})();
If the project runs with the code above in the nwjs in 0.69.1, the frame rate of the game will drop seriously.
But in the old 0.48.4 version of nwjs or the latest 0.70.1 version of nwjs , it works well without FPS dropping.