diff --git a/lib/LICENSE b/lib/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/lib/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/lib/README.md b/lib/README.md deleted file mode 100644 index 0843e4b..0000000 --- a/lib/README.md +++ /dev/null @@ -1,51 +0,0 @@ - - -# Live2D Widget - -Originally by [@stevenjoezhang](https://github.com/stevenjoezhang). - -## 更多 More - -更多内容可以参考: -https://imjad.cn/archives/lab/add-dynamic-poster-girl-with-live2d-to-your-blog-02 -https://github.com/xiazeyu/live2d-widget.js -https://github.com/summerscar/live2dDemo - -关于后端 API 模型: -https://github.com/fghrsh/live2d_api -https://github.com/xiazeyu/live2d-widget-models -https://github.com/xiaoski/live2d_models_collection - -除此之外,还有桌面版本: -https://github.com/amorist/platelet -https://github.com/akiroz/Live2D-Widget -https://github.com/zenghongtu/PPet -https://github.com/LikeNeko/L2dPetForMac - -以及 Wallpaper Engine: -https://github.com/guansss/nep-live2d - -## 许可证 License - -Released under the GNU General Public License v3 -http://www.gnu.org/licenses/gpl-3.0.html - -本仓库并不包含任何模型,用作展示的所有 Live2D 模型、图片、动作数据等版权均属于其原作者,仅供研究学习,不得用于商业用途。 - -Live2D 官方网站: -https://www.live2d.com/en/ -https://live2d.github.io - -Live2D Cubism Core は Live2D Proprietary Software License で提供しています。 -https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html -Live2D Cubism Components は Live2D Open Software License で提供しています。 -http://www.live2d.com/eula/live2d-open-software-license-agreement_en.html - -> The terms and conditions do prohibit modification, but obfuscating in `live2d.min.js` would not be considered illegal modification. - -https://community.live2d.com/discussion/140/webgl-developer-licence-and-javascript-question diff --git a/lib/autoload.js b/lib/autoload.js new file mode 100644 index 0000000..da581f1 --- /dev/null +++ b/lib/autoload.js @@ -0,0 +1,85 @@ +/* + * @Date: 15/02/2021 16.05.35 +0800 + * @Author: KnowsCount + * @LastEditTime: 19/06/2021 23.11.56 +0800 + * @FilePath: /@knowscount:live2d-widget/autoload.js + */ +// 注意:live2d_path 参数应使用绝对路径 +// const live2d_path = "https://cdn.jsdelivr.net/gh/nonsoft-dev/live2d-widget@master/"; +const live2d_path = '../' + +// 封装异步加载资源的方法 +function loadExternalResource(url, type) { + return new Promise((resolve, reject) => { + let tag + + if (type === 'css') { + tag = document.createElement('link') + tag.rel = 'stylesheet' + tag.href = url + tag.id = 'live2d_css' + } else if (type === 'js') { + tag = document.createElement('script') + tag.src = url + } + if (tag) { + tag.onload = () => resolve(url) + tag.onerror = () => reject(url) + document.head.appendChild(tag) + } + }) +} + +// 加载 waifu.css live2d.min.js waifu-tips.js +//if (screen.width >= 768) { +// "768"为最低显示宽度,单位为像素 +Promise.all([ + loadExternalResource(live2d_path + 'waifu_left.css', 'css'), + loadExternalResource(live2d_path + 'live2d.min.js', 'js'), + loadExternalResource(live2d_path + 'waifu-tips.js', 'js'), +]).then(() => { + initWidget({ + waifuPath: live2d_path + 'waifu-tips.json', + // apiPath: "https://live2d.fghrsh.net/api/", + cdnPath: 'https://cdn.jsdelivr.net/gh/fghrsh/live2d_api/', + }) +}) +//} + +// initWidget 第一个参数为 waifu-tips.json 的路径,第二个参数为 API 地址 +// API 后端可自行搭建,参考 https://github.com/fghrsh/live2d_api +// 初始化看板娘会自动加载指定目录下的 waifu-tips.json + +console.log(` + く__,.ヘヽ. / ,ー、 〉 + \ ', !-─‐-i / /´ + /`ー' L//`ヽ、 + / /, /| , , ', + イ / /-‐/ i L_ ハ ヽ! i + レ ヘ 7イ`ト レ'ァ-ト、!ハ| | + !,/7 '0' ´0iソ| | + |.从" _ ,,,, / |./ | + レ'| i>.、,,__ _,.イ / .i | + レ'| | / k_7_/レ'ヽ, ハ. | + | |/i 〈|/ i ,.ヘ | i | + .|/ / i: ヘ! \ | + kヽ>、ハ _,.ヘ、 /、! + !'〈//`T´', \ `'7'ーr' + レ'ヽL__|___i,___,ンレ|ノ + ト-,/ |___./ + 'ー' !_,.: +`) + +I18n.defaultLocale = 'en-US' +I18n.locale = 'en-US' + +I18n.translations = {} + +fetch('../i18n.json') + .then((res) => res.json()) + .then((data) => { + Object.keys(data).forEach((key) => { + console.log('key', key) + I18n.translations[key] = data[key] + }) + }) diff --git a/lib/demo/demo.html b/lib/demo/demo.html new file mode 100755 index 0000000..b64bee9 --- /dev/null +++ b/lib/demo/demo.html @@ -0,0 +1,81 @@ + + + + + + Live2D 看板娘 / Demo + + + + + + Language: + + + + + + + + + diff --git a/lib/i18n.json b/lib/i18n.json new file mode 100644 index 0000000..05a16fd --- /dev/null +++ b/lib/i18n.json @@ -0,0 +1,695 @@ +{ + "en-US": { + "mouseover": { + "waifu": { + "1": "What are you doing, put your hand away~~", + "2": "Mouse...the mouse is misplaced!", + "3": "What are you doing!!? Stop!", + "4": "Meow meow?", + "5": "AAAAAA go awayy!! (ノ≧∇≦)ノ", + "6": "Gross! Someone, help!!!", + "7": "I'll bite you~", + "8": "Im going to be angry, grr~", + "9": "Don't touch anything!!", + "10": "Really~~?", + "11": "Pervert" + }, + "waifu_tool_fa_comment": { + "1": "Guess what I'm going to say?", + "2": "I heard a lot of life experience from the frog prince's story." + }, + "waifu_tool_fa_paper_plane": { + "1": "Hey! Let's play paper plane war!", + "2": "This button says 'DO NOT CLICK'", + "3": "Why? Do you want to play a game with me", + "4": "I heard you can play like this and that" + }, + "waifu_tool_fa_user_circle": { + "1": "Are you not in love with me anymore, ohhh~", + "2": "Would you like to see my sisters?", + "3": "Want to see my sister?", + "4": "Do you want to switch the kanban girl?" + }, + "waifu_tool_fa_street_view": { + "1": "Do you like changing to PLAY?", + "2": "What are you going to play this time?", + "3": "Tadaaa!", + "4": "Let's see what happens next!" + }, + "waifu_tool_fa_camera_retro": { + "1": "You wanna take pictures of me? One, two, three~eggplant~", + "2": "Hey! let's take a group photo!", + "3": "Keep smiling~" + }, + "waifu_tool_fa_info_circle": { + "1": "Want to know more about me? ", + "2": "You are not a stalker, right ~~? ", + "3": "What do you want to know more about me? " + }, + "waifu_tool_fa_times": { + "1": "Is it time to say goodbye?", + "2": "Woo QAQ there will be an end...", + "3": "Don't abandon me...", + "4": "But..can we meet again~~?", + "5": "Hmph, you will regret it!!!" + }, + "menu_item_home_a": { + "1": "Click to go to the home page. If you want to go back to the previous page, you can use the browser's back function.", + "2": "Click it to return to the homepage!", + "3": "Go back to the homepage and take a look." + }, + "menu_item_about_a": { + "1": "Do you want to know who my master is?", + "2": "Here are some secrets about my host. Would you like to read it?", + "3": "Found the location of the owner!" + }, + "menu_item_tags_a": { + "1": "Click to see the tags of the article!", + "2": "Click to see all tags." + }, + "menu_item_categories_a": { + "1": "The articles are all classified~", + "2": "Click to view the article category." + }, + "menu_item_archieves_a": { + "1": "Is it troublesome to turn pages? Let's take a look at the article archive.", + "2": "The article catalog is organized here!" + }, + "menu_item_friends_a": { + "1": "This is my friends ヾ(◍°∇°◍)", + "2": "Would you like to visit my friend's house?", + "3": "Want to visit my friends?" + }, + "menu_item_search_a": { + "1": "Can't find what you want to see? Search for it!", + "2": "What are you looking for, do you need help?" + }, + "menu_item_a": { + "1": "Look at what's here?" + }, + "site_author": { + "1": "Does my owner look good?", + "2": "This is my owner (*´∇`*)" + }, + "site_state": { + "1": "This is the statistical information of the article~", + "2": "Would you like to click in and have a look?" + }, + "feed_link_a": { + "1": "You can use RSS to subscribe here!", + "2": "Using the feed subscriber, you can quickly know if the blog has been updated." + }, + "cc_opacity_post_copyright_author": { + "1": "Remember to reprint the standard.", + "2": "All articles adopt CC BY-NC-SA 4.0 license agreement~", + "3": "Before reprinting, please pay attention to the copyright agreement of the article." + }, + "links_of_author": { + "1": "This is my owner's address.", + "2": "Here is my owner's contact information!" + }, + "qrcode": { + "1": "It's very convenient to continue reading by scanning the phone~", + "2": "Sweep, open the door to a new world!" + }, + "fancybox_img_img_medium_zoom_image": { + "1": "Click on the picture to enlarge it!" + }, + "copy_btn": { + "1": "The code can be copied directly by clicking on it." + }, + "highlight_table_container_gist": { + "1": "GitHub! I'm a novice!", + "2": "PHP is the best language!" + }, + "a_href_mail_to": { + "1": "I promise I will reply to your email in time!", + "2": "Click to send email~" + }, + "a_href_tags": { + "1": "Want to see the {text} tag?", + "2": "Click it to view all articles under this label!" + }, + "a_href_categories": { + "1": "Want to see the {text} category?", + "2": "Click it to view all articles in this category!" + }, + "post_title_link": { + "1": "Want to read {text} this article?" + }, + "a_rel_contents": { + "1": "Click to read the full text." + }, + "a_itemprop_discussionUrl": { + "1": "Want to see the comments?" + }, + "bein_a": { + "1": "I also have a registered residence.", + "2": "My master is a good master who obeys the law." + }, + "container_a_href_http_nav_link_nav_text": { + "1": "Want to see {text}?", + "2": "Go to {text} for a stroll.", + "3": "Go to {text} to take a look." + }, + "back_to_top": { + "1": "Click it to go back to the top!", + "2": "Back to the original starting point~", + "3": "Do you want to go back to where you started?" + }, + "reward_container": { + "1": "Am I awesome~ Give me a thumbs up!", + "2": "Do you want to reward me? I look forward to it~", + "3": "The master is eating dirt recently. It looks very hard. Give him some money~" + }, + "wechat": { + "1": "This is my WeChat QR code~" + }, + "alipay": { + "1": "This is my Alipay!" + }, + "bitcoin": { + "1": "This is my Bitcoin account!" + }, + "needsharebutton_postbottom_btn": { + "1": "Good things must be known to more people.", + "2": "If you think the article is helpful, you can share it with more friends in need." + }, + "need_share_button_weibo": { + "1": "Weibo? Come and share a wave of meows!" + }, + "need_share_button_wechat": { + "1": "Share to WeChat!" + }, + "need_share_button_douban": { + "1": "It seems good to share on Douban!" + }, + "need_share_button_qqzone": { + "1": "QQ space, one-click forwarding, yeah~" + }, + "need_share_button_twitter": { + "1": "Twitter? It doesn't seem to exist?" + }, + "need_share_button_facebook": { + "1": "emmm...FB does not seem to exist?" + }, + "post_nav_item_a_rel_next": { + "1": "Let's take a look at the next article.", + "2": "Click it to see the next article!", + "3": "Do you want to turn to the next article?" + }, + "post_nav_item_a_rel_prev": { + "1": "Let's take a look at the previous article.", + "2": "Click it to read the previous article!", + "3": "Do you want to turn to the previous article?" + }, + "extend_next": { + "1": "Go to the next page and see.", + "2": "Click it to move forward!", + "3": "Do you want to turn to the next page?" + }, + "extend_prev": { + "1": "Go to the previous page and have a look.", + "2": "Click it to go back!", + "3": "Do you want to turn to the previous page?" + }, + "input_vnick": { + "1": "What should I call you?", + "2": "Leave your first name!" + }, + "vmail": { + "1": "Leave your mailbox, otherwise you will be a person without a profile picture!", + "2": "Remember to set up a Gravatar profile picture!", + "3": "In order to inform you of the latest news, be sure to leave your email address!" + }, + "vlink": { + "1": "Hurry up and tell me where your home is, so that I can visit it!" + }, + "veditor": { + "1": "Want to comment on something?", + "2": "Do you want to say something?", + "3": "Think the blog is good? Come and leave a message to communicate with the owner!" + }, + "vcontrol_a": { + "1": "Can you use Markdown proficiently?", + "2": "Use Markdown to make comments more beautiful~" + }, + "vemoji_btn": { + "1": "Do you want to insert a cute emoji?", + "2": "Do you want to come to express your love?" + }, + "vpreview_btn": { + "1": "Do you want to preview your speech?", + "2": "Look at how much negative entropy your comment has!" + }, + "vsubmit": { + "1": "The comments have not been reviewed, you are responsible for your own comments~", + "2": "Do you want to submit, please be patient and wait for the reply~" + }, + "vcontent": { + "1": "Wow, look at this wonderful review!", + "2": "If you have any questions, please leave a message as soon as possible~" + } + }, + "click": { + "waifu": { + "1": "Yes... I bumped into it accidentally...", + "2": "What is Lolicon?", + "3": "Did you see my little bear?", + "4": "If you touch it again, I will call the police! ⌇●﹏●⌇", + "5": "110? There is a pervert who has been touching me (ó﹏ò。)", + "6": "Don't touch me, I will tell my wife to hit you!", + "7": "Why move me! Be careful I bite you!", + "8": "Don't touch me, what is there to touch??!" + }, + "veditor": { + "1": "What are you going to complain about?", + "2": "You must fill in meow carefully~", + "3": "Is there anything you want to say?" + }, + "vsubmit": { + "1": "Enter the verification code to submit a comment~" + } + }, + "seasons": { + "1": "New Year's Day, the new year has begun again, this year is {year}~", + "2": "It's another year Valentine's Day, I found the object in {year}~", + "3": "Today is International Women's Day!", + "4": "Today is Arbor Day, protect the environment!", + "5": "Tell you a secret quietly~Today is April Fool's Day, don't be fooled~", + "6": "Today is Labor Day, have you planned where to go for the holiday~", + "7": "Children's Day is now, happy time is always short, it would be great if it never grows up...", + "8": "The Victory Day of the Chinese People’s War of Resistance Against Japanese Aggression, remembering history, remembering the martyrs, cherishing peace, and creating the future.", + "9": "Teacher's Day, I want to say hello to the teacher in school~", + "10": "National Day is here, for the motherland’s birthday!", + "11": "Who did you spend with this year's Double Eleven~", + "12": "These days are Christmas, the owner must have gone shopping again~" + }, + "general": { + "longtime": { + "1": "Long time no see, time flies so fast...", + "2": "Hey! How long have you been ignoring me~~", + "3": "Hi~ Come and play with me!", + "4": "Take this punch~!" + }, + "camera": { + "1": "Yay, it's taken. Isn't it cute?" + }, + "exit": { + "1": "May you meet this important person again one day!" + }, + "console": { + "1": "Haha, you opened the console, do you want to see my little secret?" + }, + "copy": { + "1": "What have you copied? Remember to add the source for reprinting!" + }, + "visibilityChange": { + "1": "Wow, finally, you're back!" + }, + "dress": { + "1": "Does my new dress look good?", + "2": "How is my new dress?" + } + }, + "time": { + "5_7": "Good morning! The plan for a day lies in the morning, and a beautiful day is about to begin.", + "7_11": "Good morning! Don't sit for a long time, get up and move around!!", + "11_13": "It's noon! Can I take a break? It's lunch time!!", + "13_17": "It's easy to get sleepy in the afternoon. Have you done any sports today?", + "17_19": "It's evening! The sunset outside the window is very beautiful~", + "19_21": "Good evening, how are you doing today?", + "21_23": { + "1": "It's already so late, rest early, good night~", + "2": "Take care of your eyes late at night!" + }, + "24": "Are you a night owl? If you don't go to bed so late, will you get up tomorrow?" + }, + "welcome": { + "1": "Welcome to 「%{data}」", + "2": "Hello! Welcome from Baidu Search
You are searching 「%{data}」. Did you find it?", + "3": "Hello! Welcome from 360 Search
You are searching 「%{data}」. Did you find it?", + "4": "Hello! Friends from Google Search
You are searching 「${data}」. Did you find it?", + "5": "Hello from 「%{data}」. Welcome!", + "6": "Welcome to read「%{data}」" + }, + "hikoto": { + "1": "This sentence come from 「%{source}」,by %{author} from hitokoto.cn." + }, + "来自 Potion Maker 的 Pio 酱 ~": "Hi, I'm Potion Maker Pio!", + "来自 Potion Maker 的 Tia 酱 ~": "Hi, I'm Potion Maker Tia!", + "来自 Bilibili Live 的 22 哦 ~": "22 from Bilibili Live", + "来自 Bilibili Live 的 33 的说": "33 from Bilibili Live", + "Shizuku Talk !这里是 Shizuku ~": "Hi, I'm Shizuku from Shizuku Talk!", + "Nep! Nep! 超次元游戏:海王星 系列": "Nep, Nep, Nep, Nep! ", + "艦隊これくしょん / 叢雲(むらくも)": "Kantai Collection / Murakumo" + + }, + "zh-CN": { + "mouseover": { + "waifu": { + "1": "干嘛呢你,快把手拿开~~", + "2": "鼠…鼠标放错地方了!", + "3": "你要干嘛呀?", + "4": "喵喵喵?", + "5": "怕怕(ノ≧∇≦)ノ", + "6": "非礼呀!救命!", + "7": "这样的话,只能使用武力了!", + "8": "我要生气了哦", + "9": "不要动手动脚的!", + "10": "真…真的是不知羞耻!", + "11": "Hentai!" + }, + "waifu_tool_fa_comment": { + "1": "猜猜我要说些什么?", + "2": "我从青蛙王子那里听到了不少人生经验。" + }, + "waifu_tool_fa_paper_plane": { + "1": "要不要来玩飞机大战?", + "2": "这个按钮上写着「不要点击」。", + "3": "怎么,你想来和我玩个游戏?", + "4": "听说这样可以蹦迪!" + }, + "waifu_tool_fa_user_circle": { + "1": "你是不是不爱人家了呀,呜呜呜~", + "2": "要见见我的姐姐嘛?", + "3": "想要看我妹妹嘛?", + "4": "要切换看板娘吗?" + }, + "waifu_tool_fa_street_view": { + "1": "喜欢换装 PLAY 吗?", + "2": "这次要扮演什么呢?", + "3": "变装!", + "4": "让我们看看接下来会发生什么!" + }, + "waifu_tool_fa_camera_retro": { + "1": "你要给我拍照呀?一二三~茄子~", + "2": "要不,我们来合影吧!", + "3": "保持微笑就好了~" + }, + "waifu_tool_fa_info_circle": { + "1": "想要知道更多关于我的事么?", + "2": "这里记录着我搬家的历史呢。", + "3": "你想深入了解我什么呢?" + }, + "waifu_tool_fa_times": { + "1": "到了要说再见的时候了吗?", + "2": "呜呜 QAQ 后会有期……", + "3": "不要抛弃我呀……", + "4": "我们,还能再见面吗……", + "5": "哼,你会后悔的!" + }, + "menu_item_home_a": { + "1": "点击前往首页,想回到上一页可以使用浏览器的后退功能哦。", + "2": "点它就可以回到首页啦!", + "3": "回首页看看吧。" + }, + "menu_item_about_a": { + "1": "你想知道我家主人是谁吗?", + "2": "这里有一些关于我家主人的秘密哦,要不要看看呢?", + "3": "发现主人出没地点!" + }, + "menu_item_tags_a": { + "1": "点击就可以看文章的标签啦!", + "2": "点击来查看所有标签哦。" + }, + "menu_item_categories_a": { + "1": "文章都分类好啦~", + "2": "点击来查看文章分类哦。" + }, + "menu_item_archieves_a": { + "1": "翻页比较麻烦吗,那就来看看文章归档吧。", + "2": "文章目录都整理在这里啦!" + }, + "menu_item_friends_a": { + "1": "这是我的朋友们哦ヾ(◍°∇°◍)ノ゙", + "2": "要去大佬们的家看看吗?", + "3": "要去拜访一下我的朋友们吗?" + }, + "menu_item_search_a": { + "1": "找不到想看的内容?搜索看看吧!", + "2": "在找什么东西呢,需要帮忙吗?" + }, + "menu_item_a": { + "1": "快看看这里都有什么呢?" + }, + "site_author": { + "1": "我家主人好看吗?", + "2": "这是我家主人(*´∇`*)" + }, + "site_state": { + "1": "这是文章的统计信息~", + "2": "要不要点进去看看?" + }, + "feed_link_a": { + "1": "这里可以使用 RSS 订阅呢!", + "2": "利用 feed 订阅器,就能快速知道博客有没有更新了呢。" + }, + "cc_opacity_post_copyright_author": { + "1": "要记得规范转载哦。", + "2": "所有文章均采用 CC BY-NC-SA 4.0 许可协议~", + "3": "转载前要先注意下文章的版权协议呢。" + }, + "links_of_author": { + "1": "这里是主人的常驻地址哦。", + "2": "这里有主人的联系方式!" + }, + "qrcode": { + "1": "手机扫一下就能继续看,很方便呢~", + "2": "扫一扫,打开新世界的大门!" + }, + "fancybox_img_img_medium_zoom_image": { + "1": "点击图片可以放大呢!" + }, + "copy_btn": { + "1": "代码可以直接点击复制哟。" + }, + "highlight_table_container_gist": { + "1": "GitHub!我是新手!", + "2": "PHP 是最好的语言!" + }, + "a_href_mail_to": { + "1": "邮件我会及时回复的!", + "2": "点击就可以发送邮件啦~" + }, + "a_href_tags": { + "1": "要去看看 {text} 标签么?", + "2": "点它可以查看此标签下的所有文章哟!" + }, + "a_href_categories": { + "1": "要去看看 {text} 分类么?", + "2": "点它可以查看此分类下的所有文章哟!" + }, + "post_title_link": { + "1": "要看看 {text} 这篇文章吗?" + }, + "a_rel_contents": { + "1": "点击来阅读全文哦。" + }, + "a_itemprop_discussionUrl": { + "1": "要去看看评论吗?" + }, + "bein_a": { + "1": "我也是有户口的人哦。", + "2": "我的主人可是遵纪守法的好主人。" + }, + "container_a_href_http_nav_link_nav_text": { + "1": "要去看看 {text} 么?", + "2": "去 {text} 逛逛吧。", + "3": "到 {text} 看看吧。" + }, + "back_to_top": { + "1": "点它就可以回到顶部啦!", + "2": "又回到最初的起点~", + "3": "要回到开始的地方么?" + }, + "reward_container": { + "1": "我是不是棒棒哒~快给我点赞吧!", + "2": "要打赏我嘛?好期待啊~", + "3": "主人最近在吃土呢,很辛苦的样子,给他一些钱钱吧~" + }, + "wechat": { + "1": "这是我的微信二维码~" + }, + "alipay": { + "1": "这是我的支付宝哦!" + }, + "bitcoin": { + "1": "这是我的比特币账号!" + }, + "needsharebutton_postbottom_btn": { + "1": "好东西要让更多人知道才行哦。", + "2": "觉得文章有帮助的话,可以分享给更多需要的朋友呢。" + }, + "need_share_button_weibo": { + "1": "微博?来分享一波喵!" + }, + "need_share_button_wechat": { + "1": "分享到微信吧!" + }, + "need_share_button_douban": { + "1": "分享到豆瓣好像也不错!" + }, + "need_share_button_qqzone": { + "1": "QQ 空间,一键转发,耶~" + }, + "need_share_button_twitter": { + "1": "Twitter?好像是不存在的东西?" + }, + "need_share_button_facebook": { + "1": "emmm…FB 好像也是不存在的东西?" + }, + "post_nav_item_a_rel_next": { + "1": "来看看下一篇文章吧。", + "2": "点它可以看下一篇文章哦!", + "3": "要翻到下一篇文章吗?" + }, + "post_nav_item_a_rel_prev": { + "1": "来看看上一篇文章吧。", + "2": "点它可以看上一篇文章哦!", + "3": "要翻到上一篇文章吗?" + }, + "extend_next": { + "1": "去下一页看看吧。", + "2": "点它可以前进哦!", + "3": "要翻到下一页吗?" + }, + "extend_prev": { + "1": "去上一页看看吧。", + "2": "点它可以后退哦!", + "3": "要翻到上一页吗?" + }, + "input_vnick": { + "1": "该怎么称呼你呢?", + "2": "留下你的尊姓大名!" + }, + "vmail": { + "1": "留下你的邮箱,不然就是无头像人士了!", + "2": "记得设置好 Gravatar 头像哦!", + "3": "为了方便通知你最新消息,一定要留下邮箱!" + }, + "vlink": { + "1": "快快告诉我你的家在哪里,好让我去参观参观!" + }, + "veditor": { + "1": "想要去评论些什么吗?", + "2": "要说点什么吗?", + "3": "觉得博客不错?快来留言和主人交流吧!" + }, + "vcontrol_a": { + "1": "你会不会熟练使用 Markdown 呀?", + "2": "使用 Markdown 让评论更美观吧~" + }, + "vemoji_btn": { + "1": "要插入一个萌萌哒的表情吗?", + "2": "要来一发表情吗?" + }, + "vpreview_btn": { + "1": "要预览一下你的发言吗?", + "2": "快看看你的评论有多少负熵!" + }, + "vsubmit": { + "1": "评论没有审核,要对自己的发言负责哦~", + "2": "要提交了吗,请耐心等待回复哦~" + }, + "vcontent": { + "1": "哇,快看看这个精彩评论!", + "2": "如果有疑问,请尽快留言哦~" + } + }, + "click": { + "waifu": { + "1": "是…是不小心碰到了吧…", + "2": "萝莉控是什么呀?", + "3": "你看到我的小熊了吗?", + "4": "再摸的话我可要报警了!⌇●﹏●⌇", + "5": "110 吗,这里有个变态一直在摸我(ó﹏ò。)", + "6": "不要摸我了,我会告诉老婆来打你的!", + "7": "干嘛动我呀!小心我咬你!", + "8": "别摸我,有什么好摸的!" + }, + "veditor": { + "1": "要吐槽些什么呢?", + "2": "一定要认真填写喵~", + "3": "有什么想说的吗?" + }, + "vsubmit": { + "1": "输入验证码就可以提交评论啦~" + } + }, + "seasons": { + "1": "元旦了呢,新的一年又开始了,今年是{year}年~", + "2": "又是一年情人节,{year}年找到对象了嘛~", + "3": "今天是国际妇女节!", + "4": "今天是植树节,要保护环境呀!", + "5": "悄悄告诉你一个秘密~今天是愚人节,不要被骗了哦~", + "6": "今天是五一劳动节,计划好假期去哪里了吗~", + "7": "儿童节了呢,快活的时光总是短暂,要是永远长不大该多好啊…", + "8": "中国人民抗日战争胜利纪念日,铭记历史、缅怀先烈、珍爱和平、开创未来。", + "9": "教师节,在学校要给老师问声好呀~", + "10": "国庆节到了,为祖国母亲庆生!", + "11": "今年的双十一是和谁一起过的呢~", + "12": "这几天是圣诞节,主人肯定又去剁手买买买了~" + }, + "general": { + "longtime": { + "1": "好久不见,日子过得好快呢……", + "2": "大坏蛋!你都多久没理人家了呀,嘤嘤嘤~", + "3": "嗨~快来逗我玩吧!", + "4": "拿小拳拳锤你胸口!" + }, + "camera": { + "1": "照好了嘛,是不是很可爱呢?" + }, + "exit": { + "1": "愿你有一天能与重要的人重逢。" + }, + "console": { + "1": "哈哈,你打开了控制台,是想要看看我的小秘密吗?" + }, + "copy": { + "1": "你都复制了些什么呀,转载要记得加上出处哦!" + }, + "visibilityChange": { + "1": "哇,你终于回来了~" + }, + "dress": { + "1": "我的新衣服好看嘛?", + "2": "我的新衣服好看嘛?" + } + }, + "time": { + "5_7": "早上好!一日之计在于晨,美好的一天就要开始了。", + "7_11": "上午好!工作顺利嘛,不要久坐,多起来走动走动哦!", + "11_13": "中午了,工作了一个上午,现在是午餐时间!", + "13_17": "午后很容易犯困呢,今天的运动目标完成了吗?", + "17_19": "傍晚了!窗外夕阳的景色很美丽呢,最美不过夕阳红~", + "19_21": "晚上好,今天过得怎么样?", + "21_23": { + "1": "已经这么晚了呀,早点休息吧,晚安~", + "2": "深夜时要爱护眼睛呀!" + }, + "24": "你是夜猫子呀?这么晚还不睡觉,明天起的来嘛?" + }, + "welcome": { + "1": "欢迎阅读 「%{data}」", + "2": "Hello!来自 百度搜索 的朋友
你是搜索 「%{data}」 找到的我吗?", + "3": "Hello!来自 360搜索 的朋友
你是搜索 「%{data}」 找到的我吗?", + "4": "Hello!来自 谷歌搜索 的朋友
欢迎阅读「${data}」", + "5": "Hello!来自 「%{data}」. Welcome!", + "6": "欢迎阅读「%{data}」" + }, + "hikoto": { + "1": "这句一言来自 「%{source}」,是 %{author} 在 hitokoto.cn 投稿的。" + }, + "来自 Potion Maker 的 Pio 酱 ~": "来自 Potion Maker 的 Pio 酱 ~", + "来自 Potion Maker 的 Tia 酱 ~": "来自 Potion Maker 的 Tia 酱 ~", + "来自 Bilibili Live 的 22 哦 ~": "来自 Bilibili Live 的 22 哦 ~", + "来自 Bilibili Live 的 33 的说": "来自 Bilibili Live 的 33 的说", + "Shizuku Talk !这里是 Shizuku ~": "Shizuku Talk !这里是 Shizuku ~", + "Nep! Nep! 超次元游戏:海王星 系列": "Nep! Nep! 超次元游戏:海王星 系列 ", + "艦隊これくしょん / 叢雲(むらくも)": "艦隊これくしょん / 叢雲(むらくも)" + + } +} + diff --git a/lib/live2d.min.js b/lib/live2d.min.js index 8915e1d..73c8b58 100755 --- a/lib/live2d.min.js +++ b/lib/live2d.min.js @@ -1 +1,2 @@ +// prettier-ignore !function(t){function i(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var e={};i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=4)}([function(t,i,e){"use strict";function r(){this.live2DModel=null,this.modelMatrix=null,this.eyeBlink=null,this.physics=null,this.pose=null,this.debugMode=!1,this.initialized=!1,this.updating=!1,this.alpha=1,this.accAlpha=0,this.lipSync=!1,this.lipSyncValue=0,this.accelX=0,this.accelY=0,this.accelZ=0,this.dragX=0,this.dragY=0,this.startTimeMSec=null,this.mainMotionManager=new h,this.expressionManager=new h,this.motions={},this.expressions={},this.isTexLoaded=!1}function o(){AMotion.prototype.constructor.call(this),this.paramList=new Array}function n(){this.id="",this.type=-1,this.value=null}function s(){this.nextBlinkTime=null,this.stateStartTime=null,this.blinkIntervalMsec=null,this.eyeState=g.STATE_FIRST,this.blinkIntervalMsec=4e3,this.closingMotionMsec=100,this.closedMotionMsec=50,this.openingMotionMsec=150,this.closeIfZero=!0,this.eyeID_L="PARAM_EYE_L_OPEN",this.eyeID_R="PARAM_EYE_R_OPEN"}function _(){this.tr=new Float32Array(16),this.identity()}function a(t,i){_.prototype.constructor.call(this),this.width=t,this.height=i}function h(){MotionQueueManager.prototype.constructor.call(this),this.currentPriority=null,this.reservePriority=null,this.super=MotionQueueManager.prototype}function l(){this.physicsList=new Array,this.startTimeMSec=UtSystem.getUserTimeMSec()}function $(){this.lastTime=0,this.lastModel=null,this.partsGroups=new Array}function u(t){this.paramIndex=-1,this.partsIndex=-1,this.link=null,this.id=t}function p(){this.EPSILON=.01,this.faceTargetX=0,this.faceTargetY=0,this.faceX=0,this.faceY=0,this.faceVX=0,this.faceVY=0,this.lastTimeSec=0}function f(){_.prototype.constructor.call(this),this.screenLeft=null,this.screenRight=null,this.screenTop=null,this.screenBottom=null,this.maxLeft=null,this.maxRight=null,this.maxTop=null,this.maxBottom=null,this.max=Number.MAX_VALUE,this.min=0}function c(){}var d=0;r.prototype.getModelMatrix=function(){return this.modelMatrix},r.prototype.setAlpha=function(t){t>.999&&(t=1),t<.001&&(t=0),this.alpha=t},r.prototype.getAlpha=function(){return this.alpha},r.prototype.isInitialized=function(){return this.initialized},r.prototype.setInitialized=function(t){this.initialized=t},r.prototype.isUpdating=function(){return this.updating},r.prototype.setUpdating=function(t){this.updating=t},r.prototype.getLive2DModel=function(){return this.live2DModel},r.prototype.setLipSync=function(t){this.lipSync=t},r.prototype.setLipSyncValue=function(t){this.lipSyncValue=t},r.prototype.setAccel=function(t,i,e){this.accelX=t,this.accelY=i,this.accelZ=e},r.prototype.setDrag=function(t,i){this.dragX=t,this.dragY=i},r.prototype.getMainMotionManager=function(){return this.mainMotionManager},r.prototype.getExpressionManager=function(){return this.expressionManager},r.prototype.loadModelData=function(t,i){var e=c.getPlatformManager();this.debugMode&&e.log("Load model : "+t);var r=this;e.loadLive2DModel(t,function(t){if(r.live2DModel=t,r.live2DModel.saveParam(),0!=Live2D.getError())return void console.error("Error : Failed to loadModelData().");r.modelMatrix=new a(r.live2DModel.getCanvasWidth(),r.live2DModel.getCanvasHeight()),r.modelMatrix.setWidth(2),r.modelMatrix.setCenterPosition(0,0),i(r.live2DModel)})},r.prototype.loadTexture=function(t,i,e){d++;var r=c.getPlatformManager();this.debugMode&&r.log("Load Texture : "+i);var o=this;r.loadTexture(this.live2DModel,t,i,function(){d--,0==d&&(o.isTexLoaded=!0),"function"==typeof e&&e()})},r.prototype.loadMotion=function(t,i,e){var r=c.getPlatformManager();this.debugMode&&r.log("Load Motion : "+i);var o=null,n=this;r.loadBytes(i,function(i){o=Live2DMotion.loadMotion(i),null!=t&&(n.motions[t]=o),e(o)})},r.prototype.loadExpression=function(t,i,e){var r=c.getPlatformManager();this.debugMode&&r.log("Load Expression : "+i);var n=this;r.loadBytes(i,function(i){null!=t&&(n.expressions[t]=o.loadJson(i)),"function"==typeof e&&e()})},r.prototype.loadPose=function(t,i){var e=c.getPlatformManager();this.debugMode&&e.log("Load Pose : "+t);var r=this;try{e.loadBytes(t,function(t){r.pose=$.load(t),"function"==typeof i&&i()})}catch(t){console.warn(t)}},r.prototype.loadPhysics=function(t){var i=c.getPlatformManager();this.debugMode&&i.log("Load Physics : "+t);var e=this;try{i.loadBytes(t,function(t){e.physics=l.load(t)})}catch(t){console.warn(t)}},r.prototype.hitTestSimple=function(t,i,e){if(null===this.live2DModel)return!1;var r=this.live2DModel.getDrawDataIndex(t);if(r<0)return!1;for(var o=this.live2DModel.getTransformedPoints(r),n=this.live2DModel.getCanvasWidth(),s=0,_=this.live2DModel.getCanvasHeight(),a=0,h=0;hs&&(s=l),$<_&&(_=$),$>a&&(a=$)}var u=this.modelMatrix.invertTransformX(i),p=this.modelMatrix.invertTransformY(e);return n<=u&&u<=s&&_<=p&&p<=a},r.prototype.hitTestSimpleCustom=function(t,i,e,r){return null!==this.live2DModel&&(e>=t[0]&&e<=i[0]&&r<=t[1]&&r>=i[1])},o.prototype=new AMotion,o.EXPRESSION_DEFAULT="DEFAULT",o.TYPE_SET=0,o.TYPE_ADD=1,o.TYPE_MULT=2,o.loadJson=function(t){var i=new o,e=c.getPlatformManager(),r=e.jsonParseFromBytes(t);if(i.setFadeIn(parseInt(r.fade_in)>0?parseInt(r.fade_in):1e3),i.setFadeOut(parseInt(r.fade_out)>0?parseInt(r.fade_out):1e3),null==r.params)return i;var s=r.params,_=s.length;i.paramList=[];for(var a=0;a<_;a++){var h=s[a],l=h.id.toString(),$=parseFloat(h.val),u=o.TYPE_ADD,p=null!=h.calc?h.calc.toString():"add";if((u="add"===p?o.TYPE_ADD:"mult"===p?o.TYPE_MULT:"set"===p?o.TYPE_SET:o.TYPE_ADD)==o.TYPE_ADD){var f=null==h.def?0:parseFloat(h.def);$-=f}else if(u==o.TYPE_MULT){var f=null==h.def?1:parseFloat(h.def);0==f&&(f=1),$/=f}var d=new n;d.id=l,d.type=u,d.value=$,i.paramList.push(d)}return i},o.prototype.updateParamExe=function(t,i,e,r){for(var n=this.paramList.length-1;n>=0;--n){var s=this.paramList[n];s.type==o.TYPE_ADD?t.addToParamFloat(s.id,s.value,e):s.type==o.TYPE_MULT?t.multParamFloat(s.id,s.value,e):s.type==o.TYPE_SET&&t.setParamFloat(s.id,s.value,e)}},s.prototype.calcNextBlink=function(){return UtSystem.getUserTimeMSec()+Math.random()*(2*this.blinkIntervalMsec-1)},s.prototype.setInterval=function(t){this.blinkIntervalMsec=t},s.prototype.setEyeMotion=function(t,i,e){this.closingMotionMsec=t,this.closedMotionMsec=i,this.openingMotionMsec=e},s.prototype.updateParam=function(t){var i,e=UtSystem.getUserTimeMSec(),r=0;switch(this.eyeState){case g.STATE_CLOSING:r=(e-this.stateStartTime)/this.closingMotionMsec,r>=1&&(r=1,this.eyeState=g.STATE_CLOSED,this.stateStartTime=e),i=1-r;break;case g.STATE_CLOSED:r=(e-this.stateStartTime)/this.closedMotionMsec,r>=1&&(this.eyeState=g.STATE_OPENING,this.stateStartTime=e),i=0;break;case g.STATE_OPENING:r=(e-this.stateStartTime)/this.openingMotionMsec,r>=1&&(r=1,this.eyeState=g.STATE_INTERVAL,this.nextBlinkTime=this.calcNextBlink()),i=r;break;case g.STATE_INTERVAL:this.nextBlinkTime=t)&&(!(this.currentPriority>=t)&&(this.reservePriority=t,!0))},h.prototype.setReservePriority=function(t){this.reservePriority=t},h.prototype.updateParam=function(t){var i=MotionQueueManager.prototype.updateParam.call(this,t);return this.isFinished()&&(this.currentPriority=0),i},h.prototype.startMotionPrio=function(t,i){return i==this.reservePriority&&(this.reservePriority=0),this.currentPriority=i,this.startMotion(t,!1)},l.load=function(t){for(var i=new l,e=c.getPlatformManager(),r=e.jsonParseFromBytes(t),o=r.physics_hair,n=o.length,s=0;s=0)break;r=n,o=t.getPartsOpacity(s),o+=e/.5,o>1&&(o=1)}}r<0&&(r=0,o=1);for(var n=0;n.15&&(a=1-.15/(1-o)),h>a&&(h=a),t.setPartsOpacity(s,h)}}},$.prototype.copyOpacityOtherParts=function(t,i){for(var e=0;eo)&&(l*=o/u,$*=o/u,u=o),this.faceVX+=l,this.faceVY+=$;var f=.5*(Math.sqrt(o*o+16*o*_-8*o*_)-o),c=Math.sqrt(this.faceVX*this.faceVX+this.faceVY*this.faceVY);c>f&&(this.faceVX*=f/c,this.faceVY*=f/c),this.faceX+=this.faceVX,this.faceY+=this.faceVY}},f.prototype=new _,f.prototype.getMaxScale=function(){return this.max},f.prototype.getMinScale=function(){return this.min},f.prototype.setMaxScale=function(t){this.max=t},f.prototype.setMinScale=function(t){this.min=t},f.prototype.isMaxScale=function(){return this.getScaleX()==this.max},f.prototype.isMinScale=function(){return this.getScaleX()==this.min},f.prototype.adjustTranslate=function(t,i){this.tr[0]*this.maxLeft+(this.tr[12]+t)>this.screenLeft&&(t=this.screenLeft-this.tr[0]*this.maxLeft-this.tr[12]),this.tr[0]*this.maxRight+(this.tr[12]+t)this.screenBottom&&(i=this.screenBottom-this.tr[5]*this.maxBottom-this.tr[13]);var e=[1,0,0,0,0,1,0,0,0,0,1,0,t,i,0,1];_.mul(e,this.tr,this.tr)},f.prototype.adjustScale=function(t,i,e){var r=e*this.tr[0];r0&&(e=this.min/this.tr[0]):r>this.max&&this.tr[0]>0&&(e=this.max/this.tr[0]);var o=[1,0,0,0,0,1,0,0,0,0,1,0,t,i,0,1],n=[e,0,0,0,0,e,0,0,0,0,1,0,0,0,0,1],s=[1,0,0,0,0,1,0,0,0,0,1,0,-t,-i,0,1];_.mul(s,this.tr,this.tr),_.mul(n,this.tr,this.tr),_.mul(o,this.tr,this.tr)},f.prototype.setScreenRect=function(t,i,e,r){this.screenLeft=t,this.screenRight=i,this.screenTop=r,this.screenBottom=e},f.prototype.setMaxScreenRect=function(t,i,e,r){this.maxLeft=t,this.maxRight=i,this.maxTop=r,this.maxBottom=e},f.prototype.getScreenLeft=function(){return this.screenLeft},f.prototype.getScreenRight=function(){return this.screenRight},f.prototype.getScreenBottom=function(){return this.screenBottom},f.prototype.getScreenTop=function(){return this.screenTop},f.prototype.getMaxLeft=function(){return this.maxLeft},f.prototype.getMaxRight=function(){return this.maxRight},f.prototype.getMaxBottom=function(){return this.maxBottom},f.prototype.getMaxTop=function(){return this.maxTop},c.platformManager=null,c.getPlatformManager=function(){return c.platformManager},c.setPlatformManager=function(t){c.platformManager=t},t.exports={L2DTargetPoint:p,Live2DFramework:c,L2DViewMatrix:f,L2DPose:$,L2DPartsParam:u,L2DPhysics:l,L2DMotionManager:h,L2DModelMatrix:a,L2DMatrix44:_,EYE_STATE:g,L2DEyeBlink:s,L2DExpressionParam:n,L2DExpressionMotion:o,L2DBaseModel:r}},function(t,i,e){"use strict";var r={DEBUG_LOG:!1,DEBUG_MOUSE_LOG:!1,DEBUG_DRAW_HIT_AREA:!1,DEBUG_DRAW_ALPHA_MODEL:!1,VIEW_MAX_SCALE:2,VIEW_MIN_SCALE:.8,VIEW_LOGICAL_LEFT:-1,VIEW_LOGICAL_RIGHT:1,VIEW_LOGICAL_MAX_LEFT:-2,VIEW_LOGICAL_MAX_RIGHT:2,VIEW_LOGICAL_MAX_BOTTOM:-2,VIEW_LOGICAL_MAX_TOP:2,PRIORITY_NONE:0,PRIORITY_IDLE:1,PRIORITY_SLEEPY:2,PRIORITY_NORMAL:3,PRIORITY_FORCE:4,MOTION_GROUP_IDLE:"idle",MOTION_GROUP_SLEEPY:"sleepy",MOTION_GROUP_TAP_BODY:"tap_body",MOTION_GROUP_FLICK_HEAD:"flick_head",MOTION_GROUP_PINCH_IN:"pinch_in",MOTION_GROUP_PINCH_OUT:"pinch_out",MOTION_GROUP_SHAKE:"shake",HIT_AREA_HEAD:"head",HIT_AREA_BODY:"body"};t.exports=r},function(t,i,e){"use strict";function r(t){n=t}function o(){return n}Object.defineProperty(i,"__esModule",{value:!0}),i.setContext=r,i.getContext=o;var n=void 0},function(t,i,e){"use strict";function r(){}r.matrixStack=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.depth=0,r.currentMatrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.tmp=new Array(16),r.reset=function(){this.depth=0},r.loadIdentity=function(){for(var t=0;t<16;t++)this.currentMatrix[t]=t%5==0?1:0},r.push=function(){var t=(this.depth,16*(this.depth+1));this.matrixStack.lengthe.left&&i.y>e.top)return i;var o=t.x-i.x,n=t.y-i.y,s=r(o,n);i.xat.frameBuffers.length&&(this.curFrameNo=this.getMaskRenderTexture()),this.tmpModelToViewMatrix=new R,this.tmpMatrix2=new R,this.tmpMatrixForMask=new R,this.tmpMatrixForDraw=new R,this.CHANNEL_COLORS=new Array;var i=new A;i=new A,i.r=0,i.g=0,i.b=0,i.a=1,this.CHANNEL_COLORS.push(i),i=new A,i.r=1,i.g=0,i.b=0,i.a=0,this.CHANNEL_COLORS.push(i),i=new A,i.r=0,i.g=1,i.b=0,i.a=0,this.CHANNEL_COLORS.push(i),i=new A,i.r=0,i.g=0,i.b=1,i.a=0,this.CHANNEL_COLORS.push(i);for(var e=0;eG._$T7){t._$NP|=i._$4s;throw new lt("_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : "+G._$T7+" < _$f0 : "+r+" )@_$SS#loadModel()\n")}var h=o._$nP();if(r>=G._$s7){var l=o._$9T(),$=o._$9T();if(-30584!=l||-30584!=$)throw t._$NP|=i._$0s,new lt("_$gi _$C _$li , _$0 _$6 _$Ui.")}t._$KS(h);var u=t.getModelContext();u.setDrawParam(t.getDrawParam()),u.init()}catch(t){_._$Rb(t)}},i.prototype._$KS=function(t){this._$MT=t},i.prototype.getModelImpl=function(){return null==this._$MT&&(this._$MT=new p,this._$MT._$zP()),this._$MT},i.prototype.getCanvasWidth=function(){return null==this._$MT?0:this._$MT.getCanvasWidth()},i.prototype.getCanvasHeight=function(){return null==this._$MT?0:this._$MT.getCanvasHeight()},i.prototype.getParamFloat=function(t){return"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),this._$5S.getParamFloat(t)},i.prototype.setParamFloat=function(t,i,e){"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),arguments.length<3&&(e=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1-e)+i*e)},i.prototype.addToParamFloat=function(t,i,e){"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),arguments.length<3&&(e=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)+i*e)},i.prototype.multParamFloat=function(t,i,e){"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),arguments.length<3&&(e=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1+(i-1)*e))},i.prototype.getParamIndex=function(t){return this._$5S.getParamIndex(u.getID(t))},i.prototype.loadParam=function(){this._$5S.loadParam()},i.prototype.saveParam=function(){this._$5S.saveParam()},i.prototype.init=function(){this._$5S.init()},i.prototype.update=function(){this._$5S.update()},i.prototype._$Rs=function(){return _._$li("_$60 _$PT _$Rs()"),-1},i.prototype._$Ds=function(t){_._$li("_$60 _$PT _$SS#_$Ds() \n")},i.prototype._$K2=function(){},i.prototype.draw=function(){},i.prototype.getModelContext=function(){return this._$5S},i.prototype._$s2=function(){return this._$NP},i.prototype._$P7=function(t,i,e,r){var o=-1,n=0,s=this;if(0!=e)if(1==t.length){var _=t[0],a=0!=s.getParamFloat(_),h=i[0],l=s.getPartsOpacity(h),$=e/r;a?(l+=$)>1&&(l=1):(l-=$)<0&&(l=0),s.setPartsOpacity(h,l)}else{for(var u=0;u=0)break;o=u;var h=i[u];n=s.getPartsOpacity(h),n+=e/r,n>1&&(n=1)}}o<0&&(console.log("No _$wi _$q0/ _$U default[%s]",t[0]),o=0,n=1,s.loadParam(),s.setParamFloat(t[o],n),s.saveParam());for(var u=0;u.15&&(f=1-.15/(1-n)),c>f&&(c=f),s.setPartsOpacity(h,c)}}}else for(var u=0;u=this._$5S._$aS.length)return null;var i=this._$5S._$aS[t];return null!=i&&i.getType()==W._$wb&&i instanceof $t?i.getIndexArray():null},e.CHANNEL_COUNT=4,e.RENDER_TEXTURE_USE_MIPMAP=!1,e.NOT_USED_FRAME=-100,e.prototype._$L7=function(){if(this.tmpModelToViewMatrix&&(this.tmpModelToViewMatrix=null),this.tmpMatrix2&&(this.tmpMatrix2=null),this.tmpMatrixForMask&&(this.tmpMatrixForMask=null),this.tmpMatrixForDraw&&(this.tmpMatrixForDraw=null),this.tmpBoundsOnModel&&(this.tmpBoundsOnModel=null),this.CHANNEL_COLORS){for(var t=this.CHANNEL_COLORS.length-1;t>=0;--t)this.CHANNEL_COLORS.splice(t,1);this.CHANNEL_COLORS=[]}this.releaseShader()},e.prototype.releaseShader=function(){for(var t=at.frameBuffers.length,i=0;i0){var n=i.gl.getParameter(i.gl.FRAMEBUFFER_BINDING),s=new Array(4);s[0]=0,s[1]=0,s[2]=i.gl.canvas.width,s[3]=i.gl.canvas.height,i.gl.viewport(0,0,at.clippingMaskBufferSize,at.clippingMaskBufferSize),this.setupLayoutBounds(e),i.gl.bindFramebuffer(i.gl.FRAMEBUFFER,at.frameBuffers[this.curFrameNo].framebuffer),i.gl.clearColor(0,0,0,0),i.gl.clear(i.gl.COLOR_BUFFER_BIT);for(var r=0;rr?e:r,n=o,s=o,_=0,a=0,h=i.clippedDrawContextList.length,l=0;l_&&(_=S),v>a&&(a=v)}}if(n==o)i.allClippedDrawRect.x=0,i.allClippedDrawRect.y=0,i.allClippedDrawRect.width=0,i.allClippedDrawRect.height=0,i.isUsing=!1;else{var L=_-n,M=a-s;i.allClippedDrawRect.x=n,i.allClippedDrawRect.y=s,i.allClippedDrawRect.width=L,i.allClippedDrawRect.height=M,i.isUsing=!0}},e.prototype.setupLayoutBounds=function(t){var i=t/e.CHANNEL_COUNT,r=t%e.CHANNEL_COUNT;i=~~i,r=~~r;for(var o=0,n=0;n=1)return 1;var p=r,f=p*p;return l*(p*f)+$*f+u*p+0},s.prototype._$a0=function(){},s.prototype.setFadeIn=function(t){this._$dP=t},s.prototype.setFadeOut=function(t){this._$eo=t},s.prototype._$pT=function(t){this._$V0=t},s.prototype.getFadeOut=function(){return this._$eo},s.prototype._$4T=function(){return this._$eo},s.prototype._$mT=function(){return this._$V0},s.prototype.getDurationMSec=function(){return-1},s.prototype.getLoopDurationMSec=function(){return-1},s.prototype.updateParam=function(t,i){if(i._$AT&&!i._$9L){var e=w.getUserTimeMSec();if(i._$z2<0){i._$z2=e,i._$bs=e;var r=this.getDurationMSec();i._$Do<0&&(i._$Do=r<=0?-1:i._$z2+r)}var o=this._$V0;o=o*(0==this._$dP?1:ht._$r2((e-i._$bs)/this._$dP))*(0==this._$eo||i._$Do<0?1:ht._$r2((i._$Do-e)/this._$eo)),0<=o&&o<=1||console.log("### assert!! ### "),this.updateParamExe(t,e,o,i),i._$Do>0&&i._$Do0?console.log("\n"):e%8==0&&e>0&&console.log(" "),console.log("%02X ",255&t[e]);console.log("\n")},_._$nr=function(t,i,e){console.log("%s\n",t);for(var r=i.length,o=0;o=0;--r){this._$lL[r]._$oP(t,this)}this._$oo(t,e),this._$M2=this._$Yb(),this._$9b=(this._$M2-this._$ks)/e,this._$ks=this._$M2}for(var r=this._$qP.length-1;r>=0;--r){this._$qP[r]._$YS(t,this)}this._$iT=i},f.prototype._$oo=function(t,i){i<.033&&(i=.033);var e=1/i;this.p1.vx=(this.p1.x-this.p1._$s0)*e,this.p1.vy=(this.p1.y-this.p1._$70)*e,this.p1.ax=(this.p1.vx-this.p1._$7L)*e,this.p1.ay=(this.p1.vy-this.p1._$HL)*e,this.p1.fx=this.p1.ax*this.p1._$p,this.p1.fy=this.p1.ay*this.p1._$p,this.p1._$xT();var r,o,n=-Math.atan2(this.p1.y-this.p2.y,this.p1.x-this.p2.x),s=Math.cos(n),_=Math.sin(n),a=9.8*this.p2._$p,h=this._$Db*Lt._$bS,l=a*Math.cos(n-h);r=l*_,o=l*s;var $=-this.p1.fx*_*_,u=-this.p1.fy*_*s,p=-this.p2.vx*this._$L2,f=-this.p2.vy*this._$L2;this.p2.fx=r+$+p,this.p2.fy=o+u+f,this.p2.ax=this.p2.fx/this.p2._$p,this.p2.ay=this.p2.fy/this.p2._$p,this.p2.vx+=this.p2.ax*i,this.p2.vy+=this.p2.ay*i,this.p2.x+=this.p2.vx*i,this.p2.y+=this.p2.vy*i;var c=Math.sqrt((this.p1.x-this.p2.x)*(this.p1.x-this.p2.x)+(this.p1.y-this.p2.y)*(this.p1.y-this.p2.y));this.p2.x=this.p1.x+this._$Fo*(this.p2.x-this.p1.x)/c,this.p2.y=this.p1.y+this._$Fo*(this.p2.y-this.p1.y)/c,this.p2.vx=(this.p2.x-this.p2._$s0)*e,this.p2.vy=(this.p2.y-this.p2._$70)*e,this.p2._$xT()},c.prototype._$xT=function(){this._$s0=this.x,this._$70=this.y,this._$7L=this.vx,this._$HL=this.vy},d.prototype._$oP=function(t,i){},g.prototype=new d,g.prototype._$oP=function(t,i){var e=this.scale*t.getParamFloat(this._$wL),r=i.getPhysicsPoint1();switch(this._$tL){default:case f.Src.SRC_TO_X:r.x=r.x+(e-r.x)*this._$V0;break;case f.Src.SRC_TO_Y:r.y=r.y+(e-r.y)*this._$V0;break;case f.Src.SRC_TO_G_ANGLE:var o=i._$qr();o+=(e-o)*this._$V0,i._$pr(o)}},y.prototype._$YS=function(t,i){},T.prototype=new y,T.prototype._$YS=function(t,i){switch(this._$YP){default:case f.Target.TARGET_FROM_ANGLE:t.setParamFloat(this._$wL,this.scale*i._$5r(),this._$V0);break;case f.Target.TARGET_FROM_ANGLE_V:t.setParamFloat(this._$wL,this.scale*i._$Cs(),this._$V0)}},f.Src=function(){},f.Src.SRC_TO_X="SRC_TO_X",f.Src.SRC_TO_Y="SRC_TO_Y",f.Src.SRC_TO_G_ANGLE="SRC_TO_G_ANGLE",f.Target=function(){},f.Target.TARGET_FROM_ANGLE="TARGET_FROM_ANGLE",f.Target.TARGET_FROM_ANGLE_V="TARGET_FROM_ANGLE_V",P.prototype.init=function(t){this._$fL=t._$fL,this._$gL=t._$gL,this._$B0=t._$B0,this._$z0=t._$z0,this._$qT=t._$qT,this.reflectX=t.reflectX,this.reflectY=t.reflectY},P.prototype._$F0=function(t){this._$fL=t._$_T(),this._$gL=t._$_T(),this._$B0=t._$_T(),this._$z0=t._$_T(),this._$qT=t._$_T(),t.getFormatVersion()>=G.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this.reflectX=t._$po(),this.reflectY=t._$po())},P.prototype._$e=function(){};var It=function(){};It._$ni=function(t,i,e,r,o,n,s,_,a){var h=s*n-_*o;if(0==h)return null;var l,$=((t-e)*n-(i-r)*o)/h;return l=0!=o?(t-e-$*s)/o:(i-r-$*_)/n,isNaN(l)&&(l=(t-e-$*s)/o,isNaN(l)&&(l=(i-r-$*_)/n),isNaN(l)&&(console.log("a is NaN @UtVector#_$ni() "),console.log("v1x : "+o),console.log("v1x != 0 ? "+(0!=o)))),null==a?new Array(l,$):(a[0]=l,a[1]=$,a)},S.prototype._$8P=function(){return this.x+.5*this.width},S.prototype._$6P=function(){return this.y+.5*this.height},S.prototype._$EL=function(){return this.x+this.width},S.prototype._$5T=function(){return this.y+this.height},S.prototype._$jL=function(t,i,e,r){this.x=t,this.y=i,this.width=e,this.height=r},S.prototype._$jL=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},S.prototype.contains=function(t,i){return this.x<=this.x&&this.y<=this.y&&this.x<=this.x+this.width&&this.y<=this.y+this.height},S.prototype.expand=function(t,i){this.x-=t,this.y-=i,this.width+=2*t,this.height+=2*i},v._$Z2=function(t,i,e,r){var o=i._$Q2(t,e),n=t._$vs(),s=t._$Tr();if(i._$zr(n,s,o),o<=0)return r[n[0]];if(1==o){var _=r[n[0]],a=r[n[1]],h=s[0];return _+(a-_)*h|0}if(2==o){var _=r[n[0]],a=r[n[1]],l=r[n[2]],$=r[n[3]],h=s[0],u=s[1],p=_+(a-_)*h|0,f=l+($-l)*h|0;return p+(f-p)*u|0}if(3==o){var c=r[n[0]],d=r[n[1]],g=r[n[2]],y=r[n[3]],m=r[n[4]],T=r[n[5]],P=r[n[6]],S=r[n[7]],h=s[0],u=s[1],v=s[2],_=c+(d-c)*h|0,a=g+(y-g)*h|0,l=m+(T-m)*h|0,$=P+(S-P)*h|0,p=_+(a-_)*u|0,f=l+($-l)*u|0;return p+(f-p)*v|0}if(4==o){var L=r[n[0]],M=r[n[1]],E=r[n[2]],A=r[n[3]],I=r[n[4]],w=r[n[5]],x=r[n[6]],O=r[n[7]],D=r[n[8]],R=r[n[9]],b=r[n[10]],F=r[n[11]],C=r[n[12]],N=r[n[13]],B=r[n[14]],U=r[n[15]],h=s[0],u=s[1],v=s[2],G=s[3],c=L+(M-L)*h|0,d=E+(A-E)*h|0,g=I+(w-I)*h|0,y=x+(O-x)*h|0,m=D+(R-D)*h|0,T=b+(F-b)*h|0,P=C+(N-C)*h|0,S=B+(U-B)*h|0,_=c+(d-c)*u|0,a=g+(y-g)*u|0,l=m+(T-m)*u|0,$=P+(S-P)*u|0,p=_+(a-_)*v|0,f=l+($-l)*v|0;return p+(f-p)*G|0}for(var Y=1<=G._$T7?(this.clipID=t._$nP(),this.clipIDList=this.convertClipIDForV2_11(this.clipID)):this.clipIDList=[],this._$MS(this._$Lb)},M.prototype.getClipIDList=function(){return this.clipIDList},M.prototype.init=function(t){},M.prototype._$Nr=function(t,i){if(i._$IS[0]=!1,i._$Us=v._$Z2(t,this._$GS,i._$IS,this._$Lb),at._$Zs);else if(i._$IS[0])return;i._$7s=v._$br(t,this._$GS,i._$IS,this._$mS)},M.prototype._$2b=function(t,i){},M.prototype.getDrawDataID=function(){return this._$gP},M.prototype._$j2=function(t){this._$gP=t},M.prototype.getOpacity=function(t,i){return i._$7s},M.prototype._$zS=function(t,i){return i._$Us},M.prototype._$MS=function(t){for(var i=t.length-1;i>=0;--i){var e=t[i];eM._$R2&&(M._$R2=e)}},M.prototype.getTargetBaseDataID=function(){return this._$dr},M.prototype._$gs=function(t){this._$dr=t},M.prototype._$32=function(){return null!=this._$dr&&this._$dr!=yt._$2o()},M.prototype.preDraw=function(t,i,e){},M.prototype.draw=function(t,i,e){},M.prototype.getType=function(){},M.prototype._$B2=function(t,i,e){},E._$ps=32,E.CLIPPING_PROCESS_NONE=0,E.CLIPPING_PROCESS_OVERWRITE_ALPHA=1,E.CLIPPING_PROCESS_MULTIPLY_ALPHA=2,E.CLIPPING_PROCESS_DRAW=3,E.CLIPPING_PROCESS_CLEAR_ALPHA=4,E.prototype.setChannelFlagAsColor=function(t,i){this.CHANNEL_COLORS[t]=i},E.prototype.getChannelFlagAsColor=function(t){return this.CHANNEL_COLORS[t]},E.prototype._$ZT=function(){},E.prototype._$Uo=function(t,i,e,r,o,n,s){},E.prototype._$Rs=function(){return-1},E.prototype._$Ds=function(t){},E.prototype.setBaseColor=function(t,i,e,r){t<0?t=0:t>1&&(t=1),i<0?i=0:i>1&&(i=1),e<0?e=0:e>1&&(e=1),r<0?r=0:r>1&&(r=1),this._$lT=t,this._$C0=i,this._$tT=e,this._$WL=r},E.prototype._$WP=function(t){this.culling=t},E.prototype.setMatrix=function(t){for(var i=0;i<16;i++)this.matrix4x4[i]=t[i]},E.prototype._$IT=function(){return this.matrix4x4},E.prototype.setPremultipliedAlpha=function(t){this.premultipliedAlpha=t},E.prototype.isPremultipliedAlpha=function(){return this.premultipliedAlpha},E.prototype.setAnisotropy=function(t){this.anisotropy=t},E.prototype.getAnisotropy=function(){return this.anisotropy},E.prototype.getClippingProcess=function(){return this.clippingProcess},E.prototype.setClippingProcess=function(t){this.clippingProcess=t},E.prototype.setClipBufPre_clipContextForMask=function(t){this.clipBufPre_clipContextMask=t},E.prototype.getClipBufPre_clipContextMask=function(){return this.clipBufPre_clipContextMask},E.prototype.setClipBufPre_clipContextForDraw=function(t){this.clipBufPre_clipContextDraw=t},E.prototype.getClipBufPre_clipContextDraw=function(){return this.clipBufPre_clipContextDraw},I._$ur=-2,I._$c2=1,I._$_b=2,I.prototype._$F0=function(t){this._$kP=t._$nP(),this._$dr=t._$nP()},I.prototype.readV2_opacity=function(t){t.getFormatVersion()>=G.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this._$mS=t._$Tb())},I.prototype.init=function(t){},I.prototype._$Nr=function(t,i){},I.prototype.interpolateOpacity=function(t,i,e,r){null==this._$mS?e.setInterpolatedOpacity(1):e.setInterpolatedOpacity(v._$br(t,i,r,this._$mS))},I.prototype._$2b=function(t,i){},I.prototype._$nb=function(t,i,e,r,o,n,s){},I.prototype.getType=function(){},I.prototype._$gs=function(t){this._$dr=t},I.prototype._$a2=function(t){this._$kP=t},I.prototype.getTargetBaseDataID=function(){return this._$dr},I.prototype.getBaseDataID=function(){return this._$kP},I.prototype._$32=function(){return null!=this._$dr&&this._$dr!=yt._$2o()},w._$W2=0,w._$CS=w._$W2,w._$Mo=function(){return!0},w._$XP=function(t){try{for(var i=getTimeMSec();getTimeMSec()-i=t.length)return!1;for(var o=i;o=0;--e){var r=this._$Ob[e].getParamIndex(i);if(r==x._$ds&&(r=t.getParamIndex(this._$Ob[e].getParamID())),t._$Xb(r))return!0}return!1},D.prototype._$Q2=function(t,i){for(var e,r,o=this._$Ob.length,n=t._$v2(),s=0,_=0;_U._$Qb&&console.log("err 23245\n");for(var o=this._$Ob.length,n=1,s=1,_=0,a=0;a=0;--n)e[n]=o[n]}else this.mult_fast(t,i,e,r)},R.prototype.mult_fast=function(t,i,e,r){r?(e[0]=t[0]*i[0]+t[4]*i[1]+t[8]*i[2],e[4]=t[0]*i[4]+t[4]*i[5]+t[8]*i[6],e[8]=t[0]*i[8]+t[4]*i[9]+t[8]*i[10],e[12]=t[0]*i[12]+t[4]*i[13]+t[8]*i[14]+t[12],e[1]=t[1]*i[0]+t[5]*i[1]+t[9]*i[2],e[5]=t[1]*i[4]+t[5]*i[5]+t[9]*i[6],e[9]=t[1]*i[8]+t[5]*i[9]+t[9]*i[10],e[13]=t[1]*i[12]+t[5]*i[13]+t[9]*i[14]+t[13],e[2]=t[2]*i[0]+t[6]*i[1]+t[10]*i[2],e[6]=t[2]*i[4]+t[6]*i[5]+t[10]*i[6],e[10]=t[2]*i[8]+t[6]*i[9]+t[10]*i[10],e[14]=t[2]*i[12]+t[6]*i[13]+t[10]*i[14]+t[14],e[3]=e[7]=e[11]=0,e[15]=1):(e[0]=t[0]*i[0]+t[4]*i[1]+t[8]*i[2]+t[12]*i[3],e[4]=t[0]*i[4]+t[4]*i[5]+t[8]*i[6]+t[12]*i[7],e[8]=t[0]*i[8]+t[4]*i[9]+t[8]*i[10]+t[12]*i[11],e[12]=t[0]*i[12]+t[4]*i[13]+t[8]*i[14]+t[12]*i[15],e[1]=t[1]*i[0]+t[5]*i[1]+t[9]*i[2]+t[13]*i[3],e[5]=t[1]*i[4]+t[5]*i[5]+t[9]*i[6]+t[13]*i[7],e[9]=t[1]*i[8]+t[5]*i[9]+t[9]*i[10]+t[13]*i[11],e[13]=t[1]*i[12]+t[5]*i[13]+t[9]*i[14]+t[13]*i[15],e[2]=t[2]*i[0]+t[6]*i[1]+t[10]*i[2]+t[14]*i[3],e[6]=t[2]*i[4]+t[6]*i[5]+t[10]*i[6]+t[14]*i[7],e[10]=t[2]*i[8]+t[6]*i[9]+t[10]*i[10]+t[14]*i[11],e[14]=t[2]*i[12]+t[6]*i[13]+t[10]*i[14]+t[14]*i[15],e[3]=t[3]*i[0]+t[7]*i[1]+t[11]*i[2]+t[15]*i[3],e[7]=t[3]*i[4]+t[7]*i[5]+t[11]*i[6]+t[15]*i[7],e[11]=t[3]*i[8]+t[7]*i[9]+t[11]*i[10]+t[15]*i[11],e[15]=t[3]*i[12]+t[7]*i[13]+t[11]*i[14]+t[15]*i[15])},R.prototype.translate=function(t,i,e){this.m[12]=this.m[0]*t+this.m[4]*i+this.m[8]*e+this.m[12],this.m[13]=this.m[1]*t+this.m[5]*i+this.m[9]*e+this.m[13],this.m[14]=this.m[2]*t+this.m[6]*i+this.m[10]*e+this.m[14],this.m[15]=this.m[3]*t+this.m[7]*i+this.m[11]*e+this.m[15]},R.prototype.scale=function(t,i,e){this.m[0]*=t,this.m[4]*=i,this.m[8]*=e,this.m[1]*=t,this.m[5]*=i,this.m[9]*=e,this.m[2]*=t,this.m[6]*=i,this.m[10]*=e,this.m[3]*=t,this.m[7]*=i,this.m[11]*=e},R.prototype.rotateX=function(t){var i=Lt.fcos(t),e=Lt._$9(t),r=this.m[4];this.m[4]=r*i+this.m[8]*e,this.m[8]=r*-e+this.m[8]*i,r=this.m[5],this.m[5]=r*i+this.m[9]*e,this.m[9]=r*-e+this.m[9]*i,r=this.m[6],this.m[6]=r*i+this.m[10]*e,this.m[10]=r*-e+this.m[10]*i,r=this.m[7],this.m[7]=r*i+this.m[11]*e,this.m[11]=r*-e+this.m[11]*i},R.prototype.rotateY=function(t){var i=Lt.fcos(t),e=Lt._$9(t),r=this.m[0];this.m[0]=r*i+this.m[8]*-e,this.m[8]=r*e+this.m[8]*i,r=this.m[1],this.m[1]=r*i+this.m[9]*-e,this.m[9]=r*e+this.m[9]*i,r=m[2],this.m[2]=r*i+this.m[10]*-e,this.m[10]=r*e+this.m[10]*i,r=m[3],this.m[3]=r*i+this.m[11]*-e,this.m[11]=r*e+this.m[11]*i},R.prototype.rotateZ=function(t){var i=Lt.fcos(t),e=Lt._$9(t),r=this.m[0];this.m[0]=r*i+this.m[4]*e,this.m[4]=r*-e+this.m[4]*i,r=this.m[1],this.m[1]=r*i+this.m[5]*e,this.m[5]=r*-e+this.m[5]*i,r=this.m[2],this.m[2]=r*i+this.m[6]*e,this.m[6]=r*-e+this.m[6]*i,r=this.m[3],this.m[3]=r*i+this.m[7]*e,this.m[7]=r*-e+this.m[7]*i},b.prototype=new et,b._$tP=new Object,b._$27=function(){b._$tP.clear()},b.getID=function(t){var i=b._$tP[t];return null==i&&(i=new b(t),b._$tP[t]=i),i},b.prototype._$3s=function(){return new b},F._$kS=-1,F._$pS=0,F._$hb=1,F.STATE_IDENTITY=0,F._$gb=1,F._$fo=2,F._$go=4,F.prototype.transform=function(t,i,e){var r,o,n,s,_,a,h=0,l=0;switch(this._$hi){default:return;case F._$go|F._$fo|F._$gb:for(r=this._$7,o=this._$H,n=this._$k,s=this._$f,_=this._$g,a=this._$w;--e>=0;){var $=t[h++],u=t[h++];i[l++]=r*$+o*u+n,i[l++]=s*$+_*u+a}return;case F._$go|F._$fo:for(r=this._$7,o=this._$H,s=this._$f,_=this._$g;--e>=0;){var $=t[h++],u=t[h++];i[l++]=r*$+o*u,i[l++]=s*$+_*u}return;case F._$go|F._$gb:for(o=this._$H,n=this._$k,s=this._$f,a=this._$w;--e>=0;){var $=t[h++];i[l++]=o*t[h++]+n,i[l++]=s*$+a}return;case F._$go:for(o=this._$H,s=this._$f;--e>=0;){var $=t[h++];i[l++]=o*t[h++],i[l++]=s*$}return;case F._$fo|F._$gb:for(r=this._$7,n=this._$k,_=this._$g,a=this._$w;--e>=0;)i[l++]=r*t[h++]+n,i[l++]=_*t[h++]+a;return;case F._$fo:for(r=this._$7,_=this._$g;--e>=0;)i[l++]=r*t[h++],i[l++]=_*t[h++];return;case F._$gb:for(n=this._$k,a=this._$w;--e>=0;)i[l++]=t[h++]+n,i[l++]=t[h++]+a;return;case F.STATE_IDENTITY:return void(t==i&&h==l||w._$jT(t,h,i,l,2*e))}},F.prototype.update=function(){0==this._$H&&0==this._$f?1==this._$7&&1==this._$g?0==this._$k&&0==this._$w?(this._$hi=F.STATE_IDENTITY,this._$Z=F._$pS):(this._$hi=F._$gb,this._$Z=F._$hb):0==this._$k&&0==this._$w?(this._$hi=F._$fo,this._$Z=F._$kS):(this._$hi=F._$fo|F._$gb,this._$Z=F._$kS):0==this._$7&&0==this._$g?0==this._$k&&0==this._$w?(this._$hi=F._$go,this._$Z=F._$kS):(this._$hi=F._$go|F._$gb,this._$Z=F._$kS):0==this._$k&&0==this._$w?(this._$hi=F._$go|F._$fo,this._$Z=F._$kS):(this._$hi=F._$go|F._$fo|F._$gb,this._$Z=F._$kS)},F.prototype._$RT=function(t){this._$IT(t);var i=t[0],e=t[2],r=t[1],o=t[3],n=Math.sqrt(i*i+r*r),s=i*o-e*r;0==n?at._$so&&console.log("affine._$RT() / rt==0"):(t[0]=n,t[1]=s/n,t[2]=(r*o+i*e)/s,t[3]=Math.atan2(r,i))},F.prototype._$ho=function(t,i,e,r){var o=new Float32Array(6),n=new Float32Array(6);t._$RT(o),i._$RT(n);var s=new Float32Array(6);s[0]=o[0]+(n[0]-o[0])*e,s[1]=o[1]+(n[1]-o[1])*e,s[2]=o[2]+(n[2]-o[2])*e,s[3]=o[3]+(n[3]-o[3])*e,s[4]=o[4]+(n[4]-o[4])*e,s[5]=o[5]+(n[5]-o[5])*e,r._$CT(s)},F.prototype._$CT=function(t){var i=Math.cos(t[3]),e=Math.sin(t[3]);this._$7=t[0]*i,this._$f=t[0]*e,this._$H=t[1]*(t[2]*i-e),this._$g=t[1]*(t[2]*e+i),this._$k=t[4],this._$w=t[5],this.update()},F.prototype._$IT=function(t){t[0]=this._$7,t[1]=this._$f,t[2]=this._$H,t[3]=this._$g,t[4]=this._$k,t[5]=this._$w},C.prototype=new s,C._$cs="VISIBLE:",C._$ar="LAYOUT:",C._$Co=0,C._$D2=[],C._$1T=1,C.loadMotion=function(t){var i=new C,e=[0],r=t.length;i._$yT=0;for(var o=0;o=0){var a=new B;O.startsWith(t,s,C._$cs)?(a._$RP=B._$hs,a._$4P=new String(t,s,_-s)):O.startsWith(t,s,C._$ar)?(a._$4P=new String(t,s+7,_-s-7),O.startsWith(t,s+7,"ANCHOR_X")?a._$RP=B._$xs:O.startsWith(t,s+7,"ANCHOR_Y")?a._$RP=B._$us:O.startsWith(t,s+7,"SCALE_X")?a._$RP=B._$qs:O.startsWith(t,s+7,"SCALE_Y")?a._$RP=B._$Ys:O.startsWith(t,s+7,"X")?a._$RP=B._$ws:O.startsWith(t,s+7,"Y")&&(a._$RP=B._$Ns)):(a._$RP=B._$Fr,a._$4P=new String(t,s,_-s)),i.motions.push(a);var h=0;for(C._$D2.clear(),o=_+1;o0){C._$D2.push(l),h++;var $=e[0];if($i._$yT&&(i._$yT=h)}}}else{for(var s=o,_=-1;o=0)for(_==s+4&&"f"==t[s+1]&&"p"==t[s+2]&&"s"==t[s+3]&&(u=!0),o=_+1;o0&&u&&5=l?l-1:s];t.setParamFloat($,u)}else if(B._$ws<=h._$RP&&h._$RP<=B._$Ys);else{var p=t.getParamFloat($),f=h._$I0[s>=l?l-1:s],c=h._$I0[s+1>=l?l-1:s+1],d=f+(c-f)*_,g=p+(d-p)*e;t.setParamFloat($,g)}}s>=this._$yT&&(this._$E?(r._$z2=i,this.loopFadeIn&&(r._$bs=i)):r._$9L=!0)},C.prototype._$r0=function(){return this._$E},C.prototype._$aL=function(t){this._$E=t},C.prototype.isLoopFadeIn=function(){return this.loopFadeIn},C.prototype.setLoopFadeIn=function(t){this.loopFadeIn=t},N.prototype.clear=function(){this.size=0},N.prototype.add=function(t){if(this._$P.length<=this.size){var i=new Float32Array(2*this.size);w._$jT(this._$P,0,i,0,this.size),this._$P=i}this._$P[this.size++]=t},N.prototype._$BL=function(){var t=new Float32Array(this.size);return w._$jT(this._$P,0,t,0,this.size),t},B._$Fr=0,B._$hs=1,B._$ws=100,B._$Ns=101,B._$xs=102,B._$us=103,B._$qs=104,B._$Ys=105,U._$Ms=1,U._$Qs=2,U._$i2=0,U._$No=2,U._$do=U._$Ms,U._$Ls=!0,U._$1r=5,U._$Qb=65,U._$J=1e-4,U._$FT=.001,U._$Ss=3,G._$o7=6,G._$S7=7,G._$s7=8,G._$77=9,G.LIVE2D_FORMAT_VERSION_V2_10_SDK2=10,G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1=11,G._$T7=G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1,G._$Is=-2004318072,G._$h0=0,G._$4L=23,G._$7P=33,G._$uT=function(t){console.log("_$bo :: _$6 _$mo _$E0 : %d\n",t)},G._$9o=function(t){if(t<40)return G._$uT(t),null;if(t<50)return G._$uT(t),null;if(t<60)return G._$uT(t),null;if(t<100)switch(t){case 65:return new Z;case 66:return new D;case 67:return new x;case 68:return new z;case 69:return new P;case 70:return new $t;default:return G._$uT(t),null}else if(t<150)switch(t){case 131:return new st;case 133:return new tt;case 136:return new p;case 137:return new ot;case 142:return new j}return G._$uT(t),null},Y._$HP=0,Y._$_0=!0;Y._$V2=-1,Y._$W0=-1,Y._$jr=!1,Y._$ZS=!0,Y._$tr=-1e6,Y._$lr=1e6,Y._$is=32,Y._$e=!1,Y.prototype.getDrawDataIndex=function(t){for(var i=this._$aS.length-1;i>=0;--i)if(null!=this._$aS[i]&&this._$aS[i].getDrawDataID()==t)return i;return-1},Y.prototype.getDrawData=function(t){if(t instanceof b){if(null==this._$Bo){this._$Bo=new Object;for(var i=this._$aS.length,e=0;e0&&this.release();for(var t=this._$Ri.getModelImpl(),i=t._$Xr(),r=i.length,o=new Array,n=new Array,s=0;s=0)&&(this._$3S.push(m),this._$db.push(n[s]),o[s]=null,y=!0)}}if(!y)break}var P=t._$E2();if(null!=P){var S=P._$1s();if(null!=S)for(var v=S.length,s=0;s=0;i--)this._$Js[i]=Y._$jr;return this._$QT=!1,Y._$e&&_.dump("_$eL"),!1},Y.prototype.preDraw=function(t){null!=this.clipManager&&(t._$ZT(),this.clipManager.setupClip(this,t))},Y.prototype.draw=function(t){if(null==this._$Ws)return void _._$li("call _$Ri.update() before _$Ri.draw() ");var i=this._$Ws.length;t._$ZT();for(var e=0;e=0;--i)if(this._$pb[i]==t)return i;return this._$02(t,0,Y._$tr,Y._$lr)},Y.prototype._$BS=function(t){return this.getBaseDataIndex(t)},Y.prototype.getBaseDataIndex=function(t){for(var i=this._$3S.length-1;i>=0;--i)if(null!=this._$3S[i]&&this._$3S[i].getBaseDataID()==t)return i;return-1},Y.prototype._$UT=function(t,i){var e=new Float32Array(i);return w._$jT(t,0,e,0,t.length),e},Y.prototype._$02=function(t,i,e,r){if(this._$qo>=this._$pb.length){var o=this._$pb.length,n=new Array(2*o);w._$jT(this._$pb,0,n,0,o),this._$pb=n,this._$_2=this._$UT(this._$_2,2*o),this._$vr=this._$UT(this._$vr,2*o),this._$Rr=this._$UT(this._$Rr,2*o),this._$Or=this._$UT(this._$Or,2*o);var s=new Array;w._$jT(this._$Js,0,s,0,o),this._$Js=s}return this._$pb[this._$qo]=t,this._$_2[this._$qo]=i,this._$vr[this._$qo]=i,this._$Rr[this._$qo]=e,this._$Or[this._$qo]=r,this._$Js[this._$qo]=Y._$ZS,this._$qo++},Y.prototype._$Zo=function(t,i){this._$3S[t]=i},Y.prototype.setParamFloat=function(t,i){ithis._$Or[t]&&(i=this._$Or[t]),this._$_2[t]=i},Y.prototype.loadParam=function(){var t=this._$_2.length;t>this._$fs.length&&(t=this._$fs.length),w._$jT(this._$fs,0,this._$_2,0,t)},Y.prototype.saveParam=function(){var t=this._$_2.length;t>this._$fs.length&&(this._$fs=new Float32Array(t)),w._$jT(this._$_2,0,this._$fs,0,t)},Y.prototype._$v2=function(){return this._$co},Y.prototype._$WS=function(){return this._$QT},Y.prototype._$Xb=function(t){return this._$Js[t]==Y._$ZS},Y.prototype._$vs=function(){return this._$Es},Y.prototype._$Tr=function(){return this._$ZP},Y.prototype.getBaseData=function(t){return this._$3S[t]},Y.prototype.getParamFloat=function(t){return this._$_2[t]},Y.prototype.getParamMax=function(t){return this._$Or[t]},Y.prototype.getParamMin=function(t){return this._$Rr[t]},Y.prototype.setPartsOpacity=function(t,i){this._$Hr[t].setPartsOpacity(i)},Y.prototype.getPartsOpacity=function(t){return this._$Hr[t].getPartsOpacity()},Y.prototype.getPartsDataIndex=function(t){for(var i=this._$F2.length-1;i>=0;--i)if(null!=this._$F2[i]&&this._$F2[i]._$p2()==t)return i;return-1},Y.prototype._$q2=function(t){return this._$db[t]},Y.prototype._$C2=function(t){return this._$8b[t]},Y.prototype._$Bb=function(t){return this._$Hr[t]},Y.prototype._$5s=function(t,i){for(var e=this._$Ws.length,r=t,o=0;o0;)n+=i;return r},k._$C=function(t){var i=null,e=null;try{i=t instanceof Array?t:new _$Xs(t,8192),e=new _$js;for(var r,o=new Int8Array(1e3);(r=i.read(o))>0;)e.write(o,0,r);return e._$TS()}finally{null!=t&&t.close(),null!=e&&(e.flush(),e.close())}},V.prototype._$T2=function(){return w.getUserTimeMSec()+Math._$10()*(2*this._$Br-1)},V.prototype._$uo=function(t){this._$Br=t},V.prototype._$QS=function(t,i,e){this._$Dr=t,this._$Cb=i,this._$mr=e},V.prototype._$7T=function(t){var i,e=w.getUserTimeMSec(),r=0;switch(this._$_L){case STATE_CLOSING:r=(e-this._$bb)/this._$Dr,r>=1&&(r=1,this._$_L=wt.STATE_CLOSED,this._$bb=e),i=1-r;break;case STATE_CLOSED:r=(e-this._$bb)/this._$Cb,r>=1&&(this._$_L=wt.STATE_OPENING,this._$bb=e),i=0;break;case STATE_OPENING:r=(e-this._$bb)/this._$mr,r>=1&&(r=1,this._$_L=wt.STATE_INTERVAL,this._$12=this._$T2()),i=r;break;case STATE_INTERVAL:this._$12.9?at.EXPAND_W:0;this.gl.drawElements(a,e,r,o,n,h,this.transform,_)}},X.prototype._$Rs=function(){throw new Error("_$Rs")},X.prototype._$Ds=function(t){throw new Error("_$Ds")},X.prototype._$K2=function(){for(var t=0;t=0;--i){var e=t[i];eW._$R2&&(W._$R2=e)}},W._$or=function(){return W._$52},W._$Pr=function(){return W._$R2},W.prototype._$F0=function(t){this._$gP=t._$nP(),this._$dr=t._$nP(),this._$GS=t._$nP(),this._$qb=t._$6L(),this._$Lb=t._$cS(),this._$mS=t._$Tb(),t.getFormatVersion()>=G._$T7?(this.clipID=t._$nP(),this.clipIDList=this.convertClipIDForV2_11(this.clipID)):this.clipIDList=null,W._$Sb(this._$Lb)},W.prototype.getClipIDList=function(){return this.clipIDList},W.prototype._$Nr=function(t,i){if(i._$IS[0]=!1,i._$Us=v._$Z2(t,this._$GS,i._$IS,this._$Lb),at._$Zs);else if(i._$IS[0])return;i._$7s=v._$br(t,this._$GS,i._$IS,this._$mS)},W.prototype._$2b=function(t){},W.prototype.getDrawDataID=function(){return this._$gP},W.prototype._$j2=function(t){this._$gP=t},W.prototype.getOpacity=function(t,i){return i._$7s},W.prototype._$zS=function(t,i){return i._$Us},W.prototype.getTargetBaseDataID=function(){return this._$dr},W.prototype._$gs=function(t){this._$dr=t},W.prototype._$32=function(){return null!=this._$dr&&this._$dr!=yt._$2o()},W.prototype.getType=function(){},j._$42=0,j.prototype._$1b=function(){return this._$3S},j.prototype.getDrawDataList=function(){return this._$aS},j.prototype._$F0=function(t){this._$NL=t._$nP(),this._$aS=t._$nP(),this._$3S=t._$nP()},j.prototype._$kr=function(t){t._$Zo(this._$3S),t._$xo(this._$aS),this._$3S=null,this._$aS=null},q.prototype=new i,q.loadModel=function(t){var e=new q;return i._$62(e,t),e},q.loadModel=function(t){var e=new q;return i._$62(e,t),e},q._$to=function(){return new q},q._$er=function(t){var i=new _$5("../_$_r/_$t0/_$Ri/_$_P._$d");if(0==i.exists())throw new _$ls("_$t0 _$_ _$6 _$Ui :: "+i._$PL());for(var e=["../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1"],r=q.loadModel(i._$3b()),o=0;o=0){var h=new B;O.startsWith(t,_,J._$cs)?(h._$RP=B._$hs,h._$4P=O.createString(t,_,a-_)):O.startsWith(t,_,J._$ar)?(h._$4P=O.createString(t,_+7,a-_-7),O.startsWith(t,_+7,"ANCHOR_X")?h._$RP=B._$xs:O.startsWith(t,_+7,"ANCHOR_Y")?h._$RP=B._$us:O.startsWith(t,_+7,"SCALE_X")?h._$RP=B._$qs:O.startsWith(t,_+7,"SCALE_Y")?h._$RP=B._$Ys:O.startsWith(t,_+7,"X")?h._$RP=B._$ws:O.startsWith(t,_+7,"Y")&&(h._$RP=B._$Ns)):(h._$RP=B._$Fr,h._$4P=O.createString(t,_,a-_)),i.motions.push(h);var l=0,$=[];for(o=a+1;o0){$.push(u),l++;var p=e[0];if(pi._$yT&&(i._$yT=l)}}}else{for(var _=o,a=-1;o=0)for(a==_+4&&"f"==Q(t,_+1)&&"p"==Q(t,_+2)&&"s"==Q(t,_+3)&&(f=!0),o=a+1;o0&&f&&5=l?l-1:s];t.setParamFloat($,u)}else if(B._$ws<=h._$RP&&h._$RP<=B._$Ys);else{var p,f=t.getParamIndex($),c=t.getModelContext(),d=c.getParamMax(f),g=c.getParamMin(f),y=.4*(d-g),m=c.getParamFloat(f),T=h._$I0[s>=l?l-1:s],P=h._$I0[s+1>=l?l-1:s+1];p=Ty||T>P&&T-P>y?T:T+(P-T)*_;var S=m+(p-m)*e;t.setParamFloat($,S)}}s>=this._$yT&&(this._$E?(r._$z2=i,this.loopFadeIn&&(r._$bs=i)):r._$9L=!0),this._$eP=e},J.prototype._$r0=function(){return this._$E},J.prototype._$aL=function(t){this._$E=t},J.prototype._$S0=function(){return this._$D0},J.prototype._$U0=function(t){this._$D0=t},J.prototype.isLoopFadeIn=function(){return this.loopFadeIn},J.prototype.setLoopFadeIn=function(t){this.loopFadeIn=t},N.prototype.clear=function(){this.size=0},N.prototype.add=function(t){if(this._$P.length<=this.size){var i=new Float32Array(2*this.size);w._$jT(this._$P,0,i,0,this.size),this._$P=i}this._$P[this.size++]=t},N.prototype._$BL=function(){var t=new Float32Array(this.size);return w._$jT(this._$P,0,t,0,this.size),t},B._$Fr=0,B._$hs=1,B._$ws=100,B._$Ns=101,B._$xs=102,B._$us=103,B._$qs=104,B._$Ys=105,Z.prototype=new I,Z._$gT=new Array,Z.prototype._$zP=function(){this._$GS=new D,this._$GS._$zP()},Z.prototype._$F0=function(t){I.prototype._$F0.call(this,t),this._$A=t._$6L(),this._$o=t._$6L(),this._$GS=t._$nP(),this._$Eo=t._$nP(),I.prototype.readV2_opacity.call(this,t)},Z.prototype.init=function(t){var i=new K(this),e=(this._$o+1)*(this._$A+1);return null!=i._$Cr&&(i._$Cr=null),i._$Cr=new Float32Array(2*e),null!=i._$hr&&(i._$hr=null),this._$32()?i._$hr=new Float32Array(2*e):i._$hr=null,i},Z.prototype._$Nr=function(t,i){var e=i;if(this._$GS._$Ur(t)){var r=this._$VT(),o=Z._$gT;o[0]=!1,v._$Vr(t,this._$GS,o,r,this._$Eo,e._$Cr,0,2),i._$Ib(o[0]),this.interpolateOpacity(t,this._$GS,i,o)}},Z.prototype._$2b=function(t,i){var e=i;if(e._$hS(!0),this._$32()){var r=this.getTargetBaseDataID();if(e._$8r==I._$ur&&(e._$8r=t.getBaseDataIndex(r)),e._$8r<0)at._$so&&_._$li("_$L _$0P _$G :: %s",r),e._$hS(!1);else{var o=t.getBaseData(e._$8r),n=t._$q2(e._$8r);if(null!=o&&n._$yo()){var s=n.getTotalScale();e.setTotalScale_notForClient(s);var a=n.getTotalOpacity();e.setTotalOpacity(a*e.getInterpolatedOpacity()),o._$nb(t,n,e._$Cr,e._$hr,this._$VT(),0,2),e._$hS(!0)}else e._$hS(!1)}}else e.setTotalOpacity(e.getInterpolatedOpacity())},Z.prototype._$nb=function(t,i,e,r,o,n,s){var _=i,a=null!=_._$hr?_._$hr:_._$Cr;Z.transformPoints_sdk2(e,r,o,n,s,a,this._$o,this._$A)},Z.transformPoints_sdk2=function(i,e,r,o,n,s,_,a){for(var h,l,$,u=r*n,p=0,f=0,c=0,d=0,g=0,y=0,m=!1,T=o;T=1){var b=s[2*(0+a*M)],F=s[2*(0+a*M)+1],C=p-2*c+1*g,N=f-2*d+1*y,x=p+3*g,O=f+3*y,D=p-2*c+3*g,R=f-2*d+3*y,B=.5*(v- -2),U=.5*(L-1);B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else{var G=0|S;G==a&&(G=a-1);var B=.5*(v- -2),U=S-G,Y=G/a,k=(G+1)/a,b=s[2*(0+G*M)],F=s[2*(0+G*M)+1],x=s[2*(0+(G+1)*M)],O=s[2*(0+(G+1)*M)+1],C=p-2*c+Y*g,N=f-2*d+Y*y,D=p-2*c+k*g,R=f-2*d+k*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(1<=v)if(L<=0){var D=s[2*(_+0*M)],R=s[2*(_+0*M)+1],x=p+3*c,O=f+3*d,C=p+1*c-2*g,N=f+1*d-2*y,b=p+3*c-2*g,F=f+3*d-2*y,B=.5*(v-1),U=.5*(L- -2);B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(L>=1){var C=s[2*(_+a*M)],N=s[2*(_+a*M)+1],b=p+3*c+1*g,F=f+3*d+1*y,D=p+1*c+3*g,R=f+1*d+3*y,x=p+3*c+3*g,O=f+3*d+3*y,B=.5*(v-1),U=.5*(L-1);B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else{var G=0|S;G==a&&(G=a-1);var B=.5*(v-1),U=S-G,Y=G/a,k=(G+1)/a,C=s[2*(_+G*M)],N=s[2*(_+G*M)+1],D=s[2*(_+(G+1)*M)],R=s[2*(_+(G+1)*M)+1],b=p+3*c+Y*g,F=f+3*d+Y*y,x=p+3*c+k*g,O=f+3*d+k*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(L<=0){var V=0|P;V==_&&(V=_-1);var B=P-V,U=.5*(L- -2),X=V/_,z=(V+1)/_,D=s[2*(V+0*M)],R=s[2*(V+0*M)+1],x=s[2*(V+1+0*M)],O=s[2*(V+1+0*M)+1],C=p+X*c-2*g,N=f+X*d-2*y,b=p+z*c-2*g,F=f+z*d-2*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(L>=1){var V=0|P;V==_&&(V=_-1);var B=P-V,U=.5*(L-1),X=V/_,z=(V+1)/_,C=s[2*(V+a*M)],N=s[2*(V+a*M)+1],b=s[2*(V+1+a*M)],F=s[2*(V+1+a*M)+1],D=p+X*c+3*g,R=f+X*d+3*y,x=p+z*c+3*g,O=f+z*d+3*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else t.err.printf("_$li calc : %.4f , %.4f\t\t\t\t\t@@BDBoxGrid\n",v,L);else e[T]=p+v*c+L*g,e[T+1]=f+v*d+L*y}else l=P-(0|P),$=S-(0|S),h=2*((0|P)+(0|S)*(_+1)),l+$<1?(e[T]=s[h]*(1-l-$)+s[h+2]*l+s[h+2*(_+1)]*$,e[T+1]=s[h+1]*(1-l-$)+s[h+3]*l+s[h+2*(_+1)+1]*$):(e[T]=s[h+2*(_+1)+2]*(l-1+$)+s[h+2*(_+1)]*(1-l)+s[h+2]*(1-$),e[T+1]=s[h+2*(_+1)+3]*(l-1+$)+s[h+2*(_+1)+1]*(1-l)+s[h+3]*(1-$))}},Z.prototype.transformPoints_sdk1=function(t,i,e,r,o,n,s){for(var _,a,h,l,$,u,p,f=i,c=this._$o,d=this._$A,g=o*s,y=null!=f._$hr?f._$hr:f._$Cr,m=n;m1&&(_=1),a<0?a=0:a>1&&(a=1),_*=c,a*=d,h=0|_,l=0|a,h>c-1&&(h=c-1),l>d-1&&(l=d-1),u=_-h,p=a-l,$=2*(h+l*(c+1))):(_=e[m]*c,a=e[m+1]*d,u=_-(0|_),p=a-(0|a),$=2*((0|_)+(0|a)*(c+1))),u+p<1?(r[m]=y[$]*(1-u-p)+y[$+2]*u+y[$+2*(c+1)]*p,r[m+1]=y[$+1]*(1-u-p)+y[$+3]*u+y[$+2*(c+1)+1]*p):(r[m]=y[$+2*(c+1)+2]*(u-1+p)+y[$+2*(c+1)]*(1-u)+y[$+2]*(1-p),r[m+1]=y[$+2*(c+1)+3]*(u-1+p)+y[$+2*(c+1)+1]*(1-u)+y[$+3]*(1-p))},Z.prototype._$VT=function(){return(this._$o+1)*(this._$A+1)},Z.prototype.getType=function(){return I._$_b},K.prototype=new _t,tt._$42=0,tt.prototype._$zP=function(){this._$3S=new Array,this._$aS=new Array},tt.prototype._$F0=function(t){this._$g0=t._$8L(),this.visible=t._$8L(),this._$NL=t._$nP(),this._$3S=t._$nP(),this._$aS=t._$nP()},tt.prototype.init=function(t){var i=new it(this);return i.setPartsOpacity(this.isVisible()?1:0),i},tt.prototype._$6o=function(t){if(null==this._$3S)throw new Error("_$3S _$6 _$Wo@_$6o");this._$3S.push(t)},tt.prototype._$3o=function(t){if(null==this._$aS)throw new Error("_$aS _$6 _$Wo@_$3o");this._$aS.push(t)},tt.prototype._$Zo=function(t){this._$3S=t},tt.prototype._$xo=function(t){this._$aS=t},tt.prototype.isVisible=function(){return this.visible},tt.prototype._$uL=function(){return this._$g0},tt.prototype._$KP=function(t){this.visible=t},tt.prototype._$ET=function(t){this._$g0=t},tt.prototype.getBaseData=function(){return this._$3S},tt.prototype.getDrawData=function(){return this._$aS},tt.prototype._$p2=function(){return this._$NL},tt.prototype._$ob=function(t){this._$NL=t},tt.prototype.getPartsID=function(){return this._$NL},tt.prototype._$MP=function(t){this._$NL=t},it.prototype=new $,it.prototype.getPartsOpacity=function(){return this._$VS},it.prototype.setPartsOpacity=function(t){this._$VS=t},et._$L7=function(){u._$27(),yt._$27(),b._$27(),l._$27()},et.prototype.toString=function(){return this.id},rt.prototype._$F0=function(t){},ot.prototype._$1s=function(){return this._$4S},ot.prototype._$zP=function(){this._$4S=new Array},ot.prototype._$F0=function(t){this._$4S=t._$nP()},ot.prototype._$Ks=function(t){this._$4S.push(t)},nt.tr=new gt,nt._$50=new gt,nt._$Ti=new Array(0,0),nt._$Pi=new Array(0,0),nt._$B=new Array(0,0),nt.prototype._$lP=function(t,i,e,r){this.viewport=new Array(t,i,e,r)},nt.prototype._$bL=function(){this.context.save();var t=this.viewport;null!=t&&(this.context.beginPath(),this.context._$Li(t[0],t[1],t[2],t[3]),this.context.clip())},nt.prototype._$ei=function(){this.context.restore()},nt.prototype.drawElements=function(t,i,e,r,o,n,s,a){try{o!=this._$Qo&&(this._$Qo=o,this.context.globalAlpha=o);for(var h=i.length,l=t.width,$=t.height,u=this.context,p=this._$xP,f=this._$uP,c=this._$6r,d=this._$3r,g=nt.tr,y=nt._$Ti,m=nt._$Pi,T=nt._$B,P=0;P.02?nt.expandClip(t,i,e,r,l,$,u,p,f,c):nt.clipWithTransform(t,null,o,n,s,_,a,h)},nt.expandClip=function(t,i,e,r,o,n,s,_,a,h){var l=s-o,$=_-n,u=a-o,p=h-n,f=l*p-$*u>0?e:-e,c=-$,d=l,g=a-s,y=h-_,m=-y,T=g,P=Math.sqrt(g*g+y*y),S=-p,v=u,L=Math.sqrt(u*u+p*p),M=o-f*c/r,E=n-f*d/r,A=s-f*c/r,I=_-f*d/r,w=s-f*m/P,x=_-f*T/P,O=a-f*m/P,D=h-f*T/P,R=o+f*S/L,b=n+f*v/L,F=a+f*S/L,C=h+f*v/L,N=nt._$50;return null!=i._$P2(N)&&(nt.clipWithTransform(t,N,M,E,A,I,w,x,O,D,F,C,R,b),!0)},nt.clipWithTransform=function(t,i,e,r,o,n,s,a){if(arguments.length<7)return void _._$li("err : @LDGL.clip()");if(!(arguments[1]instanceof gt))return void _._$li("err : a[0] is _$6 LDTransform @LDGL.clip()");var h=nt._$B,l=i,$=arguments;if(t.beginPath(),l){l._$PS($[2],$[3],h),t.moveTo(h[0],h[1]);for(var u=4;u<$.length;u+=2)l._$PS($[u],$[u+1],h),t.lineTo(h[0],h[1])}else{t.moveTo($[2],$[3]);for(var u=4;u<$.length;u+=2)t.lineTo($[u],$[u+1])}t.clip()},nt.createCanvas=function(t,i){var e=document.createElement("canvas");return e.setAttribute("width",t),e.setAttribute("height",i),e||_._$li("err : "+e),e},nt.dumpValues=function(){for(var t="",i=0;i1?1:.5-.5*Math.cos(t*Lt.PI_F)},lt._$fr=-1,lt.prototype.toString=function(){return this._$ib},$t.prototype=new W,$t._$42=0,$t._$Os=30,$t._$ms=0,$t._$ns=1,$t._$_s=2,$t._$gT=new Array,$t.prototype._$_S=function(t){this._$LP=t},$t.prototype.getTextureNo=function(){return this._$LP},$t.prototype._$ZL=function(){return this._$Qi},$t.prototype._$H2=function(){return this._$JP},$t.prototype.getNumPoints=function(){return this._$d0},$t.prototype.getType=function(){return W._$wb},$t.prototype._$B2=function(t,i,e){var r=i,o=null!=r._$hr?r._$hr:r._$Cr;switch(U._$do){default:case U._$Ms:throw new Error("_$L _$ro ");case U._$Qs:for(var n=this._$d0-1;n>=0;--n)o[n*U._$No+4]=e}},$t.prototype._$zP=function(){this._$GS=new D,this._$GS._$zP()},$t.prototype._$F0=function(t){W.prototype._$F0.call(this,t),this._$LP=t._$6L(),this._$d0=t._$6L(),this._$Yo=t._$6L();var i=t._$nP();this._$BP=new Int16Array(3*this._$Yo);for(var e=3*this._$Yo-1;e>=0;--e)this._$BP[e]=i[e];if(this._$Eo=t._$nP(),this._$Qi=t._$nP(),t.getFormatVersion()>=G._$s7){if(this._$JP=t._$6L(),0!=this._$JP){if(0!=(1&this._$JP)){var r=t._$6L();null==this._$5P&&(this._$5P=new Object),this._$5P._$Hb=parseInt(r)}0!=(this._$JP&$t._$Os)?this._$6s=(this._$JP&$t._$Os)>>1:this._$6s=$t._$ms,0!=(32&this._$JP)&&(this.culling=!1)}}else this._$JP=0},$t.prototype.init=function(t){var i=new ut(this),e=this._$d0*U._$No,r=this._$32();switch(null!=i._$Cr&&(i._$Cr=null),i._$Cr=new Float32Array(e),null!=i._$hr&&(i._$hr=null),i._$hr=r?new Float32Array(e):null,U._$do){default:case U._$Ms:if(U._$Ls)for(var o=this._$d0-1;o>=0;--o){var n=o<<1;this._$Qi[n+1]=1-this._$Qi[n+1]}break;case U._$Qs:for(var o=this._$d0-1;o>=0;--o){var n=o<<1,s=o*U._$No,_=this._$Qi[n],a=this._$Qi[n+1];i._$Cr[s]=_,i._$Cr[s+1]=a,i._$Cr[s+4]=0,r&&(i._$hr[s]=_,i._$hr[s+1]=a,i._$hr[s+4]=0)}}return i},$t.prototype._$Nr=function(t,i){var e=i;if(this!=e._$GT()&&console.log("### assert!! ### "),this._$GS._$Ur(t)&&(W.prototype._$Nr.call(this,t,e),!e._$IS[0])){var r=$t._$gT;r[0]=!1,v._$Vr(t,this._$GS,r,this._$d0,this._$Eo,e._$Cr,U._$i2,U._$No)}},$t.prototype._$2b=function(t,i){try{this!=i._$GT()&&console.log("### assert!! ### ");var e=!1;i._$IS[0]&&(e=!0);var r=i;if(!e&&(W.prototype._$2b.call(this,t),this._$32())){var o=this.getTargetBaseDataID();if(r._$8r==W._$ur&&(r._$8r=t.getBaseDataIndex(o)),r._$8r<0)at._$so&&_._$li("_$L _$0P _$G :: %s",o);else{var n=t.getBaseData(r._$8r),s=t._$q2(r._$8r);null==n||s._$x2()?r._$AT=!1:(n._$nb(t,s,r._$Cr,r._$hr,this._$d0,U._$i2,U._$No),r._$AT=!0),r.baseOpacity=s.getTotalOpacity()}}}catch(t){throw t}},$t.prototype.draw=function(t,i,e){if(this!=e._$GT()&&console.log("### assert!! ### "),!e._$IS[0]){var r=e,o=this._$LP;o<0&&(o=1);var n=this.getOpacity(i,r)*e._$VS*e.baseOpacity,s=null!=r._$hr?r._$hr:r._$Cr;t.setClipBufPre_clipContextForDraw(e.clipBufPre_clipContext),t._$WP(this.culling),t._$Uo(o,3*this._$Yo,this._$BP,s,this._$Qi,n,this._$6s,r)}},$t.prototype.dump=function(){console.log(" _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n",this._$LP,this._$d0,this._$Yo),console.log(" _$Oi _$di = { ");for(var t=0;tstartMotion() / start _$K _$3 (m%d)\n",r,e._$sr));if(null==t)return-1;e=new dt,e._$w0=t,this.motions.push(e);var n=e._$sr;return this._$eb&&_._$Ji("MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n",r,n),n},ct.prototype.updateParam=function(t){try{for(var i=!1,e=0;eupdateParam() / _$T0 _$w0 (m%d)\n",this.motions.length-1,r._$sr),this.motions.splice(e,1),e--)):(this.motions=this.motions.splice(e,1),e--)}else this.motions.splice(e,1),e--}return i}catch(t){return _._$li(t),!0}},ct.prototype.isFinished=function(t){if(arguments.length>=1){for(var i=0;i.9&&at.EXPAND_W,this.gl);if(null==this.gl)throw new Error("gl is null");var h=1*this._$C0*n,l=1*this._$tT*n,$=1*this._$WL*n,u=this._$lT*n;if(null!=this.clipBufPre_clipContextMask){a.frontFace(a.CCW),a.useProgram(this.shaderProgram),this._$vS=Tt(a,this._$vS,r),this._$no=Pt(a,this._$no,e),a.enableVertexAttribArray(this.a_position_Loc),a.vertexAttribPointer(this.a_position_Loc,2,a.FLOAT,!1,0,0),this._$NT=Tt(a,this._$NT,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.textures[t]),a.uniform1i(this.s_texture0_Loc,1),a.enableVertexAttribArray(this.a_texCoord_Loc),a.vertexAttribPointer(this.a_texCoord_Loc,2,a.FLOAT,!1,0,0),a.uniformMatrix4fv(this.u_matrix_Loc,!1,this.getClipBufPre_clipContextMask().matrixForMask);var p=this.getClipBufPre_clipContextMask().layoutChannelNo,f=this.getChannelFlagAsColor(p);a.uniform4f(this.u_channelFlag,f.r,f.g,f.b,f.a);var c=this.getClipBufPre_clipContextMask().layoutBounds;a.uniform4f(this.u_baseColor_Loc,2*c.x-1,2*c.y-1,2*c._$EL()-1,2*c._$5T()-1),a.uniform1i(this.u_maskFlag_Loc,!0)}else if(null!=this.getClipBufPre_clipContextDraw()){a.useProgram(this.shaderProgramOff),this._$vS=Tt(a,this._$vS,r),this._$no=Pt(a,this._$no,e),a.enableVertexAttribArray(this.a_position_Loc_Off),a.vertexAttribPointer(this.a_position_Loc_Off,2,a.FLOAT,!1,0,0),this._$NT=Tt(a,this._$NT,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.textures[t]),a.uniform1i(this.s_texture0_Loc_Off,1),a.enableVertexAttribArray(this.a_texCoord_Loc_Off),a.vertexAttribPointer(this.a_texCoord_Loc_Off,2,a.FLOAT,!1,0,0),a.uniformMatrix4fv(this.u_clipMatrix_Loc_Off,!1,this.getClipBufPre_clipContextDraw().matrixForDraw),a.uniformMatrix4fv(this.u_matrix_Loc_Off,!1,this.matrix4x4),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,at.fTexture[this.glno]),a.uniform1i(this.s_texture1_Loc_Off,2);var p=this.getClipBufPre_clipContextDraw().layoutChannelNo,f=this.getChannelFlagAsColor(p);a.uniform4f(this.u_channelFlag_Loc_Off,f.r,f.g,f.b,f.a),a.uniform4f(this.u_baseColor_Loc_Off,h,l,$,u)}else a.useProgram(this.shaderProgram),this._$vS=Tt(a,this._$vS,r),this._$no=Pt(a,this._$no,e),a.enableVertexAttribArray(this.a_position_Loc),a.vertexAttribPointer(this.a_position_Loc,2,a.FLOAT,!1,0,0),this._$NT=Tt(a,this._$NT,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.textures[t]),a.uniform1i(this.s_texture0_Loc,1),a.enableVertexAttribArray(this.a_texCoord_Loc),a.vertexAttribPointer(this.a_texCoord_Loc,2,a.FLOAT,!1,0,0),a.uniformMatrix4fv(this.u_matrix_Loc,!1,this.matrix4x4),a.uniform4f(this.u_baseColor_Loc,h,l,$,u),a.uniform1i(this.u_maskFlag_Loc,!1);this.culling?this.gl.enable(a.CULL_FACE):this.gl.disable(a.CULL_FACE),this.gl.enable(a.BLEND);var d,g,y,m;if(null!=this.clipBufPre_clipContextMask)d=a.ONE,g=a.ONE_MINUS_SRC_ALPHA,y=a.ONE,m=a.ONE_MINUS_SRC_ALPHA;else switch(s){case $t._$ms:d=a.ONE,g=a.ONE_MINUS_SRC_ALPHA,y=a.ONE,m=a.ONE_MINUS_SRC_ALPHA;break;case $t._$ns:d=a.ONE,g=a.ONE,y=a.ZERO,m=a.ONE;break;case $t._$_s:d=a.DST_COLOR,g=a.ONE_MINUS_SRC_ALPHA,y=a.ZERO,m=a.ONE}a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(d,g,y,m),this.anisotropyExt&&a.texParameteri(a.TEXTURE_2D,this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT,this.maxAnisotropy);var T=e.length;a.drawElements(a.TRIANGLES,T,a.UNSIGNED_SHORT,0),a.bindTexture(a.TEXTURE_2D,null)}},mt.prototype._$Rs=function(){throw new Error("_$Rs")},mt.prototype._$Ds=function(t){throw new Error("_$Ds")},mt.prototype._$K2=function(){for(var t=0;t=48){var r=G._$9o(t);return null!=r?(r._$F0(this),r):null}switch(t){case 1:return this._$bT();case 10:return new n(this._$6L(),!0);case 11:return new S(this._$mP(),this._$mP(),this._$mP(),this._$mP());case 12:return new S(this._$_T(),this._$_T(),this._$_T(),this._$_T());case 13:return new L(this._$mP(),this._$mP());case 14:return new L(this._$_T(),this._$_T());case 15:for(var o=this._$3L(),e=new Array(o),s=0;s>7-this._$hL++&1)},St.prototype._$zT=function(){0!=this._$hL&&(this._$hL=0)},vt.prototype._$wP=function(t,i,e){for(var r=0;rMath.PI;)e-=2*Math.PI;return e},Lt._$9=function(t){return Math.sin(t)},Lt.fcos=function(t){return Math.cos(t)},Mt.prototype._$u2=function(){return this._$IS[0]},Mt.prototype._$yo=function(){return this._$AT&&!this._$IS[0]},Mt.prototype._$GT=function(){return this._$e0},Et._$W2=0,Et.SYSTEM_INFO=null,Et.USER_AGENT=navigator.userAgent,Et.isIPhone=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isIPhone},Et.isIOS=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isIPhone||Et.SYSTEM_INFO._isIPad},Et.isAndroid=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isAndroid},Et.getOSVersion=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO.version},Et.getOS=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isIPhone||Et.SYSTEM_INFO._isIPad?"iOS":Et.SYSTEM_INFO._isAndroid?"Android":"_$Q0 OS"},Et.setup=function(){function t(t,i){for(var e=t.substring(i).split(/[ _,;\.]/),r=0,o=0;o<=2&&!isNaN(e[o]);o++){var n=parseInt(e[o]);if(n<0||n>999){_._$li("err : "+n+" @UtHtml5.setup()"),r=0;break}r+=n*Math.pow(1e3,2-o)}return r}var i,e=Et.USER_AGENT,r=Et.SYSTEM_INFO={userAgent:e};if((i=e.indexOf("iPhone OS "))>=0)r.os="iPhone",r._isIPhone=!0,r.version=t(e,i+"iPhone OS ".length);else if((i=e.indexOf("iPad"))>=0){if((i=e.indexOf("CPU OS"))<0)return void _._$li(" err : "+e+" @UtHtml5.setup()");r.os="iPad",r._isIPad=!0,r.version=t(e,i+"CPU OS ".length)}else(i=e.indexOf("Android"))>=0?(r.os="Android",r._isAndroid=!0,r.version=t(e,i+"Android ".length)):(r.os="-",r.version=-1)},window.UtSystem=w,window.UtDebug=_,window.LDTransform=gt,window.LDGL=nt,window.Live2D=at,window.Live2DModelWebGL=ft,window.Live2DModelJS=q,window.Live2DMotion=J,window.MotionQueueManager=ct,window.PhysicsHair=f,window.AMotion=s,window.PartsDataID=l,window.DrawDataID=b,window.BaseDataID=yt,window.ParamID=u,at.init();var At=!1}()}).call(i,e(7))},function(t,i){t.exports={import:function(){throw new Error("System.import cannot be used indirectly")}}},function(t,i,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(){this.models=[],this.count=-1,this.reloadFlg=!1,Live2D.init(),n.Live2DFramework.setPlatformManager(new _.default)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=o;var n=e(0),s=e(9),_=r(s),a=e(10),h=r(a),l=e(1),$=r(l);o.prototype.createModel=function(){var t=new h.default;return this.models.push(t),t},o.prototype.changeModel=function(t,i){if(this.reloadFlg){this.reloadFlg=!1;this.releaseModel(0,t),this.createModel(),this.models[0].load(t,i)}},o.prototype.getModel=function(t){return t>=this.models.length?null:this.models[t]},o.prototype.releaseModel=function(t,i){this.models.length<=t||(this.models[t].release(i),delete this.models[t],this.models.splice(t,1))},o.prototype.numModels=function(){return this.models.length},o.prototype.setDrag=function(t,i){for(var e=0;e0){r.expressions={};for(var t=0;t
- + @@ -51,11 +49,10 @@ function loadWidget(config) { userActionTimer, messageTimer, messageArray = [ - '好久不见,日子过得好快呢……', - '大坏蛋!你都多久没理人家了呀,嘤嘤嘤~', - '嗨~快来逗我玩吧!', - '拿小拳拳锤你胸口!', - '记得把小家加入 Adblock 白名单哦!', + 'general.longtime.1', + 'general.longtime.2', + 'general.longtime.3', + 'general.longtime.4', ] window.addEventListener('mousemove', () => (userAction = true)) window.addEventListener('keydown', () => (userAction = true)) @@ -74,16 +71,19 @@ function loadWidget(config) { document .querySelector('#waifu-tool .fa-comment') .addEventListener('click', showHitokoto) - /* document.querySelector("#waifu-tool .fa-paper-plane").addEventListener("click", () => { - if (window.Asteroids) { - if (!window.ASTEROIDSPLAYERS) window.ASTEROIDSPLAYERS = []; - window.ASTEROIDSPLAYERS.push(new Asteroids()); - } else { - const script = document.createElement("script"); - script.src = "https://cdn.jsdelivr.net/gh/stevenjoezhang/asteroids/asteroids.js"; - document.head.appendChild(script); - } - }); */ + document + .querySelector('#waifu-tool .fa-paper-plane') + .addEventListener('click', () => { + if (window.Asteroids) { + if (!window.ASTEROIDSPLAYERS) window.ASTEROIDSPLAYERS = [] + window.ASTEROIDSPLAYERS.push(new Asteroids()) + } else { + const script = document.createElement('script') + script.src = + 'https://cdn.jsdelivr.net/gh/stevenjoezhang/asteroids/asteroids.js' + document.head.appendChild(script) + } + }) document .querySelector('#waifu-tool .fa-user-circle') .addEventListener('click', loadOtherModel) @@ -93,20 +93,20 @@ function loadWidget(config) { document .querySelector('#waifu-tool .fa-camera-retro') .addEventListener('click', () => { - showMessage('照好了嘛,是不是很可爱呢?', 6000, 9) + showMessage('general.camera.1', 6000, 9) Live2D.captureName = 'photo.png' Live2D.captureFrame = true }) document .querySelector('#waifu-tool .fa-info-circle') .addEventListener('click', () => { - open('https://github.com/KnowsCount/qiokian') + open('https://github.com/stevenjoezhang/live2d-widget') }) document .querySelector('#waifu-tool .fa-times') .addEventListener('click', () => { localStorage.setItem('waifu-display', Date.now()) - showMessage('愿你有一天能与重要的人重逢。', 2000, 11) + showMessage('general.exit.1', 2000, 11) document.getElementById('waifu').style.bottom = '-500px' setTimeout(() => { document.getElementById('waifu').style.display = 'none' @@ -118,17 +118,14 @@ function loadWidget(config) { const devtools = () => {} console.log('%c', devtools) devtools.toString = () => { - showMessage( - '哈哈,你打开了控制台,是想要看看我的小秘密吗?', - 6000, - 9 - ) + showMessage('general.console.1', 6000, 9) } window.addEventListener('copy', () => { - showMessage('你都复制了些什么呀,转载要记得加上出处哦!', 6000, 9) + showMessage('general.copy.1', 6000, 9) }) window.addEventListener('visibilitychange', () => { - if (!document.hidden) showMessage('哇,你终于回来了~', 6000, 9) + if (!document.hidden) + showMessage('general.visibilityChange.1', 6000, 9) }) })() ;(function welcomeMessage() { @@ -136,45 +133,41 @@ function loadWidget(config) { if (location.pathname === '/') { // 如果是主页 const now = new Date().getHours() - if (now > 5 && now <= 7) - text = '早上好!一日之计在于晨,美好的一天就要开始了。' - else if (now > 7 && now <= 11) - text = '上午好!工作顺利嘛,不要久坐,多起来走动走动哦!' - else if (now > 11 && now <= 13) - text = '中午了,工作了一个上午,现在是午餐时间!' - else if (now > 13 && now <= 17) - text = '午后很容易犯困呢,今天的运动目标完成了吗?' - else if (now > 17 && now <= 19) - text = '傍晚了!窗外夕阳的景色很美丽呢,最美不过夕阳红~' - else if (now > 19 && now <= 21) text = '晚上好,今天过得怎么样?' + if (now > 5 && now <= 7) text = 'time.5_7' + else if (now > 7 && now <= 11) text = 'time.7_11' + else if (now > 11 && now <= 13) text = 'time.11_13' + else if (now > 13 && now <= 17) text = 'time.13_17' + else if (now > 17 && now <= 19) text = 'time.17_19' + else if (now > 19 && now <= 21) text = 'time.19_21' else if (now > 21 && now <= 23) - text = [ - '已经这么晚了呀,早点休息吧,晚安~', - '深夜时要爱护眼睛呀!', - ] - else text = '你是夜猫子呀?这么晚还不睡觉,明天起的来嘛?' + text = ['time.21_23.1', 'time.21_23.2'] + else text = 'time.24' } else if (document.referrer !== '') { const referrer = new URL(document.referrer), domain = referrer.hostname.split('.')[1] if (location.hostname === referrer.hostname) - text = `欢迎阅读「${ - document.title.split(' - ')[0] - }」` + text = { + i18n: 'welcome.1', + data: document.title.split(' - ')[0], + } else if (domain === 'baidu') - text = `Hello!来自 百度搜索 的朋友
你是搜索 ${ - referrer.search.split('&wd=')[1].split('&')[0] - } 找到的我吗?` + text = { + i18n: 'welcome.2', + data: referrer.search.split('&wd=')[1].split('&')[0], + } else if (domain === 'so') - text = `Hello!来自 360搜索 的朋友
你是搜索 ${ - referrer.search.split('&q=')[1].split('&')[0] - } 找到的我吗?` + text = { + i18n: 'welcome.3', + data: referrer.search.split('&q=')[1].split('&')[0], + } else if (domain === 'google') - text = `Hello!来自 谷歌搜索 的朋友
欢迎阅读「${ - document.title.split(' - ')[0] - }」` - else text = `Hello!来自 ${referrer.hostname} 的朋友` + text = { + i18n: 'welcome.4', + data: document.title.split(' - ')[0], + } + else text = { i18n: 'welcome.5', data: referrer.hostname } } else { - text = `欢迎阅读「${document.title.split(' - ')[0]}」` + text = { i18n: 'welcome.6', data: document.title.split(' - ')[0] } } showMessage(text, 7000, 8) })() @@ -184,7 +177,11 @@ function loadWidget(config) { fetch('https://v1.hitokoto.cn') .then((response) => response.json()) .then((result) => { - const text = `这句一言来自 「${result.from}」,是 ${result.creator} 在 hitokoto.cn 投稿的。` + const text = { + i18n: 'hikoto', + source: result.from, + author: result.creator, + } showMessage(result.hitokoto, 6000, 9) setTimeout(() => { showMessage(text, 4000, 9) @@ -204,6 +201,18 @@ function loadWidget(config) { messageTimer = null } text = randomSelection(text) + if (typeof text === 'object' && text !== null && 'i18n' in text) { + let tmp = {} + Object.keys(text).forEach((key) => { + if (key != 'i18n') { + tmp[key] = text[key] + } + }) + console.log(tmp) + text = I18n.t(text.i18n, tmp) + } else { + text = I18n.t(text) + } sessionStorage.setItem('waifu-text', priority) const tips = document.getElementById('waifu-tips') tips.innerHTML = text @@ -239,7 +248,7 @@ function loadWidget(config) { for (let { selector, text } of result.click) { if (!event.target.matches(selector)) continue text = randomSelection(text) - text = text.replace('{text}', event.target.innerText) + text.replace('{text}', event.target.innerText) showMessage(text, 4000, 8) return } @@ -292,7 +301,7 @@ function loadWidget(config) { if (!modelList) await loadModelList() const target = randomSelection(modelList.models[modelId]) loadlive2d('live2d', `${cdnPath}model/${target}/index.json`) - showMessage('我的新衣服好看嘛?', 4000, 10) + showMessage('general.dress.1', 4000, 10) } else { // 可选 "rand"(随机), "switch"(顺序) fetch(`${apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`) @@ -302,12 +311,12 @@ function loadWidget(config) { result.textures.id === 1 && (modelTexturesId === 1 || modelTexturesId === 0) ) - showMessage('我还没有其他衣服呢!', 4000, 10) + showMessage('Ughh, I ran out of clothes!', 4000, 10) else loadModel( modelId, result.textures.id, - '我的新衣服好看嘛?' + 'general.dress.2?' ) }) } @@ -339,7 +348,7 @@ function initWidget(config, apiPath) { document.body.insertAdjacentHTML( 'beforeend', `
- 看板娘 + Signboard girl
` ) const toggle = document.getElementById('waifu-toggle') diff --git a/lib/waifu-tips.json b/lib/waifu-tips.json index 78eab55..385e4fe 100755 --- a/lib/waifu-tips.json +++ b/lib/waifu-tips.json @@ -1,224 +1,429 @@ { - "mouseover": [{ - "selector": "#waifu #live2d", - "text": ["干嘛呢你,快把手拿开~~", "鼠…鼠标放错地方了!", "你要干嘛呀?", "喵喵喵?", "怕怕(ノ≧∇≦)ノ", "非礼呀!救命!", "这样的话,只能使用武力了!", "我要生气了哦", "不要动手动脚的!", "真…真的是不知羞耻!", "Hentai!"] - }, { - "selector": "#waifu-tool .fa-comment", - "text": ["猜猜我要说些什么?", "我从青蛙王子那里听到了不少人生经验。"] - }, { - "selector": "#waifu-tool .fa-paper-plane", - "text": ["要不要来玩飞机大战?", "这个按钮上写着「不要点击」。", "怎么,你想来和我玩个游戏?", "听说这样可以蹦迪!"] - }, { - "selector": "#waifu-tool .fa-user-circle", - "text": ["你是不是不爱人家了呀,呜呜呜~", "要见见我的姐姐嘛?", "想要看我妹妹嘛?", "要切换看板娘吗?"] - }, { - "selector": "#waifu-tool .fa-street-view", - "text": ["喜欢换装 PLAY 吗?", "这次要扮演什么呢?", "变装!", "让我们看看接下来会发生什么!"] - }, { - "selector": "#waifu-tool .fa-camera-retro", - "text": ["你要给我拍照呀?一二三~茄子~", "要不,我们来合影吧!", "保持微笑就好了~"] - }, { - "selector": "#waifu-tool .fa-info-circle", - "text": ["想要知道更多关于我的事么?", "这里记录着我搬家的历史呢。", "你想深入了解我什么呢?"] - }, { - "selector": "#waifu-tool .fa-times", - "text": ["到了要说再见的时候了吗?", "呜呜 QAQ 后会有期……", "不要抛弃我呀……", "我们,还能再见面吗……", "哼,你会后悔的!"] - }, { - "selector": ".menu-item-home a", - "text": ["点击前往首页,想回到上一页可以使用浏览器的后退功能哦。", "点它就可以回到首页啦!", "回首页看看吧。"] - }, { - "selector": ".menu-item-about a", - "text": ["你想知道我家主人是谁吗?", "这里有一些关于我家主人的秘密哦,要不要看看呢?", "发现主人出没地点!"] - }, { - "selector": ".menu-item-tags a", - "text": ["点击就可以看文章的标签啦!", "点击来查看所有标签哦。"] - }, { - "selector": ".menu-item-categories a", - "text": ["文章都分类好啦~", "点击来查看文章分类哦。"] - }, { - "selector": ".menu-item-archives a", - "text": ["翻页比较麻烦吗,那就来看看文章归档吧。", "文章目录都整理在这里啦!"] - }, { - "selector": ".menu-item-friends a", - "text": ["这是我的朋友们哦ヾ(◍°∇°◍)ノ゙", "要去大佬们的家看看吗?", "要去拜访一下我的朋友们吗?"] - }, { - "selector": ".menu-item-search a", - "text": ["找不到想看的内容?搜索看看吧!", "在找什么东西呢,需要帮忙吗?"] - }, { - "selector": ".menu-item a", - "text": ["快看看这里都有什么呢?"] - }, { - "selector": ".site-author", - "text": ["我家主人好看吗?", "这是我家主人(*´∇`*)"] - }, { - "selector": ".site-state", - "text": ["这是文章的统计信息~", "要不要点进去看看?"] - }, { - "selector": ".feed-link a", - "text": ["这里可以使用 RSS 订阅呢!", "利用 feed 订阅器,就能快速知道博客有没有更新了呢。"] - }, { - "selector": ".cc-opacity, .post-copyright-author", - "text": ["要记得规范转载哦。", "所有文章均采用 CC BY-NC-SA 4.0 许可协议~", "转载前要先注意下文章的版权协议呢。"] - }, { - "selector": ".links-of-author", - "text": ["这里是主人的常驻地址哦。", "这里有主人的联系方式!"] - }, { - "selector": "#qrcode", - "text": ["手机扫一下就能继续看,很方便呢~", "扫一扫,打开新世界的大门!"] - }, { - "selector": ".fancybox img, img.medium-zoom-image", - "text": ["点击图片可以放大呢!"] - }, { - "selector": ".copy-btn", - "text": ["代码可以直接点击复制哟。"] - }, { - "selector": ".highlight .table-container, .gist", - "text": ["GitHub!我是新手!", "PHP 是最好的语言!"] - }, { - "selector": "a[href^='mailto']", - "text": ["邮件我会及时回复的!", "点击就可以发送邮件啦~"] - }, { - "selector": "a[href^='/tags/']", - "text": ["要去看看 {text} 标签么?", "点它可以查看此标签下的所有文章哟!"] - }, { - "selector": "a[href^='/categories/']", - "text": ["要去看看 {text} 分类么?", "点它可以查看此分类下的所有文章哟!"] - }, { - "selector": ".post-title-link", - "text": ["要看看 {text} 这篇文章吗?"] - }, { - "selector": "a[rel='contents']", - "text": ["点击来阅读全文哦。"] - }, { - "selector": "a[itemprop='discussionUrl']", - "text": ["要去看看评论吗?"] - }, { - "selector": ".beian a", - "text": ["我也是有户口的人哦。", "我的主人可是遵纪守法的好主人。"] - }, { - "selector": ".container a[href^='http'], .nav-link .nav-text", - "text": ["要去看看 {text} 么?", "去 {text} 逛逛吧。", "到 {text} 看看吧。"] - }, { - "selector": ".back-to-top", - "text": ["点它就可以回到顶部啦!", "又回到最初的起点~", "要回到开始的地方么?"] - }, { - "selector": ".reward-container", - "text": ["我是不是棒棒哒~快给我点赞吧!", "要打赏我嘛?好期待啊~", "主人最近在吃土呢,很辛苦的样子,给他一些钱钱吧~"] - }, { - "selector": "#wechat", - "text": ["这是我的微信二维码~"] - }, { - "selector": "#alipay", - "text": ["这是我的支付宝哦!"] - }, { - "selector": "#bitcoin", - "text": ["这是我的比特币账号!"] - }, { - "selector": "#needsharebutton-postbottom .btn", - "text": ["好东西要让更多人知道才行哦。", "觉得文章有帮助的话,可以分享给更多需要的朋友呢。"] - }, { - "selector": ".need-share-button_weibo", - "text": ["微博?来分享一波喵!"] - }, { - "selector": ".need-share-button_wechat", - "text": ["分享到微信吧!"] - }, { - "selector": ".need-share-button_douban", - "text": ["分享到豆瓣好像也不错!"] - }, { - "selector": ".need-share-button_qqzone", - "text": ["QQ 空间,一键转发,耶~"] - }, { - "selector": ".need-share-button_twitter", - "text": ["Twitter?好像是不存在的东西?"] - }, { - "selector": ".need-share-button_facebook", - "text": ["emmm…FB 好像也是不存在的东西?"] - }, { - "selector": ".post-nav-item a[rel='next']", - "text": ["来看看下一篇文章吧。", "点它可以看下一篇文章哦!", "要翻到下一篇文章吗?"] - }, { - "selector": ".post-nav-item a[rel='prev']", - "text": ["来看看上一篇文章吧。", "点它可以看上一篇文章哦!", "要翻到上一篇文章吗?"] - }, { - "selector": ".extend.next", - "text": ["去下一页看看吧。", "点它可以前进哦!", "要翻到下一页吗?"] - }, { - "selector": ".extend.prev", - "text": ["去上一页看看吧。", "点它可以后退哦!", "要翻到上一页吗?"] - }, { - "selector": "input.vnick", - "text": ["该怎么称呼你呢?", "留下你的尊姓大名!"] - }, { - "selector": ".vmail", - "text": ["留下你的邮箱,不然就是无头像人士了!", "记得设置好 Gravatar 头像哦!", "为了方便通知你最新消息,一定要留下邮箱!"] - }, { - "selector": ".vlink", - "text": ["快快告诉我你的家在哪里,好让我去参观参观!"] - }, { - "selector": ".veditor", - "text": ["想要去评论些什么吗?", "要说点什么吗?", "觉得博客不错?快来留言和主人交流吧!"] - }, { - "selector": ".vcontrol a", - "text": ["你会不会熟练使用 Markdown 呀?", "使用 Markdown 让评论更美观吧~"] - }, { - "selector": ".vemoji-btn", - "text": ["要插入一个萌萌哒的表情吗?", "要来一发表情吗?"] - }, { - "selector": ".vpreview-btn", - "text": ["要预览一下你的发言吗?", "快看看你的评论有多少负熵!"] - }, { - "selector": ".vsubmit", - "text": ["评论没有审核,要对自己的发言负责哦~", "要提交了吗,请耐心等待回复哦~"] - }, { - "selector": ".vcontent", - "text": ["哇,快看看这个精彩评论!", "如果有疑问,请尽快留言哦~"] - }], - "click": [{ - "selector": "#waifu #live2d", - "text": ["是…是不小心碰到了吧…", "萝莉控是什么呀?", "你看到我的小熊了吗?", "再摸的话我可要报警了!⌇●﹏●⌇", "110 吗,这里有个变态一直在摸我(ó﹏ò。)", "不要摸我了,我会告诉老婆来打你的!", "干嘛动我呀!小心我咬你!", "别摸我,有什么好摸的!"] - }, { - "selector": ".veditor", - "text": ["要吐槽些什么呢?", "一定要认真填写喵~", "有什么想说的吗?"] - }, { - "selector": ".vsubmit", - "text": ["输入验证码就可以提交评论啦~"] - }], - "seasons": [{ - "date": "01/01", - "text": "元旦了呢,新的一年又开始了,今年是{year}年~" - }, { - "date": "02/14", - "text": "又是一年情人节,{year}年找到对象了嘛~" - }, { - "date": "03/08", - "text": "今天是国际妇女节!" - }, { - "date": "03/12", - "text": "今天是植树节,要保护环境呀!" - }, { - "date": "04/01", - "text": "悄悄告诉你一个秘密~今天是愚人节,不要被骗了哦~" - }, { - "date": "05/01", - "text": "今天是五一劳动节,计划好假期去哪里了吗~" - }, { - "date": "06/01", - "text": "儿童节了呢,快活的时光总是短暂,要是永远长不大该多好啊…" - }, { - "date": "09/03", - "text": "中国人民抗日战争胜利纪念日,铭记历史、缅怀先烈、珍爱和平、开创未来。" - }, { - "date": "09/10", - "text": "教师节,在学校要给老师问声好呀~" - }, { - "date": "10/01", - "text": "国庆节到了,为祖国母亲庆生!" - }, { - "date": "11/05-11/12", - "text": "今年的双十一是和谁一起过的呢~" - }, { - "date": "12/20-12/31", - "text": "这几天是圣诞节,主人肯定又去剁手买买买了~" - }] + "mouseover": [ + { + "selector": "#waifu #live2d", + "text": [ + "mouseover.waifu.1", + "mouseover.waifu.2", + "mouseover.waifu.3", + "mouseover.waifu.4", + "mouseover.waifu.5", + "mouseover.waifu.6", + "mouseover.waifu.7", + "mouseover.waifu.8", + "mouseover.waifu.9", + "mouseover.waifu.10", + "mouseover.waifu.11" + ] + }, + { + "selector": "#waifu-tool .fa-comment", + "text": [ + "mouseover.waifu_tool_fa_comment.1", + "mouseover.waifu_tool_fa_comment.2" + ] + }, + { + "selector": "#waifu-tool .fa-paper-plane", + "text": [ + "mouseover.waifu_tool_fa_paper_plane.1", + "mouseover.waifu_tool_fa_paper_plane.2", + "mouseover.waifu_tool_fa_paper_plane.3", + "mouseover.waifu_tool_fa_paper_plane.4" + ] + }, + { + "selector": "#waifu-tool .fa-user-circle", + "text": [ + "mouseover.waifu_tool_fa_user_circle.1", + "mouseover.waifu_tool_fa_user_circle.2", + "mouseover.waifu_tool_fa_user_circle.3", + "mouseover.waifu_tool_fa_user_circle.4" + ] + }, + { + "selector": "#waifu-tool .fa-street-view", + "text": [ + "mouseover.waifu_tool_fa_street_view.1", + "mouseover.waifu_tool_fa_street_view.2", + "mouseover.waifu_tool_fa_street_view.3", + "mouseover.waifu_tool_fa_street_view.4" + ] + }, + { + "selector": "#waifu-tool .fa-camera-retro", + "text": [ + "mouseover.waifu_tool_fa_camera_retro.1", + "mouseover.waifu_tool_fa_camera_retro.2", + "mouseover.waifu_tool_fa_camera_retro.3" + ] + }, + { + "selector": "#waifu-tool .fa-info-circle", + "text": [ + "mouseover.waifu_tool_fa_info_circle.1", + "mouseover.waifu_tool_fa_info_circle.2", + "mouseover.waifu_tool_fa_info_circle.3" + ] + }, + { + "selector": "#waifu-tool .fa-times", + "text": [ + "mouseover.waifu_tool_fa_times.1", + "mouseover.waifu_tool_fa_times.2", + "mouseover.waifu_tool_fa_times.3", + "mouseover.waifu_tool_fa_times.4", + "mouseover.waifu_tool_fa_times.5" + ] + }, + { + "selector": ".menu-item-home a", + "text": [ + " Click to go to the home page. If you want to go back to the previous page, you can use the browser's back function. ", + " Click it to return to the homepage! ", + " Go back to the homepage and take a look. " + ] + }, + { + "selector": ".menu-item-about a", + "text": [ + "mouseover.menu_item_categories_a.1", + "mouseover.menu_item_categories_a.2", + "mouseover.menu_item_categories_a.3" + ] + }, + { + "selector": ".menu-item-tags a", + "text": [ + "mouseover.menu_item_tags_a.1", + "mouseover.menu_item_tags_a.2" + ] + }, + { + "selector": ".menu-item-categories a", + "text": [ + "mouseover.menu_item_categories_a.1", + "mouseover.menu_item_categories_a.2" + ] + }, + { + "selector": ".menu-item-archives a", + "text": [ + "mouseover.menu_item_archieves_a.1", + "mouseover.menu_item_archieves_a.2" + ] + }, + { + "selector": ".menu-item-friends a", + "text": [ + "mouseover.menu_item_friends_a.1", + "mouseover.menu_item_friends_a.2", + "mouseover.menu_item_friends_a.3" + ] + }, + { + "selector": ".menu-item-search a", + "text": [ + "mouseover.menu_item_search_a.1", + "mouseover.menu_item_search_a.2" + ] + }, + { + "selector": ".menu-item a", + "text": ["mouseover.menu_item_a.1"] + }, + { + "selector": ".site-author", + "text": ["mouseover.site_author.1", "mouseover.site_author.2"] + }, + { + "selector": ".site-state", + "text": ["mouseover.site_state.1", "mouseover.site_state.2"] + }, + { + "selector": ".feed-link a", + "text": ["mouseover.feed_link_a.1", "mouseover.feed_link_a.2"] + }, + { + "selector": ".cc-opacity, .post-copyright-author", + "text": [ + "mouseover.cc_opacity_post_copyright_author.1", + "mouseover.cc_opacity_post_copyright_author.2", + "mouseover.cc_opacity_post_copyright_author.3" + ] + }, + { + "selector": ".links-of-author", + "text": [ + "mouseover.links_of_author.1", + "mouseover.links_of_author.2" + ] + }, + { + "selector": "#qrcode", + "text": ["mouseover.qrcode.1", "mouseover.qrcode.2"] + }, + { + "selector": ".fancybox img, img.medium-zoom-image", + "text": ["mouseover.fancybox_img_img_medium_zoom_image.1"] + }, + { + "selector": ".copy-btn", + "text": ["mouseover.copy_btn.1"] + }, + { + "selector": ".highlight .table-container, .gist", + "text": [ + "mouseover.highlight_table_container_gist.1", + "mouseover.highlight_table_container_gist.2" + ] + }, + { + "selector": "a[href^='mailto']", + "text": ["mouseover.a_href_mail_to.1", "mouseover.a_href_mail_to.2"] + }, + { + "selector": "a[href^='/tags/']", + "text": ["mouseover.a_href_tags.1", "mouseover.a_href_tags.2"] + }, + { + "selector": "a[href^='/categories/']", + "text": [ + "mouseover.a_href_categories.1", + "mouseover.a_href_categories.2" + ] + }, + { + "selector": ".post-title-link", + "text": ["mouseover.post_title_link.1"] + }, + { + "selector": "a[rel='contents']", + "text": ["mouseover.a_rel_contents.1"] + }, + { + "selector": "a[itemprop='discussionUrl']", + "text": ["mouseover.a_itemprop_discussionUrl.1"] + }, + { + "selector": ".beian a", + "text": ["mouseover.bein_a.1", "mouseover.bein_a.2"] + }, + { + "selector": ".container a[href^='http'], .nav-link .nav-text", + "text": [ + "mouseover.container_a_href_http_nav_link_nav_text.1", + "mouseover.container_a_href_http_nav_link_nav_text.2", + "mouseover.container_a_href_http_nav_link_nav_text.3" + ] + }, + { + "selector": ".back-to-top", + "text": [ + "mouseover.back_to_top.1", + "mouseover.back_to_top.2", + "mouseover.back_to_top.3" + ] + }, + { + "selector": ".reward-container", + "text": [ + "mouseover.reward_container.1", + "mouseover.reward_container.2", + "mouseover.reward_container.3" + ] + }, + { + "selector": "#wechat", + "text": ["mouseover.wechat.1"] + }, + { + "selector": "#alipay", + "text": ["mouseover.alipay.1"] + }, + { + "selector": "#bitcoin", + "text": ["mouseover.bitcoin.1"] + }, + { + "selector": "#needsharebutton-postbottom .btn", + "text": [ + "mouseover.needsharebutton_postbottom_btn.1", + "mouseover.needsharebutton_postbottom_btn.2" + ] + }, + { + "selector": ".need-share-button_weibo", + "text": ["mouseover.need_share_button_weibo.1"] + }, + { + "selector": ".need-share-button_wechat", + "text": ["mouseover.need_share_button_wechat.1"] + }, + { + "selector": ".need-share-button_douban", + "text": ["mouseover.need_share_button_douban.1"] + }, + { + "selector": ".need-share-button_qqzone", + "text": ["mouseover.need_share_button_qqzone.1"] + }, + { + "selector": ".need-share-button_twitter", + "text": ["mouseover.need_share_button_twitter.1"] + }, + { + "selector": ".need-share-button_facebook", + "text": ["mouseover.need_share_button_facebook.1"] + }, + { + "selector": ".post-nav-item a[rel='next']", + "text": [ + "mouseover.post_nav_item_a_rel_next.1", + "mouseover.post_nav_item_a_rel_next.2", + "mouseover.post_nav_item_a_rel_next.3" + ] + }, + { + "selector": ".post-nav-item a[rel='prev']", + "text": [ + "mouseover.post_nav_item_a_rel_prev.1", + "mouseover.post_nav_item_a_rel_prev.2", + "mouseover.post_nav_item_a_rel_prev.3" + ] + }, + { + "selector": ".extend.next", + "text": [ + "mouseover.extend_next.1", + "mouseover.extend_next.2", + "mouseover.extend_next.3" + ] + }, + { + "selector": ".extend.prev", + "text": [ + "mouseover.extend_prev.1", + "mouseover.extend_prev.2", + "mouseover.extend_prev.3" + ] + }, + { + "selector": "input.vnick", + "text": ["mouseover.input_vnick.1", "mouseover.input_vnick.2"] + }, + { + "selector": ".vmail", + "text": [ + "mouseover.vmail.1", + "mouseover.vmail.2", + "mouseover.vmail.3" + ] + }, + { + "selector": ".vlink", + "text": ["mouseover.vlink.1"] + }, + { + "selector": ".veditor", + "text": [ + "mouseover.veditor.1", + "mouseover.veditor.2", + "mouseover.veditor.3" + ] + }, + { + "selector": ".vcontrol a", + "text": ["mouseover.vcontrol_a.1", "mouseover.vcontrol_a.2"] + }, + { + "selector": ".vemoji-btn", + "text": ["mouseover.vemoji_btn.1", "mouseover.vemoji_btn.2"] + }, + { + "selector": ".vpreview-btn", + "text": ["mouseover.vpreview_btn.1", "mouseover.vpreview_btn.2"] + }, + { + "selector": ".vsubmit", + "text": ["mouseover.vsubmit.1", "mouseover.vsubmit.2"] + }, + { + "selector": ".vcontent", + "text": ["mouseover.vcontent.1", "mouseover.vcontent.2"] + } + ], + "click": [ + { + "selector": "#waifu #live2d", + "text": [ + "click.waifu.1", + "click.waifu.2", + "click.waifu.3", + "click.waifu.4", + "click.waifu.5", + "click.waifu.6", + "click.waifu.7", + "click.waifu.8" + ] + }, + { + "selector": ".veditor", + "text": ["click.veditor.1", "click.veditor.2", "click.veditor.3"] + }, + { + "selector": ".vsubmit", + "text": ["click.vsubmit.1"] + } + ], + "seasons": [ + { + "date": "01/01", + " text ": "seasons.1" + }, + { + "date": "02/14", + " text ": "seasons.2" + }, + { + "date": "03/08", + " text ": "seasons.3" + }, + { + "date": "03/12", + " text ": "seasons.4" + }, + { + "date": "04/01", + " text ": "seasons.5" + }, + { + "date": "05/01", + " text ": "seasons.6" + }, + { + "date": "06/01", + " text ": "seasons.7" + }, + { + "date": "09/03", + " text ": "seasons.8" + }, + { + "date": "09/10", + " text ": "seasons.9" + }, + { + "date": "10/01", + " text ": "seasons.10" + }, + { + "date": "11/05-11/12", + " text ": "seasons.11" + }, + { + "date": "12/20-12/31", + " text ": "seasons.12" + } + ] } diff --git a/lib/waifu.css b/lib/waifu_left.css old mode 100755 new mode 100644 similarity index 50% rename from lib/waifu.css rename to lib/waifu_left.css index 293e492..4d89483 --- a/lib/waifu.css +++ b/lib/waifu_left.css @@ -12,6 +12,7 @@ transition: margin-left 1s; width: 60px; writing-mode: vertical-rl; + z-index: 1000; } #waifu-toggle.waifu-toggle-active { @@ -29,8 +30,8 @@ margin-bottom: -10px; position: fixed; transform: translateY(3px); - transition: transform .3s ease-in-out, bottom 3s ease-in-out; - z-index: 1; + transition: transform 0.3s ease-in-out, bottom 3s ease-in-out; + z-index: 1000; } #waifu:hover { @@ -39,10 +40,10 @@ #waifu-tips { animation: shake 50s ease-in-out 5s infinite; - background-color: rgba(236, 217, 188, .5); - border: 1px solid rgba(224, 186, 140, .62); + background-color: rgba(236, 217, 188, 0.5); + border: 1px solid rgba(224, 186, 140, 0.62); border-radius: 12px; - box-shadow: 0 3px 15px 2px rgba(191, 158, 118, .2); + box-shadow: 0 3px 15px 2px rgba(191, 158, 118, 0.2); font-size: 14px; line-height: 24px; margin: -30px 20px; @@ -59,7 +60,7 @@ #waifu-tips.waifu-tips-active { opacity: 1; - transition: opacity .2s; + transition: opacity 0.2s; } #waifu-tips span { @@ -82,7 +83,7 @@ opacity: 0; position: absolute; right: -10px; - top: 70px; + top: 55px; transition: opacity 1s; } @@ -96,7 +97,7 @@ display: block; line-height: 30px; text-align: center; - transition: color .3s; + transition: color 0.3s; } #waifu-tool span:hover { @@ -105,11 +106,11 @@ @keyframes shake { 2% { - transform: translate(.5px, -1.5px) rotate(-.5deg); + transform: translate(0.5px, -1.5px) rotate(-0.5deg); } 4% { - transform: translate(.5px, 1.5px) rotate(1.5deg); + transform: translate(0.5px, 1.5px) rotate(1.5deg); } 6% { @@ -117,27 +118,27 @@ } 8% { - transform: translate(2.5px, 1.5px) rotate(.5deg); + transform: translate(2.5px, 1.5px) rotate(0.5deg); } 10% { - transform: translate(.5px, 2.5px) rotate(.5deg); + transform: translate(0.5px, 2.5px) rotate(0.5deg); } 12% { - transform: translate(1.5px, 1.5px) rotate(.5deg); + transform: translate(1.5px, 1.5px) rotate(0.5deg); } 14% { - transform: translate(.5px, .5px) rotate(.5deg); + transform: translate(0.5px, 0.5px) rotate(0.5deg); } 16% { - transform: translate(-1.5px, -.5px) rotate(1.5deg); + transform: translate(-1.5px, -0.5px) rotate(1.5deg); } 18% { - transform: translate(.5px, .5px) rotate(1.5deg); + transform: translate(0.5px, 0.5px) rotate(1.5deg); } 20% { @@ -145,23 +146,23 @@ } 22% { - transform: translate(.5px, -1.5px) rotate(1.5deg); + transform: translate(0.5px, -1.5px) rotate(1.5deg); } 24% { - transform: translate(-1.5px, 1.5px) rotate(-.5deg); + transform: translate(-1.5px, 1.5px) rotate(-0.5deg); } 26% { - transform: translate(1.5px, .5px) rotate(1.5deg); + transform: translate(1.5px, 0.5px) rotate(1.5deg); } 28% { - transform: translate(-.5px, -.5px) rotate(-.5deg); + transform: translate(-0.5px, -0.5px) rotate(-0.5deg); } 30% { - transform: translate(1.5px, -.5px) rotate(-.5deg); + transform: translate(1.5px, -0.5px) rotate(-0.5deg); } 32% { @@ -169,55 +170,55 @@ } 34% { - transform: translate(2.5px, 2.5px) rotate(-.5deg); + transform: translate(2.5px, 2.5px) rotate(-0.5deg); } 36% { - transform: translate(.5px, -1.5px) rotate(.5deg); + transform: translate(0.5px, -1.5px) rotate(0.5deg); } 38% { - transform: translate(2.5px, -.5px) rotate(-.5deg); + transform: translate(2.5px, -0.5px) rotate(-0.5deg); } 40% { - transform: translate(-.5px, 2.5px) rotate(.5deg); + transform: translate(-0.5px, 2.5px) rotate(0.5deg); } 42% { - transform: translate(-1.5px, 2.5px) rotate(.5deg); + transform: translate(-1.5px, 2.5px) rotate(0.5deg); } 44% { - transform: translate(-1.5px, 1.5px) rotate(.5deg); + transform: translate(-1.5px, 1.5px) rotate(0.5deg); } 46% { - transform: translate(1.5px, -.5px) rotate(-.5deg); + transform: translate(1.5px, -0.5px) rotate(-0.5deg); } 48% { - transform: translate(2.5px, -.5px) rotate(.5deg); + transform: translate(2.5px, -0.5px) rotate(0.5deg); } 50% { - transform: translate(-1.5px, 1.5px) rotate(.5deg); + transform: translate(-1.5px, 1.5px) rotate(0.5deg); } 52% { - transform: translate(-.5px, 1.5px) rotate(.5deg); + transform: translate(-0.5px, 1.5px) rotate(0.5deg); } 54% { - transform: translate(-1.5px, 1.5px) rotate(.5deg); + transform: translate(-1.5px, 1.5px) rotate(0.5deg); } 56% { - transform: translate(.5px, 2.5px) rotate(1.5deg); + transform: translate(0.5px, 2.5px) rotate(1.5deg); } 58% { - transform: translate(2.5px, 2.5px) rotate(.5deg); + transform: translate(2.5px, 2.5px) rotate(0.5deg); } 60% { @@ -225,7 +226,7 @@ } 62% { - transform: translate(-1.5px, .5px) rotate(1.5deg); + transform: translate(-1.5px, 0.5px) rotate(1.5deg); } 64% { @@ -233,7 +234,7 @@ } 66% { - transform: translate(.5px, 2.5px) rotate(1.5deg); + transform: translate(0.5px, 2.5px) rotate(1.5deg); } 68% { @@ -241,11 +242,11 @@ } 70% { - transform: translate(2.5px, 2.5px) rotate(.5deg); + transform: translate(2.5px, 2.5px) rotate(0.5deg); } 72% { - transform: translate(-.5px, -1.5px) rotate(1.5deg); + transform: translate(-0.5px, -1.5px) rotate(1.5deg); } 74% { @@ -257,31 +258,31 @@ } 78% { - transform: translate(-1.5px, 2.5px) rotate(.5deg); + transform: translate(-1.5px, 2.5px) rotate(0.5deg); } 80% { - transform: translate(-1.5px, .5px) rotate(-.5deg); + transform: translate(-1.5px, 0.5px) rotate(-0.5deg); } 82% { - transform: translate(-1.5px, .5px) rotate(-.5deg); + transform: translate(-1.5px, 0.5px) rotate(-0.5deg); } 84% { - transform: translate(-.5px, .5px) rotate(1.5deg); + transform: translate(-0.5px, 0.5px) rotate(1.5deg); } 86% { - transform: translate(2.5px, 1.5px) rotate(.5deg); + transform: translate(2.5px, 1.5px) rotate(0.5deg); } 88% { - transform: translate(-1.5px, .5px) rotate(1.5deg); + transform: translate(-1.5px, 0.5px) rotate(1.5deg); } 90% { - transform: translate(-1.5px, -.5px) rotate(-.5deg); + transform: translate(-1.5px, -0.5px) rotate(-0.5deg); } 92% { @@ -289,18 +290,19 @@ } 94% { - transform: translate(.5px, .5px) rotate(-.5deg); + transform: translate(0.5px, 0.5px) rotate(-0.5deg); } 96% { - transform: translate(2.5px, -.5px) rotate(-.5deg); + transform: translate(2.5px, -0.5px) rotate(-0.5deg); } 98% { - transform: translate(-1.5px, -1.5px) rotate(-.5deg); + transform: translate(-1.5px, -1.5px) rotate(-0.5deg); } - 0%, 100% { + 0%, + 100% { transform: translate(0, 0) rotate(0); } } diff --git a/lib/waifu_right.css b/lib/waifu_right.css new file mode 100644 index 0000000..7ac0cdc --- /dev/null +++ b/lib/waifu_right.css @@ -0,0 +1,308 @@ +#waifu-toggle { + background-color: #fa0; + border-radius: 5px; + bottom: 66px; + color: #fff; + cursor: pointer; + font-size: 12px; + right: 0; + margin-right: -100px; + padding: 5px 2px 5px 5px; + position: fixed; + transition: margin-right 1s; + width: 60px; + writing-mode: vertical-lr; + z-index: 1000; +} + +#waifu-toggle.waifu-toggle-active { + margin-right: -40px; +} + +#waifu-toggle.waifu-toggle-active:hover { + margin-right: -20px; +} + +#waifu { + bottom: -1000px; + right: 0; + line-height: 0; + margin-bottom: -10px; + position: fixed; + transform: translateY(3px); + transition: transform 0.3s ease-in-out, bottom 3s ease-in-out; + z-index: 1000; +} + +#waifu:hover { + transform: translateY(0); +} + +#waifu-tips { + animation: shake 50s ease-in-out 5s infinite; + background-color: rgba(236, 217, 188, 0.5); + border: 1px solid rgba(224, 186, 140, 0.62); + border-radius: 12px; + box-shadow: 0 3px 15px 2px rgba(191, 158, 118, 0.2); + font-size: 14px; + line-height: 24px; + margin: -30px 20px; + min-height: 70px; + opacity: 0; + overflow: hidden; + padding: 5px 10px; + position: absolute; + text-overflow: ellipsis; + transition: opacity 1s; + width: 250px; + word-break: break-all; +} + +#waifu-tips.waifu-tips-active { + opacity: 1; + transition: opacity 0.2s; +} + +#waifu-tips span { + color: #0099cc; +} + +#waifu #live2d { + cursor: grab; + height: 300px; + position: relative; + width: 300px; +} + +#waifu #live2d:active { + cursor: grabbing; +} + +#waifu-tool { + color: #aaa; + opacity: 0; + position: absolute; + left: 10px; + top: 55px; + transition: opacity 1s; +} + +#waifu:hover #waifu-tool { + opacity: 1; +} + +#waifu-tool span { + color: #7b8c9d; + cursor: pointer; + display: block; + line-height: 30px; + text-align: center; + transition: color 0.3s; +} + +#waifu-tool span:hover { + color: #0684bd; /* #34495e */ +} + +@keyframes shake { + 2% { + transform: translate(0.5px, -1.5px) rotate(-0.5deg); + } + + 4% { + transform: translate(0.5px, 1.5px) rotate(1.5deg); + } + + 6% { + transform: translate(1.5px, 1.5px) rotate(1.5deg); + } + + 8% { + transform: translate(2.5px, 1.5px) rotate(0.5deg); + } + + 10% { + transform: translate(0.5px, 2.5px) rotate(0.5deg); + } + + 12% { + transform: translate(1.5px, 1.5px) rotate(0.5deg); + } + + 14% { + transform: translate(0.5px, 0.5px) rotate(0.5deg); + } + + 16% { + transform: translate(-1.5px, -0.5px) rotate(1.5deg); + } + + 18% { + transform: translate(0.5px, 0.5px) rotate(1.5deg); + } + + 20% { + transform: translate(2.5px, 2.5px) rotate(1.5deg); + } + + 22% { + transform: translate(0.5px, -1.5px) rotate(1.5deg); + } + + 24% { + transform: translate(-1.5px, 1.5px) rotate(-0.5deg); + } + + 26% { + transform: translate(1.5px, 0.5px) rotate(1.5deg); + } + + 28% { + transform: translate(-0.5px, -0.5px) rotate(-0.5deg); + } + + 30% { + transform: translate(1.5px, -0.5px) rotate(-0.5deg); + } + + 32% { + transform: translate(2.5px, -1.5px) rotate(1.5deg); + } + + 34% { + transform: translate(2.5px, 2.5px) rotate(-0.5deg); + } + + 36% { + transform: translate(0.5px, -1.5px) rotate(0.5deg); + } + + 38% { + transform: translate(2.5px, -0.5px) rotate(-0.5deg); + } + + 40% { + transform: translate(-0.5px, 2.5px) rotate(0.5deg); + } + + 42% { + transform: translate(-1.5px, 2.5px) rotate(0.5deg); + } + + 44% { + transform: translate(-1.5px, 1.5px) rotate(0.5deg); + } + + 46% { + transform: translate(1.5px, -0.5px) rotate(-0.5deg); + } + + 48% { + transform: translate(2.5px, -0.5px) rotate(0.5deg); + } + + 50% { + transform: translate(-1.5px, 1.5px) rotate(0.5deg); + } + + 52% { + transform: translate(-0.5px, 1.5px) rotate(0.5deg); + } + + 54% { + transform: translate(-1.5px, 1.5px) rotate(0.5deg); + } + + 56% { + transform: translate(0.5px, 2.5px) rotate(1.5deg); + } + + 58% { + transform: translate(2.5px, 2.5px) rotate(0.5deg); + } + + 60% { + transform: translate(2.5px, -1.5px) rotate(1.5deg); + } + + 62% { + transform: translate(-1.5px, 0.5px) rotate(1.5deg); + } + + 64% { + transform: translate(-1.5px, 1.5px) rotate(1.5deg); + } + + 66% { + transform: translate(0.5px, 2.5px) rotate(1.5deg); + } + + 68% { + transform: translate(2.5px, -1.5px) rotate(1.5deg); + } + + 70% { + transform: translate(2.5px, 2.5px) rotate(0.5deg); + } + + 72% { + transform: translate(-0.5px, -1.5px) rotate(1.5deg); + } + + 74% { + transform: translate(-1.5px, 2.5px) rotate(1.5deg); + } + + 76% { + transform: translate(-1.5px, 2.5px) rotate(1.5deg); + } + + 78% { + transform: translate(-1.5px, 2.5px) rotate(0.5deg); + } + + 80% { + transform: translate(-1.5px, 0.5px) rotate(-0.5deg); + } + + 82% { + transform: translate(-1.5px, 0.5px) rotate(-0.5deg); + } + + 84% { + transform: translate(-0.5px, 0.5px) rotate(1.5deg); + } + + 86% { + transform: translate(2.5px, 1.5px) rotate(0.5deg); + } + + 88% { + transform: translate(-1.5px, 0.5px) rotate(1.5deg); + } + + 90% { + transform: translate(-1.5px, -0.5px) rotate(-0.5deg); + } + + 92% { + transform: translate(-1.5px, -1.5px) rotate(1.5deg); + } + + 94% { + transform: translate(0.5px, 0.5px) rotate(-0.5deg); + } + + 96% { + transform: translate(2.5px, -0.5px) rotate(-0.5deg); + } + + 98% { + transform: translate(-1.5px, -1.5px) rotate(-0.5deg); + } + + 0%, + 100% { + transform: translate(0, 0) rotate(0); + } +} diff --git a/package-lock.json b/package-lock.json index 8a4154c..5a065dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "qiokian", - "version": "2.1.30", + "version": "2.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "2.1.30", + "version": "2.2.1", "license": "GPLv3", "devDependencies": { "@babel/core": "^7.12.10", diff --git a/package.json b/package.json index d5a493e..0b46d02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "qiokian", - "version": "2.1.30", + "version": "2.2.1", "description": "🙊 live2d anime figure vuejs component.", "main": "dist/qiokian.ssr.js", "browser": "dist/qiokian.esm.js",