three+mediapipe隔空手势操控三维地球旋转代码
代码语言:html
所属分类:三维
代码描述:three+mediapipe隔空手势操控三维地球旋转代码
代码标签: three mediapipe 隔空 手势 操控 三维 地球 旋转 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Realistic Gesture Earth</title>
<style>
body { margin: 0; overflow: hidden; background-color: #000; font-family: 'Segoe UI', sans-serif; }
/* 视频隐藏 */
#input-video { display: none; }
/* UI 容器 */
#ui-layer {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
pointer-events: none; z-index: 10;
}
/* 状态指示器 */
#hand-status {
position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
color: rgba(255,255,255,0.7); font-size: 14px; letter-spacing: 2px;
background: rgba(0,0,0,0.5); padding: 5px 15px; border-radius: 20px;
border: 1px solid rgba(255,255,255,0.2);
transition: all 0.3s;
}
#hand-status.active { color: #00f3ff; border-color: #00f3ff; box-shadow: 0 0 10px rgba(0,243,255,0.3); }
/* 手势光标 */
#cursor {
position: absolute; width: 60px; height: 60px;
border: 1px dashed rgba(255,255,255,0.5); border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 0.2s, height 0.2s, border-color 0.2s;
display: none; box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}
/* 准星中心点 */
#cursor::after {
content: ''; position: absolute; top: 50%; left: 50%;
width: 4px; height: 4px; background: #fff;
transform: translate(-50%, -50%); border-radius: 50%;
box-shadow: 0 0 10px #fff;
}
/* 握拳时的光标状态 */
#cursor.fist {
width: 40px; height: 40px;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0