Code Monkey home page Code Monkey logo

Comments (1)

Dragon1573 avatar Dragon1573 commented on July 29, 2024 1

概述

@XunZhan - 我的模型是脖子以上全没了😭暂时没能找到设置位置或者缩小模型的配置

image


解决方案

模型是在 <canvas /> 中被渲染的,需要调整模型本身。

以我使用的模型为例,需要针对性调整 layout 下的4个参数。

  • center_x 调整模型在 <canvas /> 中的水平偏移
  • center_y 调整模型在 <canvas /> 中的垂直偏移
  • widthheight 猜测 是调整模型的缩放比例(这里的 2 可能表示 200%)
{
    "posted": "Dreamer-Paul",
    "version": "Live2DViewerEX Config 1.0",
    "model": "sagiri.moc",
    "textures": [
        "textures/texture_00.png",
        "textures/texture_01.png"
    ],
    "layout": {
        "center_x": 0,
        "center_y": -0.3,
        "width": 2,
        "height": 2
    },
    "motions": {
        "tap": [
            {
                "file": "motions/tap/c.mtn"
            }
        ],
        "idle": [
            {
                "file": "motions/idle/idle_01.mtn"
            },
            {
                "file": "motions/idle/idle_02.mtn"
            },
            {
                "file": "motions/idle/idle_03.mtn"
            },
            {
                "file": "motions/idle/idle_04.mtn"
            }
        ]
    },
    "physics": "physics.json"
}

image

from live2d_api.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.