Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

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.
 
Live2D Cubism
Cubism Products and Downloads
Cubism product manuals and tutorials
Cubism Editor Manual    Cubism Editor Tutorial    Cubism SDK Manual    Cubism SDK Tutorial
[INFORMATION](6/25/2024)
Cubism Editor 5.1.00 beta1 is now available!

We have incorporated some of the feedback we received from those who tried the alpha version.
Thank you very much for your comments and requests!
All alpha versions will soon be closed to the public and will no longer be available.
Also, the Cubism Editor 5.1 alpha category will be closed, so please send your comments and requests to the Cubism Editor category.
Options

Question - canvas size and scaling

How do I make the canvas fill the entire window width & height and keep the live2d model to it's original proportion?

I try adjusting

canvas.width = window.innerWidth
canvas.height= window.innerHeight
canvas.style.width = window.innerWidth + "px";
canvas.style.height= window.innerHeight+ "px";

The result keep coming out distorted.

I also don't understand this matrix:

var s = 2.0 / live2DModel.getCanvasWidth();
var matrix4x4 = [ s,0,0,0 , 0,-s,0,0 , 0,0,1,0 , -1.0,1,0,1 ];
live2DModel.setMatrix(matrix4x4);

Can someone please explain. Thank you in advance.

Comments

Sign In or Register to comment.