Howdy, Stranger!


Please limit one question/topic per post.
Please provide the following details depending on types of question

▼ For question regarding Editor, please provide:
- PC Model: (e.g. MacBookPro 2017)
- Graphics Specifications: (e.g. GeForce GTX 950M)
- Memory: (e.g. 8GB)
- Attach screenshot or capture video to show your problem:
▼ For question regarding SDK, please provide:
- Types and version of Cubism SDK you are using.
▼ For question regarding Cubism Software License,

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 = window.innerWidth + "px"; 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 ];

Can someone please explain. Thank you in advance.


Sign In or Register to comment.