Tweakpane参数微调和监视值变化窗体示例代码

代码语言:html

所属分类:布局界面

代码描述:Tweakpane参数微调和监视值变化窗体示例代码

代码标签: 调和 监视 变化 窗体 示例

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>BFW NEW PAGE</title>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/tweakpane.3.02.js"></script>

    <style>
    </style>
</head>
<body>
    <script type="text/javascript">

        const PARAMS = {
            k: 0,
            message: "hello",
            hidden: true,
            factor: 123,
            title: 'hello',
            color: '#0f0',
            percentage: 50,
            size: 10,
            key: '#22aaeeff',
            theme: 'dark',
            offset: {
                x: 50,
                y: 50
            },
            speed: 0.5,
            source: {
                x: 0,
                y: 0,
                z: 0
            },
            quality: 0,
        };

        const pane = new Tweakpane.Pane();


        pane.addInput(PARAMS, 'quality', {
            options: {
                low: 0,
                medium: 50,
                high: 100,
            },
        });



        pane.addInput(PARAMS, 'speed');
        pane.addInput(PARAMS, 'k', {
            format: (v) => v.to.........完整代码请登录后点击上方下载按钮下载查看

网友评论0