From 84c63be1565321358b1342f3c791ca38dc29e721 Mon Sep 17 00:00:00 2001 From: Zheng ze Ou Date: Mon, 16 Mar 2026 18:10:55 +0800 Subject: [PATCH] Add files via upload --- public/admin.html | 256 +++++++++++ public/geometric-animation-preset.html | 288 ++++++++++++ public/geometric-preset-api.html | 417 +++++++++++++++++ public/geometric-preset-simple.html | 319 +++++++++++++ public/geometric-preset.json | 8 + public/test-geometric.html | 335 ++++++++++++++ public/test-simple.html | 453 +++++++++++++++++++ public/verify-preset.html | 598 +++++++++++++++++++++++++ public/widget.html | 217 +++++++++ 9 files changed, 2891 insertions(+) create mode 100644 public/admin.html create mode 100644 public/geometric-animation-preset.html create mode 100644 public/geometric-preset-api.html create mode 100644 public/geometric-preset-simple.html create mode 100644 public/geometric-preset.json create mode 100644 public/test-geometric.html create mode 100644 public/test-simple.html create mode 100644 public/verify-preset.html create mode 100644 public/widget.html diff --git a/public/admin.html b/public/admin.html new file mode 100644 index 0000000..5627b46 --- /dev/null +++ b/public/admin.html @@ -0,0 +1,256 @@ + + + + + OBS 下三分之一条 管理 + + + +

OBS 节目信息下三分之一条 - 预设管理

+

1. 在 OBS 中添加 Browser Source,URL 指向 http://本机或服务器/widget.html
+ 2. 在下方新增 / 编辑预设,点击“激活”即可在 OBS 中显示该条;点击“清空当前显示”则隐藏。

+ +
+

创建 / 编辑外观预设

+ + + + + + + + + +
+ +
+

预设列表

