Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

feat: add support for idle and mtn #43

Closed
journey-ad opened this issue Nov 17, 2017 · 6 comments
Closed

feat: add support for idle and mtn #43

journey-ad opened this issue Nov 17, 2017 · 6 comments
Labels
feature jsClient(Deprected) Go to https://github.com/xiazeyu/live2d-widget.js longTerm
Milestone

Comments

@journey-ad
Copy link
Contributor

提取到的一些模型含有久置动作,想把这些动作利用起来。
例如鼠标停留或移出浏览器窗口指定时间后触发

另外现在未对鼠标点击做处理吗?我看 main.js 里未处理 mousedownmouseup 事件

@EYHN @xiazeyu

@xiazeyu
Copy link
Collaborator

xiazeyu commented Nov 17, 2017

应该可以加入,但是现在貌似是会自动切换到IDLE的,具体我还没进行研究。
鼠标点击应该是有反应的。你可以加载一个模型试一下

@xiazeyu xiazeyu added this to the 3.0 milestone Nov 17, 2017
@xiazeyu xiazeyu added the jsClient(Deprected) Go to https://github.com/xiazeyu/live2d-widget.js label Nov 17, 2017
@journey-ad
Copy link
Contributor Author

@xiazeyu
DEBUG_LOGDEBUG_MOUSE_LOG设置为true之后观察到每次移动鼠标都会触发点击事件;带有HIT_AREA的模型在目标区域移动鼠标会触发点击动作,点击鼠标反而无效
移动鼠标时的日志

onMouseDown device( x:17 y:34 ) view( x:-0.9735294112470001 y:1.3058823584578931) main.js:303
tapEvent view x:-0.9735294112470001 y:1.3058823584578931 LAppLive2DManager.js:109

根据main.js#L363-L364来看,每次移动鼠标都会调用modelTurnHead方法,而modelTurnHead又会触发点击事件main.js#L310LAppLive2DManager.js#L105-L126
这是否为一个错误?

@EYHN
Copy link
Owner

EYHN commented Nov 21, 2017

正是如此设计的 因为这里的live2d拥有css属性 pointer-events: none; 不会收集到鼠标点击事件

@xiazeyu
Copy link
Collaborator

xiazeyu commented Nov 21, 2017

应该是一个错误。如果你有想法请提交代码,我过几天也会加入待办并修改。

@xiazeyu xiazeyu reopened this Nov 24, 2017
@xiazeyu xiazeyu changed the title 是否计划支持久置动作和对点击事件的疑问 feat: add support for idle and mtn Dec 8, 2017
@xiazeyu xiazeyu added longTerm and removed question labels Dec 8, 2017
@xiazeyu xiazeyu modified the milestones: 3.0, Future+ Dec 8, 2017
@xiazeyu xiazeyu mentioned this issue Dec 8, 2017
1 task
@xiazeyu
Copy link
Collaborator

xiazeyu commented Dec 9, 2017

this.models[i].startRandomMotion(cDefine.MOTION_GROUP_PINCH_IN,
      cDefine.PRIORITY_NORMAL);
this.models[i].startRandomMotion(cDefine.MOTION_GROUP_PINCH_OUT,
      cDefine.PRIORITY_NORMAL);

@xiazeyu
Copy link
Collaborator

xiazeyu commented Mar 18, 2018

Migrated to xiazeyu/live2d-widget.js#14

@xiazeyu xiazeyu closed this as completed Mar 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature jsClient(Deprected) Go to https://github.com/xiazeyu/live2d-widget.js longTerm
Projects
None yet
Development

No branches or pull requests

3 participants