Toradorable Animator

Library to use for Toradorable Animations on agar and deviants. Animations stored separately. To use, @require this first, then Animations.

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.org/scripts/24894/159298/Toradorable%20Animator.js

作者
Chris Beck (ChrisProductions)
版本
0.0.16
创建于
2016-11-16
更新于
2016-11-22
许可证
暂无

Library to use for Toradorable Animations on agar and deviants.
Animations stored separately.

To use, @require this first, then add any Animations you would like. (all animations in my repository will auto-include this library if it wasn't already added)

To play the currently selected animation, call
animator.playAnimation();
NOTE: playAnimation requires per-site functions that are not included with this library.
You can find per-site functions in the link at the bottom.

To stop playing the current animation, call
animator.pauseAnimation();

To select the next/prev animation, call
animator.nextAnimation(); animator.prevAnimation();
Note that next/prev do not change the playing status. If we are already playing, we will seamlessly switch over to the new animation.

To add your own animations, type
animator.addAnimation({
title: "Name Of Your Animation",
// Optional Default display time, used when/if a frame does not have a time specified.
defaultDisplayTime: 1000,
frames: [
//time: Optional display time for this frame in milliseconds,
//url: "http://Link/To/Your/Image.png",
//nick: "Optional Nick to use if applicable. Most sites do not allow you to change your nick in game."
{time: 500, url: "https://s22.postimg.org/jha3867up/image.png", nick: "To"},
{time: 500, url: "https://s22.postimg.org/jrhlrimgx/image.png", nick: "Ra"},
{time: 500, url: "https://s22.postimg.org/6xjjy691d/image.png", nick: "Do"},
{time: 500, url: "https://s22.postimg.org/idpyw7n7l/Ra2.png", nick: "Ra"},
{time: 500, url: "https://s22.postimg.org/inxhfk1tt/exclam.png", nick: "!"},
{time: 2000, url: "https://s18.postimg.org/tl8xraeux/Taiga_square.png", nick: "Toradora!"}
]
})'

To import a skinList, type
animator.importSkinList(
// First argument is a skin list array.
// Below is iWubbz's candy skinList, all credit for thease images goes to them.
// https://greasyfork.org/en/scripts/23677-iwubbz-candy-skin-changer/code
["http://i.imgur.com/1JQqUzR.png",
"http://i.imgur.com/VKcEy4k.png",
"http://i.imgur.com/FKsf0PC.png",
"http://i.imgur.com/zg6Oxzo.png",
"http://i.imgur.com/EPawa6H.png",
"http://i.imgur.com/NyKl8tG.png"
],
// Second argument is optional. However, I recomend setting title at the least.
//defaultDisplayTime is 1000 (1 second) by default.
//All frames will be displayed for defaultDisplayTime milliseconds.
//Use animator.addAnimation if you want different display times per frame.
{title: "iWubbz's Candy", defaultDisplayTime: 5000}
);
^^ Importing skin lists is as easy as stealing candy from iWubbz. ^^

Note that this is just the Toradorable animator library.
Keybindings, Animations, and per-site functions are stored separately.

If you need Animations, Keybindings, and Per-Site functions, look in
https://greasyfork.org/en/users/79223-Toradorable
per-site scripts are labled "Toradorable Site.extention". NOTE: All per-site scripts already include this library.
animations are labeled "TitleOfAnimation Animation for Toradorable Skin Changer"
and extensions are labeled "FunctionOfLibrary Extension for Toradorable Skin Changer"