live2d icon indicating copy to clipboard operation
live2d copied to clipboard

模型切换

Open x0620x opened this issue 3 years ago • 2 comments

大佬,能帮忙写个切换模型的按钮吗?, 我现在是这样写的,换模型按钮不知道咋弄了

<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>

x0620x avatar Mar 31 '22 10:03 x0620x

可以再按钮的函数里更改config,然后重新初始化Viewer

imuncle avatar Apr 01 '22 01:04 imuncle

写不来 ╮(╯▽╰)╭

x0620x avatar Apr 01 '22 01:04 x0620x