MZ More battle transition effects (MV+MZ)

I know there are already some plugins with this feature. But it is fun to toy with JavaScript so I just want to create more.

You can check them out here:

Currently they are pretty much similar, just the method of erasing the map scene is different.
That's always a nice feature to have options for. I haven't downloaded it to look - can you make it randomly go between the styles?
That's always a nice feature to have options for. I haven't downloaded it to look - can you make it randomly go between the styles?
For now they are individual files. But I'm considering that.

ezgif-5-1cbe741d67.gif

Just added a new one (rotate box effect).
But I'm a bit unsure about this one, maybe it suits a menu transition better than a battle transition.
menu bit can work nicely as similar to 1 of zelda game between categories.
another one is map transition like if you go behind, you can go look around or
something like that.

but nice effect though.
Recently I tested the text transition plugin on higher version of nw.js, it took more than 400 ms to draw a single frame on a slower pc, and 200 ms on another, faster pc. The time is about 1-5 ms on nw.js 0.29, MV's built-in version.
I did some further test and confirmed text draw on canvas is much slower on newer versions, when it uses a font for the first time. The plugin I tested uses random text size, that is why it is so slow.

JavaScript:
var t = Date.now();
      for(var i=0;i<cnt;i++){ //cnt is 20
        ctx.save();
        ctx.font = (Math.random()*150 + 100) +  'px gamefont';
        ctx.fillText(SceneManager.maskText, Math.random()*cw,Math.random()*ch);
        ctx.restore();
      }
console.log(Date.now()-t);//200 ms to 400ms

Edit*
Strange, when I test with just a canvas instead of a RPGM game, there's no such difference between versions.

Edit 2*
Even more strange, when I use another font, such as serif, instead of gamefont, the mysterious lag is fixed. Another mystery to solve.
maybe preload font first can fix it? or doesn't matter if its preloaded or not?
I'm not sure. Actually the project I'm testing doesn't use the ttf file, it uses some local fonts from the css.

Example:

JavaScript:
@font-face {
    font-family: font1;
    src: local("ms gothic");
}

So if I use 'font1' as the font name, the lag is there. But if I use 'ms gothic' directly there's no such lag.
Most people use the ttf file anyway. So it is not really a problem.
that seems very weird, I cannot help with it, but it's strange.
hope you can figure it out.
Update:
Added a new plugin SceneTransition.js
The plugin allows you to add a transition effect to any scene. You can use the parameters to change default transition effect and effects for specific scenes, or leave the effect blank to use the default fadeout transition.
itch.io link:

Note:
You can simply replace previous plugins with this one.
Also keep in mind all those effects are using the same transition logic, that is you won't see a loading screen nor fadein/out. It works better for lite games, but if the next scene takes too long to load, it will look lke the screen is frozen for a moment. Caching the images before the transition may shorten the loading time.
Update:

Version 2.0 released.

Complete rewrite of canvas related functions, now use sprites and meshes for fast rendering speed.

Text transition has to use canvas to draw text. But it also uses a PIXI sprite mask filter, so canvas mode for MV is no longer supported.

Rotate box transition now can update the new scene screenshot every frame instead of every 14 frames.

The old version is still available for download.
love the melt effect, is there also a way to go upwards? maybe sidewards?
easier if possible rotation so they can pick?
Yeah there could be some more parameters.

Also the plugin can be easily extended. Just create a function that uses the two snapshot bitmaps (from two scenes) to create any effect you like.

In theory, with my preserve map scene plugin, both scene can be running at the same time, so in theory you can create a transition effect of two animated scenes, instead of just a static picture. Well, maybe I need to fix compatible issues of the two plugins first.
Hi, can I custom the transition based on your plugin? I want to make the transition what I like

I will share it once it done

Original thread: https://forums.rpgmakerweb.com/threads/more-battle-transition-effects-mv-mz.172357/