Welcome to IOPWiki, Commander.
We are searching for new editors to keep track of Girls' Frontline 2 content, as well as veteran players to complete the data of Girls' Frontline and Project Neural Cloud characters.
You can contribute without an account. Learn how to contribute and join our Discord server.

Widget:Live2DSwitcher: Difference between revisions

Welcome to IOP Wiki. This website is maintained by the Girls' Frontline community and is free to edit by anyone.
Jump to navigation Jump to search
loaded missing resources
No edit summary
Line 6: Line 6:


     containers.each(function() {
     containers.each(function() {
      var container = $(this);
      var doll = container.data('t-doll');
       mw.loader.using('ext.gadget.live2d').then(function() {
       mw.loader.using('ext.gadget.live2d').then(function() {
         var ul = $(this).find('ul');
         var ul = $(this).find('ul');
         var settings = gfUtils.live2dUtils.convertSettingsFromUl(ul);
         var settings = gfUtils.live2dUtils.convertSettingsFromUl(ul);
        for (costume in settings) {
          for (variant in costume) {
            var id = doll + "|" + costume.costumeId + "|" + variant.variantId;
            var name = variant.name;
            if (!name) {
              name = costume.costumeId + " - " + variant.variantId;
            }
            $('#mySelect').append($('<option>', {
              value: id,
              text: name
            }));
          }
        }
         console.log(settings);
         console.log(settings);
       });
       });
Line 36: Line 51:
<!--<option value="<!--{$defaultpaths|escape:'html'}-->" selected="selected"></option>-->
<!--<option value="<!--{$defaultpaths|escape:'html'}-->" selected="selected"></option>-->
</select></includeonly><noinclude>
</select></includeonly><noinclude>
<div class="dollLive2d" style="height: 800px; width: 700px;">
<div class="dollLive2d" data-t-doll="Thompson" style="height: 800px; width: 700px;">
{{#widget:Live2DSwitcher}}
{{#widget:Live2DSwitcher}}
<div class="live2dsettings" style="display:none">{{:Thompson/Live2DSettings}}</div>
<div class="live2dsettings" style="display:none">{{:Thompson/Live2DSettings}}</div>
</div>
</div>
</noinclude>
</noinclude>

Revision as of 15:20, 15 September 2018