guansss / pixi-live2d-display

A PixiJS plugin to display Live2D models of any kind.
https://guansss.github.io/pixi-live2d-display/
MIT License
823 stars 125 forks source link

我使用了cubism4加载了model3,可如何在.model3.json中配置模型的初始位置和大小 #89

Closed loclink closed 1 year ago

loclink commented 1 year ago

model2可以通过model.json中的layout属性来设置初始位置和大小。 model3如何设置呢?

loclink commented 1 year ago

此问题已解决。 通过查阅API文档,找到了接口ModelJson中定义的Layout类型,定义的内容为以下内容即可设置初始大小和位置:

{
  "Layout": {
    "CenterX": 0,
    "CenterY": 0.05,
    "Width": 0.15,
    "Height": 0.15,
    "X": 0.1,
    "Y": 0.1
  }
}