Skip to content

Instantly share code, notes, and snippets.

@elleonard
Created October 5, 2023 17:49
Show Gist options
  • Save elleonard/b3b343b9e3f503efbaa838f42ecf0984 to your computer and use it in GitHub Desktop.
Save elleonard/b3b343b9e3f503efbaa838f42ecf0984 to your computer and use it in GitHub Desktop.
RPGツクールMZ ピクチャの合成方法「乗算」と色調変更を併用すると真っ黒になるバグ対策プラグイン
/*:
* @target MZ
* @author DarkPlasma
* @plugindesc ピクチャの合成方法「乗算」と色調変更を使うと真っ黒になるバグ対策
*/
(() => {
'use strict';
function Sprite_Picture_BlendModeAndFilterMixIn(spritePicture) {
Object.defineProperty(spritePicture, "blendMode", {
get: function () {
return this._blendMode;
},
set: function (value) {
if (!this._colorFilter) {
this._createColorFilter();
}
this._colorFilter.blendMode = value;
},
configurable: true
});
}
Sprite_Picture_BlendModeAndFilterMixIn(Sprite_Picture.prototype);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment