three+MediaPipe+webgl实现摄像头识别手势操控三维炫酷粒子动画代码

代码语言:html

所属分类:粒子

代码描述:three+MediaPipe+webgl实现摄像头识别手势操控三维炫酷粒子动画代码

代码标签: three MediaPipe webgl 摄像头 识别 手势 操控 三维 炫酷 粒子 动画 代码

下面为部分代码预览,完整代码请点击下载或在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>3D GPU Particle Gesture Control System</title>
    <style>
        body {
            margin: 0;
            overflow: hidden;
            background-color: #050508;
            font-family: 'Segoe UI', system-ui, sans-serif;
            color: #fff;
            user-select: none;
        }

        #canvas-container {
            width: 100vw;
            height: 100vh;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 1;
        }

        /* 隐藏但处于工作状态的视频 */
        #webcam-container {
            position: absolute;
            bottom: 25px;
            right: 25px;
            width: 180px;
            height: 135px;
            border-radius: 12px;
            overflow: hidden;
            border: 2px solid rgba(0, 255, 204, 0.3);
            box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
            z-index: 10;
            transform: scaleX(-1);
            background: #000;
        }
        video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* 科幻HUD UI面板 */
        #ui-panel {
            position: absolute;
            top: 25px;
            left: 25px;
            z-index: 10;
            pointer-events: none;
            background: rgba(5, 5, 15, 0.75);
            padding: 25px;
            border-radius: 16px;
            border: 1px solid rgba(0, 255, 204, 0.25);
            backdrop-filter: blur(15px);
            box-shadow: inset 0 0 20px rgba(0, 255, 204, 0.1), 0 10px 30px rgba(0,0,0,0.5);
            width: 280px;
        }
        
        h1 {
            margin: 0 0 5px 0;
            font-size: 1.1rem;
            text-transform: uppercase;
            letter-spacing: 3px;
            color: #00ffcc;
            text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
        }
        .subtitle {
            font-size: 0.7rem;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            margin-bottom: 20px;
        }
        .info-item {
            margin: 12px 0;
            font-size: 0.85rem;
            display: flex;
            justify-content: space-between;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            padding-bottom: 5px;
        }
        .label {
            color: #aaa;
        }
        .status-val {
            font-weight: bol.........完整代码请登录后点击上方下载按钮下载查看

网友评论0