live2d
live2d copied to clipboard
模型切换
大佬,能帮忙写个切换模型的按钮吗?, 我现在是这样写的,换模型按钮不知道咋弄了
<html>
<head>
<title>domemodel3</title>
<meta charset="utf-8" />
<script src=""></script>
<script src="js/jquery.min.js"></script>
<script src="js/live2dcubismcore.min.js"></script>
<script src="js/pixi.min.js"></script>
<script src="js/live2dcubismframework.js"></script>
<script src="js/live2dcubismpixi.js"></script>
<script src="js/l2d.js"></script>
<script src="js/main.js"></script>
</head>
<style type="text/css">
</style>
<div class="Canvas" id="L2dCanvas"></div>
<script>
var config = {
basePath: 'http://127.0.0.1/sw',
role: '4__l2d_32.u',
opacity: 1,
mobile: true
}
var v = new Viewer(config);
</script>
</html>
可以再按钮的函数里更改config,然后重新初始化Viewer
写不来 ╮(╯▽╰)╭