Greasy Fork is available in English.

Pikachu Running GIF/Video Skin

GIF/Video skin template for Jstris

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
作者
Jstris Customization Database
1日のインストール数
0
累計インストール数
63
評価
0 0 0
バージョン
0.1
作成日
2019/08/02
更新日
2019/08/03
ライセンス
不明
対象サイト

Template for GIF skin: loadVideoSkin("https://i.imgur.com/MkhYjXB.gif",{skinify:true, colorize:true, colorAlpha:.7}) Template for Video skin: loadVideoSkin("https://s.jezevec10.com/res/vid/t360c.mp4",{sound:false})


loadVideoSkin(URL, Options)

■ URL - required, must be an https link to either GIF file or MP4/WEBM/OGG video skin. Dimensions are autodetected, standard aspect ratio for Jstris block skins is 9:1. Also check for possible CORS errors.

■ Options - optional, if provided, must be an Object which can contain: ○ For GIF skins: • skinify - (true/false) If the GIF does not have Jstris skin-format, enabling this option can simulate it. The effect is that the GIF is duplicated 9 times so it can be used for all block types. This discards original aspect ratio of the GIF. (default: false) • colorize - (true/false) If skinify option is enabled, this will colorize the GIF skin according to standard block colors. (default: false) • colorAlpha - (float 0-1) If colorize option is enabled, this controls opacity of the colorization layer, where 1 is the highest color saturation. (default: 0.7)

○ For Video skins: • sound - (true/false) if set to true, audio from the videoskin is not muted (default: false)

■ Note about GIF skins:

  • gifs with partial image replacement layers are not supported, gifs with cumulative combine layers will work
  • transparency will work, but in some browsers it can be glitched if the color under the aplha layer is not black

■ Note about VIDEO skins:

  • video blockskin will be looped, there can be a lag when the video jumps at the start if it is exported with higher compression (priming the player and refilling buffers takes longer).
  • Recommended videoskin codec is h264/avc1. If possible, export with higher amount of i-frames, no delta frames - equals to setting fixed GOP to 1 frame. Other option to avoid the lag on rewind is to export longer video that is already looped (there is no length limit, and html5 will fetch video by chunks).