[About macOS Ventura 13.0] (12/20/2022)
The currently released Live2D Cubism SDK is not guaranteed to work with macOS Ventura.
Please refrain from upgrading the macOS as they may not work properly.
The Cubism Editor license file may be lost after the macOS upgrade.
Please make sure to deactivate the Cubism Editor license before upgrading the macOS.
For more details[NOTICE]
About the support for Mac models
Cubism Editor is not supported with Apple M1 processors.
Please refer to
System Requirements for details.
We will not respond to any related inquiries with this message.
How to use the matrix in live2d
I want to transform and scale a live2d model.
Anyone can tell me how to do get this done.
How to use the two matrix below?
deviceToScreen=new L2DMatrix44();
viewMatrix=new L2DViewMatrix();
0 ·
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.