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

bug: wrong reaction when AASetting(scaling) isn't 1 #32

Closed
2 tasks
xiazeyu opened this issue Nov 4, 2017 · 4 comments
Closed
2 tasks

bug: wrong reaction when AASetting(scaling) isn't 1 #32

xiazeyu opened this issue Nov 4, 2017 · 4 comments
Labels
BUG jsClient(Deprected) Go to https://github.com/xiazeyu/live2d-widget.js
Milestone

Comments

@xiazeyu
Copy link
Collaborator

xiazeyu commented Nov 4, 2017

将scaling调至大于1时,由于实际大小与显示大小不同,所以鼠标指针的跟随也会出现问题,右下角无法识别

  • Solve it
  • Test if mobileScaling also have problem
@xiazeyu xiazeyu removed the longTerm label Nov 13, 2017
@xiazeyu xiazeyu added this to the 3.0 milestone Nov 13, 2017
@xiazeyu xiazeyu added the jsClient(Deprected) Go to https://github.com/xiazeyu/live2d-widget.js label Nov 13, 2017
@xiazeyu xiazeyu self-assigned this Nov 13, 2017
@xiazeyu
Copy link
Collaborator Author

xiazeyu commented Nov 26, 2017

normal:
modelTurnHead onMouseMove device( x:1 y:1 ) view( x:-1 y:1.3257576153105632)
main.js (285,9)
modelTurnHead onMouseMove device( x:1199 y:854 ) view( x:1.0066667152568698 y:-0.5050000047776848)
main.js (285,9)

bug:
modelTurnHead onMouseMove device( x:0 y:3 ) view( x:-1 y:1.3154507730560343)
main.js (285,9)
modelTurnHead onMouseMove device( x:1198 y:852 ) view( x:0.006666691042482853 y:0.35183832203365206)
main.js (285,9)

@xiazeyu xiazeyu added this to toDo in 3.0 - clientJs Dec 8, 2017
@xiazeyu xiazeyu changed the title 加入scaling后反馈不对应 bug: wrong reaction when AASetting(scaling) isn't 1 Dec 8, 2017
@xiazeyu xiazeyu removed their assignment Dec 8, 2017
@xiazeyu
Copy link
Collaborator Author

xiazeyu commented Dec 9, 2017

//============================================================
//============================================================
//  class L2DModelMatrix       extends     L2DMatrix44
//============================================================
//============================================================

function transformRect(center, transform, rect)

@xiazeyu
Copy link
Collaborator Author

xiazeyu commented Dec 9, 2017

  // 此处获取的是canvas的大小 即绘制大小,与实际显示大小无关
  let width = canvas.width;
  let height = canvas.height;
  // 以下为实际显示大小
  // let sWidth = parseInt(canvas.style.width);
  // let sHeight = parseInt(canvas.style.height);

  deviceToScreen = new L2DMatrix44();
  deviceToScreen.multTranslate(-width / 2.0, -height / 2.0);
  deviceToScreen.multScale(2 / width, -2 / width);

@xiazeyu
Copy link
Collaborator Author

xiazeyu commented Mar 18, 2018

Migrated to xiazeyu/live2d-widget.js#15

@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
BUG jsClient(Deprected) Go to https://github.com/xiazeyu/live2d-widget.js
Projects
No open projects
Development

No branches or pull requests

2 participants