GIF/Video skin template for Jstris
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:
■ Note about VIDEO skins: