打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

舰R百科是靠无数志愿编辑者持续地建设更新完善的。编辑非常简单,无需代码知识,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

微件:Live2d:修订间差异

来自舰R百科
无编辑摘要
无编辑摘要
 
(未显示同一用户的1个中间版本)
第4行: 第4行:
</noinclude><includeonly>
</noinclude><includeonly>
<button id='live2d-button' onclick='live2d_main()'>点击显示</button>
<button id='live2d-button' onclick='live2d_main()'>点击显示</button>
<script src='https://cruiseliu.github.io/live2d-demo/src/live2d.min.js'></script>
<script src='https://zjsnrwiki.github.io/live2d/src/live2d.min.js'></script>
<script src='https://cruiseliu.github.io/live2d-demo/src/Live2DFramework.js'></script>
<script src='https://zjsnrwiki.github.io/live2d/src/Live2DFramework.js'></script>
<script src='https://cruiseliu.github.io/live2d-demo/src/MatrixStack.js'></script>
<script src='https://zjsnrwiki.github.io/live2d/src/MatrixStack.js'></script>
<script src='https://cruiseliu.github.io/live2d-demo/src/ModelSettingJson.js'></script>
<script src='https://zjsnrwiki.github.io/live2d/src/ModelSettingJson.js'></script>
<script src='https://cruiseliu.github.io/live2d-demo/src/PlatformManager.js'></script>
<script src='https://zjsnrwiki.github.io/live2d/src/PlatformManager.js'></script>
<script src='https://cruiseliu.github.io/live2d-demo/src/LAppModel.js'></script>
<script src='https://zjsnrwiki.github.io/live2d/src/LAppModel.js'></script>
<script>
<script>
var l2d_index = "<!--{$index|escape:'quotes'}-->";
var l2d_index = "<!--{$index|escape:'quotes'}-->";
第104行: 第104行:
function initTriggers()
function initTriggers()
{
{
     for (let hitArea of l2d_config.hit_areas)
     for (var hitArea of l2d_config.hit_areas)
         for (let triggerData of l2d_config.trigger)
         for (var triggerData of l2d_config.trigger)
             if (hitArea.id == triggerData.id) {
             if (hitArea.id == triggerData.id) {
                 let trigger = { area: hitArea.name, gesture: triggerData.actionType };
                 var trigger = { area: hitArea.name, gesture: triggerData.actionType };
                 trigger.expressions = [ ];
                 trigger.expressions = [ ];
                 for (let action of triggerData.action) {
                 for (var action of triggerData.action) {
                     if (l2d_config.motions[action] != null) {
                     if (l2d_config.motions[action] != null) {
                         trigger.motion = action;
                         trigger.motion = action;
                     } else {
                     } else {
                         for (let exp of l2d_config.expressions)
                         for (var exp of l2d_config.expressions)
                             if (exp.name == action)
                             if (exp.name == action)
                                 trigger.expressions.push(exp.name);
                                 trigger.expressions.push(exp.name);
第170行: 第170行:


     l2d_dragging = true;
     l2d_dragging = true;
     for (let trigger of l2d_triggers) {
     for (var trigger of l2d_triggers) {
         if (l2d_model.hitTest(trigger.area, x * 1.5, y)) {
         if (l2d_model.hitTest(trigger.area, x * 1.5, y)) {
             l2d_curTrigger = trigger;
             l2d_curTrigger = trigger;