live2d动画模型的二次开发

Last updated on:4 months ago

Github上面有很多live2d的模型,但是我想大家都知道很多live2d的模型是不能直接在hexo上使用的。(或者wordpress)

源码使用

源码文件夹
想找个hexo能直接用的,仿照其java语法,然后设置model.json(修改里面的exp, moc, mtn, snd路径),physics的内容可以保留不变。

二次开发

可以用live2d viewer简单添加编辑动作。
live2d viewer
在萌娘百科里面下载角色的原版语音(建议不要商用),用浏览器调出语音的链接即可。
萌娘百科:丛云
我的配置文件如下。“sound”:后面的mp3都是自己配置的。

{
	"type":"Live2D Model Setting",
	"name":"murakumo",
	"model":"moc/murakumo.moc",
	"textures":[
		"moc/murakumo.1024/texture_00.png"
	],
    "physics":"murakumo.physics.json",
	"layout":{"center_x":0,"y":1.2,"width":2.4},
	"hit_areas":[{"name":"head","id":"D_REF.HEAD"},{"name":"body","id":"D_REF.BODY"}],
    "expressions":[
		{"name":"f01.mtn","file":"exp/f01.exp.json"},
		{"name":"f02.mtn","file":"exp/f02.exp.json"},
		{"name":"f03.mtn","file":"exp/f03.exp.json"},
		{"name":"f04.mtn","file":"exp/f04.exp.json"}
	],
	"motions":{
	    "idle":[
			{"file":"mtn/murakumo_idle_01.mtn","fade_in":2000, "fade_out":2000},
			{"file":"mtn/murakumo_idle_02.mtn","fade_in":2000, "fade_out":2000},
			{"file":"mtn/murakumo_idle_03.mtn","fade_in":2000, "fade_out":2000}
		],
		"flick_head":[
		    {"file":"mtn/murakumo_m_01.mtn","sound":"snd/flickHead_00.mp3"},
			{"file":"mtn/murakumo_m_02.mtn","sound":"snd/flickHead_01.mp3"}
		],
		"tap_body":[
            {"file":"mtn/murakumo_tap_bust_01.mtn","sound":"snd/tapBody_01.mp3"},
			{"file":"mtn/murakumo_tap_bust_02.mtn","sound":"snd/tapBody_02.mp3"},
            {"file":"mtn/murakumo_tap_ear_01.mtn","sound":"snd/tapBody_00.mp3"}
		]
	}
}

效果

我的个人网站效果:
个人网站效果