spatial-computing-ui
它能做什么
这项技能帮你设计仿佛悬浮在空间中的用户界面,看起来像由玻璃和光线构成。它就像是会对你的视线做出反应的三维窗口。
适用场景
- ✓当你希望屏幕元素看起来悬浮在空中时。
- ✓当你想做出让人联想到 Apple Vision Pro 的效果时。
- ✓想做出你看向它时会有反应的按钮时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/spatial-computing-ui/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“做一个界面,有悬浮的窗口,视线看向按钮时按钮会发光。”
每周 5 个新技能,1 分钟读完。
工作原理
它运用设计技巧模拟三维深度,以及毛玻璃等材质。元素会根据用户的视线做出反应,改变颜色或大小。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Spatial Computing UI
"A step beyond Spatial Design. Fully 3D windows floating in augmented reality."
When to Use
Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the design-it skill and is not meant to be triggered directly.
Core Principles
- Z-Space Hierarchy: Not just drop shadows, but actual 3D distance. Modals float 10px in front of the main window.
- Gaze-Based Interaction Cues: Elements highlight vividly when hovered, anticipating eye-tracking or precise pointer control.
- Glass and Light: Windows are thick sheets of frosted glass that bend light and cast soft shadows onto the physical environment.
Visual DNA
- Colors: Relies entirely on the background environment. Uses purely translucent whites (
rgba(255,255,255,0.x)) and blacks. - Typography:
SF Pro. Heavy use of varied font weights (Regular, Semibold, Bold) to create hierarchy. - Shapes: High border radii (
24px-32px). Everything is a rounded rectangle or a perfect circle.
Web Implementation
- Best emulated using CSS 3D transforms to simulate the user's perspective.
- CSS Example:
body {
/* Simulate the physical room */
background: url('living-room.jpg') center/cover;
perspective: 1200px;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.spatial-window {
width: 800px;
height: 600px;
border-radius: 32px;
/* The Glass Material */
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(50px) saturate(200%);
-webkit-backdrop-filter: blur(50px) saturate(200%);
/* Specular Highlights */
border: 1px solid rgba(255, 255, 255, 0.4);
box-shadow:
inset 0 1px 2px rgba(255, 255, 255, 0.8),
0 30px 60px rgba(0, 0, 0, 0.3);
/* 3D Positioning */
transform: translateZ(-100px);
transform-style: preserve-3d;
}
.spatial-modal {
/* Floating in front of the main window */
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%, -50%) translateZ(50px);
background: rgba(255, 255, 255, 0.6); /* More opaque */
backdrop-filter: blur(30px);
border-radius: 24px;
padding: 30px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.spatial-btn {
/* Gaze/Hover interaction */
background: rgba(0,0,0,0.05);
transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.spatial-btn:hover {
background: rgba(255,255,255,0.4);
transform: translateZ(10px) scale(1.05);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
App Implementation
SwiftUI (visionOS Native / iOS emulation)
struct SpatialComputingView: View {
var body: some View {
ZStack {
// Simulated room environment
Image("living-room")
.resizable()
.aspectRatio(contentMode: .fill)
.ignoresSafeArea()
// Spatial Window
VStack(spacing: 24) {
Text("Spatial Window")
.font(.title).fontWeight(.bold)
.foregroundColor(.white)
// Gaze-reactive button
Button(action: {}) {
Text("Focus Me")
.fontWeight(.semibold)
.foregroundColor(.white)
.padding(.horizontal, 32)
.padding(.vertical, 16)
// .hoverEffect() is magic on visionOS/iPadOS
// .hoverEffect(.highlight)
}
.background(Color.black.opacity(0.2))
.clipShape(Capsule())
}
.padding(60)
// The magic glass material
.background(.ultraThinMaterial)
.cornerRadius(32)
// Specular edge highlight
.overlay(
RoundedRectangle(cornerRadius: 32)
.stroke(Color.white.opacity(0.4), lineWidth: 1)
)
// Environmental shadow
.shadow(color: .black.opacity(0.3), radius: 40, y: 30)
// Z-Space Modal simulation (if on iOS)
// On visionOS, this would be a separate window volume
Text("Floating Modal")
.foregroundColor(.white)
.padding(30)
.background(.thinMaterial)
.cornerRadius(24)
.shadow(color: .black.opacity(0.4), radius: 30, y: 20)
…
常见问题
什么是 Z 空间层级(Z-Space Hierarchy)?
意思是元素具有真实的纵深感。比较小的窗口可能会比主窗口更靠近你,悬浮在前面。
元素如何响应视线?
当用户直接注视某个元素时,它会变得更亮或略微变化,就像在提前回应一次触摸。
为什么要用玻璃和光线的质感?
为了让人感觉这些元素是悬浮在环境中的真实物体,并带有反光和阴影。
详情
作者的原始描述
Web and App implementation guide for Spatial Computing UI. Trigger when user wants floating elements, environmental awareness, and Apple Vision Pro style.
热度
- GitHub 星标
- 48k
- 排名
- #4416
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。