Need some help getting started writing a plugin.
For reference I'll post a link to pixi-picture which is also included in the libs folder of RPG Maker prebuilt.
https://github.com/pixijs/pixi-picture
As it turns out it allows for overlay, softlight, and hardlight blendmodes to be applied. But only to sprites. Which is fine cause we have a tiling sprite implementation.
My question is how would I start off applying this to the rendering for layers in Hudell's Orange Overlay. Specifically the Light and Fog Layers. https://forums.rpgmakerweb.com/index.php?threads/orange-overlay.63524/
Okay this is weird...
Sprites already have this implemented.
Let me try something.
edit: yeah doesn't do anything it seems.
Oh wait I need to enable custom blendmodes. How do I do that?
For reference I'll post a link to pixi-picture which is also included in the libs folder of RPG Maker prebuilt.
https://github.com/pixijs/pixi-picture
As it turns out it allows for overlay, softlight, and hardlight blendmodes to be applied. But only to sprites. Which is fine cause we have a tiling sprite implementation.
My question is how would I start off applying this to the rendering for layers in Hudell's Orange Overlay. Specifically the Light and Fog Layers. https://forums.rpgmakerweb.com/index.php?threads/orange-overlay.63524/
Okay this is weird...
Sprites already have this implemented.
Code:
/**
* checks if we need to speed up custom blendmodes
* @param renderer
* @private
*/
Sprite.prototype._speedUpCustomBlendModes = function(renderer) {
var picture = renderer.plugins.picture;
var blend = this.blendMode;
if (renderer.renderingToScreen && renderer._activeRenderTarget.root) {
if (picture.drawModes[blend]) {
var stage = renderer._lastObjectRendered;
var f = stage._filters;
if (!f || !f[0]) {
setTimeout(function () {
var f = stage._filters;
if (!f || !f[0]) {
stage.filters = [Sprite.voidFilter];
stage.filterArea = new PIXI.Rectangle(0, 0, Graphics.width, Graphics.height);
}
}, 0);
}
}
}
};
edit: yeah doesn't do anything it seems.
Oh wait I need to enable custom blendmodes. How do I do that?
Last edited:

