js+css实现控制提线木偶姿态动作代码

代码语言:html

所属分类:其他

代码描述:js+css实现控制提线木偶姿态动作代码

代码标签: js css 控制 提线 木偶 姿态 动作 代码

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

  <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Space+Mono:wght@400;700&display=swap');

        :root {
            --bone: #e0e0e0;
            --bone-dark: #b0b0b0;
            --string: rgba(255, 255, 255, 0.18);
            --accent: #d4af37;
            --bg: #0a0f12;
            --glow: rgba(212,175,55,0.15);
            --mood-color: rgba(212,175,55,0.3);
        }

        *, *::before, *::after { box-sizing: border-box; }

        body, html {
            margin: 0; padding: 0; width: 100%; height: 100%;
            background: var(--bg); overflow: hidden;
            font-family: 'Space Mono', monospace;
            cursor: none;
        }

        /* CUSTOM CURSOR */
        #cursor {
            position: fixed; width: 12px; height: 12px;
            border: 1px solid var(--accent); border-radius: 50%;
            pointer-events: none; z-index: 9999;
            transform: translate(-50%, -50%);
            transition: width 0.2s, height 0.2s, background 0.2s;
        }
        #cursor-trail {
            position: fixed; width: 4px; height: 4px;
            background: var(--accent); border-radius: 50%;
            pointer-events: none; z-index: 9998;
            transform: translate(-50%, -50%);
            opacity: 0.5;
        }

        /* STAGE */
        #theatre-stage {
            position: relative; width: 100%; height: 100%;
            display: flex; justify-content: center; align-items: center;
            background: radial-gradient(circle at 50% 40%, #1a2a2d 0%, #050505 100%);
            perspective: 1200px;
        }

        /* SPOTLIGHT */
        #spotlight {
            position: absolute;
            width: 400px; height: 700px;
            background: conic-gradient(from 170deg at 50% 0%, transparent 0deg, var(--mood-color) 15deg, transparent 30deg);
            top: 0; left: 50%; transform: translateX(-50%);
            pointer-events: none; z-index: 1;
            transition: background 1.2s ease, opacity 0.5s;
            filter: blur(10px);
        }

        /* PARTICLE CANVAS */
        #particle-canvas {
            position: absolute; top: 0; left: 0;
            width: 100%; height: 100%;
            pointer-events: none; z-index: 2;
        }

        /* AUDIO VISUALIZER */
        #visualizer {
            position: absolute; bottom: 0; left: 0; right: 0;
            height: 80px; z-index: 3;
            display: flex; align-items: flex-end; justify-content: center;
            gap: 3px; padding: 0 20px;
            opacity: 0.4;
        }
        .v-bar {
            width: 6px; min-height: 3px;
            background: linear-gradient(to top, var(--accent), transparent);
            border-radius: 3px 3px 0 0;
            transition: height 0.1s ease;
        }

        /* CONTROLLER */
        #controller-hand {
            position: absolute; top: 5%; left: 50%;
            width: 320px; transform: translateX(-50%);
            filter: drop-shadow(0 20px 30px rgba(0,0,0,0.8));
            z-index: 10;
            transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #string-svg {
            position: fixed; top: 0; left: 0;
  .........完整代码请登录后点击上方下载按钮下载查看

网友评论0