-
你好,我想问一个插入live2d moc3模型的问题 <!------ 位置可自定义 ------>
<div class="Canvas" style="position: fixed; right: 10px; bottom: 10px;z-index: 99999999" id="L2dCanvas"></div>
<!------ 依赖 JS | Dependent JS ------>
<!---- 可选 | Optional ---->
<!-- 兼容低版本浏览器 | Compatible with low-level browsers -->
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"> </script>
<!-- 音频播放兼容 | Audio playback compatible -->
<script src="https://cdn.jsdelivr.net/npm/howler@2.1.3/dist/howler.min.js"></script>
<!---- 必需 | Required ---->
<script src="https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pixi.js@4.6.1/dist/pixi.min.js"></script>
<!-- live2dv3.js -->
<script src="https://cdn.jsdelivr.net/npm/live2dv3@1.2.2/live2dv3.min.js"></script>
<!------ 加载Live2d模型 | Load Live2d model ------>
<script>
window.onload = () => {
new l2dViewer({
el: document.getElementById('L2dCanvas'),
basePath: 'https://cdn.jsdelivr.net/npm/live2dv3@latest/assets',
modelName: 'biaoqiang_3',
sounds: [
'sounds/demo.mp3', // 相对路径是相对于模型文件夹
'https://cdn.jsdelivr.net/npm/live2dv3@latest/assets/biaoqiang_3/sounds/demo.mp3' // 也可以是网址
]
})
}
</script> 在 blog 中是可以正常显示 live2d moc3 模型的,博客链接 但是,我在 |
Beta Was this translation helpful? Give feedback.
Answered by
tyokyo320
Jun 24, 2023
Replies: 1 comment
-
已解决......已经正常显示live2d moc3模型。
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tyokyo320
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
已解决......已经正常显示live2d moc3模型。