+
+
+ +
+ +
+ + + + diff --git a/public/geometric-animation-preset.html b/public/geometric-animation-preset.html new file mode 100644 index 0000000..4ea642e --- /dev/null +++ b/public/geometric-animation-preset.html @@ -0,0 +1,288 @@ + + + + + + + +
+ +
+
+
+
+
+
+
+ + +
+
+
+ + +
+
GEOMETRIC ANIMATION PRESET
+
集合图形动画演示
+
这是一个包含多种几何图形组合的动画预设,包含圆形、方形、三角形等元素的动态效果。
+ +
+
+
动画类型
+
几何图形浮动
+
+
+
包含图形
+
5种几何形状
+
+
+
颜色主题
+
渐变彩虹色
+
+
+
动画时长
+
8秒循环
+
+
+
+
+ + + + \ No newline at end of file diff --git a/public/geometric-preset-api.html b/public/geometric-preset-api.html new file mode 100644 index 0000000..7591c74 --- /dev/null +++ b/public/geometric-preset-api.html @@ -0,0 +1,417 @@ + + + + + + + +
+ +
+ + +
+ + +
+
+
+ ◈ +
+
+
几何集合动画
+
ANIMATED GEOMETRY PRESET
+
+
+ +
+ 专为OBS设计的动态几何图形动画预设,包含多种形状的3D浮动效果和交互式元素,适合科技展示、创意直播等场景。 +
+ +
+
+
●
+
动态图形
+
12种几何形状随机生成,实时动画效果
+
+
+
■
+
渐变色彩
+
彩虹渐变配色方案,支持自定义调整
+
+
+
▲
+
3D透视
+
CSS 3D变换效果,增强视觉层次感
+
+
+
◆
+
响应交互
+
鼠标悬停效果,增强用户参与感
+
+
+ +
+
+
+
动画运行中
+
+
15:30
+
+
+
+ + + + \ No newline at end of file diff --git a/public/geometric-preset-simple.html b/public/geometric-preset-simple.html new file mode 100644 index 0000000..77fb314 --- /dev/null +++ b/public/geometric-preset-simple.html @@ -0,0 +1,319 @@ + + + + + + + +
+ +
+ +
+ + +
+
+
◈
+
+
GEOMETRIC ANIMATION
+
集合图形预设
+
+
+ +
+ 这是一个动态几何图形动画预设,包含多种形状的浮动效果,适合科技、设计、创意类内容的直播展示。 +
+ +
+
+
12
+
图形数量
+
+
+
4
+
形状类型
+
+
+
6s
+
动画周期
+
+
+ + +
+
+ + + + \ No newline at end of file diff --git a/public/geometric-preset.json b/public/geometric-preset.json new file mode 100644 index 0000000..e35a20c --- /dev/null +++ b/public/geometric-preset.json @@ -0,0 +1,8 @@ +{ + "name": "几何集合动画预设", + "description": "动态几何图形动画,包含多种形状的浮动效果", + "kind": "iframe", + "align": "right", + "html": "
◈
几何动画预设
GEOMETRIC PRESET
动态几何图形动画效果,适合科技展示和创意直播场景。
动态图形
多种几何形状浮动动画
渐变色彩
彩虹渐变配色方案
3D效果
CSS 3D变换动画
实时交互
鼠标悬停响应效果
动画运行中
15:30
", + "extraCss": ".lt-root { justify-content: flex-end !important; padding: 5vh 6vw !important; } .lt-container { min-width: 380px !important; max-width: 450px !important; }" +} \ No newline at end of file diff --git a/public/test-geometric.html b/public/test-geometric.html new file mode 100644 index 0000000..954d70a --- /dev/null +++ b/public/test-geometric.html @@ -0,0 +1,335 @@ + + + + + 几何动画预设测试 + + + +
+

几何动画预设测试

+ +
+
+

预设预览

+
+ +
+
+ +
+

控制面板

+ +
+ + +
+ +
+ + +
+ + + + +
+

使用说明

+

1. 选择预设类型

+

2. 调整对齐方式

+

3. 点击"加载预设"按钮

+

4. 预设将显示在左侧预览区域

+
+
+
+ +

可用预设列表

+
+ +
+
+ + + + \ No newline at end of file diff --git a/public/test-simple.html b/public/test-simple.html new file mode 100644 index 0000000..aa331d2 --- /dev/null +++ b/public/test-simple.html @@ -0,0 +1,453 @@ + + + + + 几何动画预设 - 简单测试 + + + +
+ +
+ +
+ + + +
+ +
就绪
+ + + +`; + + function loadGeometricPreset() { + const container = document.getElementById('widgetContainer'); + container.innerHTML = ''; + + const iframe = document.createElement('iframe'); + iframe.style.width = '100%'; + iframe.style.height = '100%'; + iframe.style.border = 'none'; + iframe.sandbox = 'allow-scripts allow-same-origin'; + + container.appendChild(iframe); + currentIframe = iframe; + + const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; + iframeDoc.open(); + iframeDoc.write(geometricPresetHTML); + iframeDoc.close(); + + document.getElementById('status').textContent = '几何动画预设已加载'; + document.getElementById('status').style.color = '#00ff88'; + } + + function reloadPreset() { + if (currentIframe) { + const iframeDoc = currentIframe.contentDocument || currentIframe.contentWindow.document; + iframeDoc.open(); + iframeDoc.write(geometricPresetHTML); + iframeDoc.close(); + + document.getElementById('status').textContent = '预设已重新加载'; + document.getElementById('status').style.color = '#00bfff'; + } + } + + function toggleAnimation() { + if (!currentIframe) return; + + const iframeDoc = currentIframe.contentDocument || currentIframe.contentWindow.document; + const shapes = iframeDoc.querySelectorAll('.geo-shape'); + + animationPaused = !animationPaused; + + shapes.forEach(shape => { + if (animationPaused) { + shape.style.animationPlayState = 'paused'; + } else { + shape.style.animationPlayState = 'running'; + } + }); + + const statusText = animationPaused ? '动画已暂停' : '动画已继续'; + document.getElementById('status').textContent = statusText; + document.getElementById('status').style.color = animationPaused ? '#ff69b4' : '#00ff88'; + } + + // 页面加载时自动加载预设 + window.onload = function() { + setTimeout(loadGeometricPreset, 500); + }; + + + \ No newline at end of file diff --git a/public/verify-preset.html b/public/verify-preset.html new file mode 100644 index 0000000..f537567 --- /dev/null +++ b/public/verify-preset.html @@ -0,0 +1,598 @@ + + + + + 验证几何动画预设集成 + + + +
+

几何动画预设集成验证

+ +
+ 正在检查服务器状态... +
+ +
+ 正在检查预设集成... +
+ +
+ + + +
+ +
+ +
+ + +
+ + + +`; + + // 检查服务器状态 + async function checkServer() { + const statusDiv = document.getElementById('serverStatus'); + statusDiv.className = 'status info'; + statusDiv.textContent = '正在检查服务器状态...'; + + try { + const response = await fetch('/health'); + if (response.ok) { + statusDiv.className = 'status success'; + statusDiv.textContent = '✅ 服务器运行正常'; + + // 检查预设 + checkPresetIntegration(); + } else { + statusDiv.className = 'status error'; + statusDiv.textContent = '❌ 服务器响应异常'; + } + } catch (error) { + statusDiv.className = 'status error'; + statusDiv.textContent = '❌ 无法连接到服务器'; + console.error('服务器检查失败:', error); + } + } + + // 检查预设集成 + async function checkPresetIntegration() { + const statusDiv = document.getElementById('presetStatus'); + statusDiv.className = 'status info'; + statusDiv.textContent = '正在检查预设集成...'; + + try { + const response = await fetch('/api/presets'); + if (response.ok) { + const presets = await response.json(); + const geometricPreset = presets.find(p => p.name === '几何动画预设'); + + if (geometricPreset) { + statusDiv.className = 'status success'; + statusDiv.textContent = `✅ 几何动画预设已成功集成 (第${presets.indexOf(geometricPreset) + 1}个预设)`; + } else { + statusDiv.className = 'status error'; + statusDiv.textContent = '❌ 未找到几何动画预设'; + } + } else { + statusDiv.className = 'status error'; + statusDiv.textContent = '❌ 无法获取预设列表'; + } + } catch (error) { + statusDiv.className = 'status error'; + statusDiv.textContent = '❌ 检查预设集成失败'; + console.error('预设检查失败:', error); + } + } + + // 加载预设到预览框 + function loadPreset() { + const previewFrame = document.getElementById('previewFrame'); + previewFrame.innerHTML = ''; + + const iframe = document.createElement('iframe'); + iframe.style.width = '100%'; + iframe.style.height = '100%'; + iframe.style.border = 'none'; + iframe.sandbox = 'allow-scripts allow-same-origin'; + + previewFrame.appendChild(iframe); + + const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; + iframeDoc.open(); + iframeDoc.write(geometricPresetHTML); + iframeDoc.close(); + + // 更新状态 + const statusDiv = document.getElementById('presetStatus'); + statusDiv.className = 'status success'; + statusDiv.textContent = '✅ 几何动画预设已加载到预览框'; + } + + // 显示预设信息 + function showPresetInfo() { + const presetInfo = document.getElementById('presetInfo'); + const presetDetails = document.getElementById('presetDetails'); + + const presetData = { + name: '几何动画预设', + description: '动态几何图形动画,包含多种形状的浮动效果', + kind: 'geometric', + align: 'right', + features: [ + '动态几何图形动画', + '多种形状浮动效果', + '渐变色彩方案', + '3D变换动画', + '实时交互效果', + '响应式设计' + ], + shapes: ['圆形', '方形', '三角形'], + colors: ['粉色渐变', '蓝色渐变', '绿色渐变', '黄色渐变', '紫色渐变'], + animations: ['浮动动画', '旋转动画', '脉冲效果', '3D变换'] + }; + + // 生成详情HTML + let detailsHTML = ''; + + detailsHTML += ` +
+
预设名称
+
${presetData.name}
+
+
+
预设类型
+
${presetData.kind}
+
+
+
对齐方式
+
${presetData.align}
+
+
+
几何形状
+
${presetData.shapes.join(', ')}
+
+
+
颜色方案
+
${presetData.colors.join(', ')}
+
+
+
动画效果
+
${presetData.animations.join(', ')}
+
+ `; + + presetDetails.innerHTML = detailsHTML; + presetInfo.style.display = 'block'; + + // 滚动到详情区域 + presetInfo.scrollIntoView({ behavior: 'smooth' }); + } + + // 页面加载时自动检查 + window.onload = function() { + checkServer(); + }; + + + \ No newline at end of file diff --git a/public/widget.html b/public/widget.html new file mode 100644 index 0000000..50b537f --- /dev/null +++ b/public/widget.html @@ -0,0 +1,217 @@ + + + + + OBS Lower Third Widget + + + +
+
+
+
+
+
+
+
+ + + +