mediapipe+three实现摄像头手势控制三维粒子文字爆炸聚合动画效果代码

代码语言:html

所属分类:三维

代码描述:mediapipe+three实现摄像头手势控制三维粒子文字爆炸聚合动画效果代码

代码标签: mediapipe three 摄像头 手势 控制 三维 粒子 文字 爆炸 聚合 动画

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

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Pro Gesture Particles</title>
    
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/tailwindcss.3.4.16.js"></script>
    
    <style>
        body { margin: 0; overflow: hidden; background-color: #050505; color: white; font-family: 'Segoe UI', sans-serif; }
        #canvas-container { width: 100vw; height: 100vh; position: absolute; top: 0; left: 0; z-index: 1; }
        
        /* UI 层优化 */
        #ui-layer {
            position: absolute;
            top: 20px;
            left: 20px;
            z-index: 10;
            background: rgba(10, 10, 20, 0.85);
            padding: 24px;
            border-radius: 16px;
            border: 1px solid rgba(0, 210, 255, 0.3);
            backdrop-filter: blur(10px);
            width: 320px;
            box-shadow: 0 0 20px rgba(0, 210, 255, 0.1);
            transition: transform 0.3s;
        }
        
        /* 状态指示灯 */
        .status-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: #333;
            display: inline-block;
            margin-right: 8px;
            box-shadow: 0 0 5px currentColor;
        }
        .status-active { background-color: #00ff88; color: #00ff88; }
        .status-inactive { background-color: #ff3333; color: #ff3333; }

        /* 摄像头预览优化 */
        #camera-wrapper {
            position: absolute;
            bottom: 20px;
            right: 20px;
            z-index: 10;
            width: 280px;
            height: 210px;
            border-radius: 12px;
            overflow: hidden;
            border: 2px solid rgba(0, 210, 255, 0.5);
            background: #000;
        }
        
        /* Canvas 叠加在 Video 上用于画骨骼 */
        #output_canvas {
            position: absolute;
            left: 0; top: 0;
            width: 100%; height: 100%;
            transform: scaleX(-1); /* 镜像 */
        }
        
        .input_video {
            width: 100%; height: 100%;
            object-fit: cover;
            transform: scaleX(-1); /* 镜像 */
            opacity: 0.6; /* 稍微暗一点,突出骨骼 */
        }

        .hidden-wrapper {
            opacity: 0;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0