Original Source
- Original title: Switching to Pixi-Picture rendering for Orange Overlay
- Original author: Nekohime1989
- Original date: March 27, 2019
- Source thread: https://forums.rpgmakerweb.com/threads/switching-to-pixi-picture-rendering-for-orange-overlay.107313/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Learning Javascript
Summary
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. 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/
Archived First Post
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.
/**
* 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);
}
}
}
};
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?
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...