Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何在hexo里使用moc3 #2

Open
Joy-Hannn opened this issue Mar 5, 2022 · 5 comments
Open

请问如何在hexo里使用moc3 #2

Joy-Hannn opened this issue Mar 5, 2022 · 5 comments

Comments

@Joy-Hannn
Copy link

我自己hexo博客调用moc3的模型一直无法正常显示,官方的issue也有人说无法显示:EYHN/hexo-helper-live2d#163
请问您是怎么做到的呢?

@LitStronger
Copy link
Owner

我自己hexo博客调用moc3的模型一直无法正常显示,官方的issue也有人说无法显示:EYHN/hexo-helper-live2d#163 请问您是怎么做到的呢?
我没有用hexo-helper-live2d这个插件,因为hexo的markdown里支持html和js,因此直接在markdown里插入live2d-moc3示例的代码片段片段就行了

@LitStronger
Copy link
Owner

我自己hexo博客调用moc3的模型一直无法正常显示,官方的issue也有人说无法显示:EYHN/hexo-helper-live2d#163 请问您是怎么做到的呢?
moc和moc3应该是不兼容的,hexo-helper-live2d这个插件应该只实现了moc

@Joy-Hannn
Copy link
Author

请问有什么方法可以把moc3转为moc吗,或者说这些moc3的模型有moc版本吗?我还是想全局使用,有些page是没有md的

@Yuzu815
Copy link

Yuzu815 commented Mar 19, 2022

请问有什么方法可以把moc3转为moc吗,或者说这些moc3的模型有moc版本吗?我还是想全局使用,有些page是没有md的

可以尝试一下在模板文件中插入js引用,我是这么做的:

<!-- Live2DCubismCore script -->
<script src="https://cdn.jsdelivr.net/gh/wangstong/live2dm3/live2d/js/live2dcubismcore.js"></script>
<!-- Build script -->
<script src="https://cdn.jsdelivr.net/gh/wangstong/live2dm3/live2d/js/bundle.js"></script>
<canvas id="live2d" width="200" height="200" class="live2d" style="position: fixed; opacity: 1; left: 3px; bottom: -5px; z-index: 99999; pointer-events: none;"></canvas>

<script type="text/javascript">
var resourcesPath = 'https://cdn.jsdelivr.net/gh/YZ-HL/LSS_Model@main/';
var backImageName = '';
var modelDir = ['LSS'];
initDefine(resourcesPath, backImageName, modelDir);
</script>

@Weidows
Copy link

Weidows commented Mar 20, 2022

我给打包优化了下,非常方便导入了,之后会再跟进一些bug
https://github.com/Weidows-projects/live2d-moc3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants