If you have any questions, reports, suggestions, or requests about Live2D, please send them to this forum.
※We cannot guarantee statements or answers from Live2D staff. Thank you for your understanding in advance.
deviceToScreen is a matrix to transform device coordinates to screen coordinates. For example, this object is used to get the coordination from touchEvent on screen (values like 1034.27, 328.63), and translate into parameters that Live2DModel uses (typically between -1 to 1).
viewMatrix is for perspective transformation. You can change the magnification and the coordination of the camera by modifying it.
I guess you are trying to scale only the model, not the whole screen. If so, then modelMatrix declared in LAppModel would be useful. To scale the model you can use setWidth() or setHeight(). setWidth() scales according to model's width, and setHeight scales according to model's height. As these methods would not change the aspect ratio, you only need to set one of them.
Comments
deviceToScreen is a matrix to transform device coordinates to screen coordinates. For example, this object is used to get the coordination from touchEvent on screen (values like 1034.27, 328.63), and translate into parameters that Live2DModel uses (typically between -1 to 1).
viewMatrix is for perspective transformation. You can change the magnification and the coordination of the camera by modifying it.
I guess you are trying to scale only the model, not the whole screen. If so, then modelMatrix declared in LAppModel would be useful. To scale the model you can use setWidth() or setHeight(). setWidth() scales according to model's width, and setHeight scales according to model's height. As these methods would not change the aspect ratio, you only need to set one of them.
Also you can set the size explicitly.
1-d. Specify the position and the size
https://sites.google.com/a/cybernoids.jp/cubism_e/sdk_tutorial/live2d_library/load_to_display/display_mode
There are three screen size 1024x768, 1136x640 and 960x640 need to adapt.
My modal canvas is 960x640. And I found it shows a little strange in 1136x640 screen size. It scale bigger a lot.