{"id":140,"date":"2024-12-23T20:48:23","date_gmt":"2024-12-23T12:48:23","guid":{"rendered":"https:\/\/cthzs.cn\/?p=140"},"modified":"2025-02-13T21:24:47","modified_gmt":"2025-02-13T13:24:47","slug":"ohmylive2d-live2d-for-web-%e7%bb%84%e4%bb%b6-%e6%9c%ac%e5%9c%b0%e9%83%a8%e7%bd%b2","status":"publish","type":"post","link":"https:\/\/loveyou.cthzs.cn\/?p=140","title":{"rendered":"OhMyLive2D Web \u7ec4\u4ef6 &#8211; \u672c\u5730\u90e8\u7f72"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5728\u81ea\u5df1\u7684\u7ad9\u70b9\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u50a8\u5b58\u7ec4\u4ef6\u7684\u76ee\u5f55\uff0c\u7136\u540e\u6253\u5f00\u7ec8\u7aef\u62c9\u53d6\u4e0b\u8f7d\u7ec4\u4ef6<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/cthzs.cn\/img\/oh-my-live2d-1.png\" alt=\"\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install oh-my-live2d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u66f4\u65b0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install oh-my-live2d@latest<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-8f761849 wp-block-group-is-layout-flex\">\n<p class=\"wp-block-paragraph\"><s>\u5b98\u65b9\u7f51\u7ad9:<\/s><\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/oml2d.hacxy.cn\/logo-black.png\" style=\"width:23px;height:auto;text-decoration: line-through;\" \/>\n<a href=\"https:\/\/oml2d.com\" style=\"text-decoration: line-through;\" target=\"_blank\"  rel=\"nofollow\" >OhMyLive2D<\/a>\n\n\n\n<p class=\"wp-block-paragraph\"><s>\u91cc\u9762\u6709\u66f4\u8be6\u7ec6\u7684\u4f7f\u7528\u6559\u7a0b<\/s>(\u6b64\u57df\u540d\u5df2\u5e9f\u5f03\u5982\u9700\u4f7f\u7528\u9700\u8bbf\u95ee\u96f6\u65f6\u7f51\u7ad9<a href=\"https:\/\/oml2d.hacxy.cn\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/oml2d.hacxy.cn<\/a>)<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u8fd9\u91cc\u4f7f\u7528\u5b98\u7f51\u4e2d\u7684\u5feb\u901f\u4f53\u9a8c\uff0cjs\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script src=\"https:\/\/unpkg.com\/oh-my-live2d@latest\"&gt;&lt;\/script&gt;\n&lt;script&gt;\n  OML2D.loadOml2d({\n    models: &#91;\n      {\n        path: 'https:\/\/model.oml2d.com\/HK416-1-normal\/model.json',\n        position: &#91;0, 60],\n        scale: 0.08,\n        stageStyle: {\n          height: 450\n        }\n      }\n    ]\n  });\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u63d0\u4f9b\u7ed9\u7684 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">https:\/\/unpkg.com\/oh-my-live2d@latest<\/mark> \u53ef\u4ee5\u6362\u6210\u672c\u5730\u7684<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">index.min.js<\/mark> \u4f4d\u7f6e\u5728 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\/2D\/node_modules\/oh-my-live2d\/dist\/index.min.js<\/mark> (\u8fd9\u91cc\u76842D\u662f\u6211\u81ea\u5df1\u5efa\u7684\u50a8\u5b58\u7ec4\u4ef6\u7684\u76ee\u5f55\uff0c\u53ef\u4ee5\u6362\u6210\u81ea\u5df1\u7684)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6a21\u578b\u53ef\u4ee5\u5728<a href=\"https:\/\/github.com\/oh-my-live2d\/live2d-models\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/github.com\/oh-my-live2d\/live2d-models<\/a>\u4e0b\u8f7d\u6a21\u578b\u5230\u672c\u5730<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5f00<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\/2D\/node_modules\/oh-my-live2d\/dist\/index.js<\/mark> \u548c <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">index.min.js<\/mark>\u3002Ctrl + F \u641c\u7d22 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">package.json<\/mark> \u66ff\u6362\u6210\u672c\u5730 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\/2D<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\/<\/mark>node_modules\/oh-my-live2d\/package.json<\/mark> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6837\u5c31\u53ef\u4ee5\u672c\u5730\u4f7f\u7528OhMyLive2D Web \u7ec4\u4ef6\u4e86 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u548c\u6211\u4e00\u6837\u4e0d\u559c\u6b22\u90a3\u4e2a\u5173\u4e8e\u6309\u94ae\u53ef\u4ee5\u6253\u5f00\u4e0a\u8ff0\u4e24\u4e2a\u6587\u4ef6\u641c\u7d22<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      {\n        id: \"About\",\n        icon: \"icon-about\",\n        title: \"\u5173\u4e8e\",\n        onClick() {\n          window.open(\"https:\/\/oml2d.com\");\n        }\n      }<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>,{id:\"About\",icon:\"icon-about\",title:\"\u5173\u4e8e\",onClick(){window.open(\"https:\/\/oml2d.com\")}}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5220\u6389\u6216\u8005\u6362\u6210\u5176\u4ed6\u94fe\u63a5\u5c31\u6ca1\u5566<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u81ea\u5df1\u7684\u7ad9\u70b9\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u50a8\u5b58\u7ec4\u4ef6\u7684\u76ee\u5f55\uff0c\u7136\u540e\u6253\u5f00\u7ec8\u7aef\u62c9\u53d6\u4e0b\u8f7d\u7ec4\u4ef6 \u66f4\u65b0 \u5b98\u65b9\u7f51\u7ad9: OhMyLive2D \u91cc\u9762\u6709\u66f4\u8be6\u7ec6\u7684\u4f7f\u7528\u6559\u7a0b &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-140","post","type-post","status-publish","format-standard","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/posts\/140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=140"}],"version-history":[{"count":17,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/posts\/140\/revisions"}],"predecessor-version":[{"id":301,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/posts\/140\/revisions\/301"}],"wp:attachment":[{"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}