ar-vr-design
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesear-vr-design
ar-vr-design
Purpose
用途
This skill designs interactive AR/VR experiences by integrating 3D modeling, spatial computing, and UI optimization, enabling creation of immersive environments for applications like virtual training or augmented overlays.
本技能通过整合3D建模、空间计算和UI优化来设计交互式AR/VR体验,能够为虚拟培训或增强现实叠加层等应用创建沉浸式环境。
When to Use
适用场景
Use this skill for projects requiring 3D asset manipulation, spatial interactions, or VR-specific UI tweaks, such as developing a virtual museum tour or AR product visualization in e-commerce apps.
当项目需要处理3D资产操作、空间交互或VR专属UI调整时使用本技能,例如开发虚拟博物馆导览或电商应用中的AR产品可视化功能。
Key Capabilities
核心能力
- Import and export 3D models in formats like GLTF or OBJ using built-in parsers.
- Perform spatial computing tasks, such as room-scale mapping with algorithms for occlusion and collision detection.
- Optimize UI for AR/VR devices, including rendering adjustments for headsets like Oculus or HoloLens to reduce latency below 20ms.
- Simulate user interactions in a virtual environment to test gesture controls or haptic feedback.
- 借助内置解析器导入和导出GLTF、OBJ等格式的3D模型。
- 执行空间计算任务,例如利用遮挡和碰撞检测算法实现房间级映射。
- 针对AR/VR设备优化UI,包括为Oculus、HoloLens等头显调整渲染参数,将延迟降至20ms以下。
- 在虚拟环境中模拟用户交互,测试手势控制或触觉反馈效果。
Usage Patterns
使用流程
To accomplish tasks, follow these steps: First, initialize a project with required configs; then, build and manipulate 3D assets; next, apply spatial computing for interactions; finally, optimize and simulate. Always set environment variables for authentication, e.g., export SERVICE_API_KEY=your_key before running commands. For integration, wrap skill outputs in a main application loop.
完成任务请遵循以下步骤:首先,使用所需配置初始化项目;然后,构建并处理3D资产;接着,应用空间计算实现交互功能;最后,进行优化和模拟。运行命令前请务必设置认证环境变量,例如执行。集成时,请将技能输出包裹在主应用循环中。
export SERVICE_API_KEY=your_keyCommon Commands/API
常用命令/API
Use the tool for core operations. Authenticate via $ARVR_API_KEY environment variable.
arvr-cli-
Command:
arvr-cli init --project myvrapp --type vr- Initializes a new VR project; add flag for AR mode.
--ar - Example snippet:
export ARVR_API_KEY=abc123 arvr-cli init --project myvrapp
- Initializes a new VR project; add
-
API Endpoint: POST /api/vr/models
- Uploads a 3D model; requires JSON payload with { "model": "path/to/model.gltf", "scale": 1.5 }.
- Example snippet:
curl -H "Authorization: Bearer $ARVR_API_KEY" -X POST -d '{"model": "asset.gltf"}' https://api.openclaw.com/api/vr/models
-
Command:
arvr-cli optimize --input model.obj --device oculus- Optimizes model for specific devices; outputs optimized file.
- Example snippet:
arvr-cli optimize --input scene.glb --device hololens
-
API Endpoint: GET /api/ar/spatial-map
- Retrieves spatial data; query with parameters like ?roomSize=10x10.
- Example snippet:
curl -H "Authorization: Bearer $ARVR_API_KEY" https://api.openclaw.com/api/ar/spatial-map?roomSize=5x5
Config formats: Use JSON for project configs, e.g., { "assets": ["model1.obj"], "spatialSettings": { "gravity": 9.8 } }.
使用工具执行核心操作。通过环境变量进行认证。
arvr-cli$ARVR_API_KEY-
命令:
arvr-cli init --project myvrapp --type vr- 初始化新的VR项目;添加标志可切换为AR模式。
--ar - 示例代码片段:
export ARVR_API_KEY=abc123 arvr-cli init --project myvrapp
- 初始化新的VR项目;添加
-
API端点:POST /api/vr/models
- 上传3D模型;需携带包含的JSON请求体。
{ "model": "path/to/model.gltf", "scale": 1.5 } - 示例代码片段:
curl -H "Authorization: Bearer $ARVR_API_KEY" -X POST -d '{"model": "asset.gltf"}' https://api.openclaw.com/api/vr/models
- 上传3D模型;需携带包含
-
命令:
arvr-cli optimize --input model.obj --device oculus- 针对特定设备优化模型;输出优化后的文件。
- 示例代码片段:
arvr-cli optimize --input scene.glb --device hololens
-
API端点:GET /api/ar/spatial-map
- 获取空间数据;可携带等查询参数。
?roomSize=10x10 - 示例代码片段:
curl -H "Authorization: Bearer $ARVR_API_KEY" https://api.openclaw.com/api/ar/spatial-map?roomSize=5x5
- 获取空间数据;可携带
配置格式:使用JSON作为项目配置格式,例如。
{ "assets": ["model1.obj"], "spatialSettings": { "gravity": 9.8 } }Integration Notes
集成说明
Integrate this skill into workflows by importing outputs into engines like Unity or Unreal. For example, after running , copy generated files to a Unity project and reference them in scripts. Use $ARVR_API_KEY for API calls in custom code. To chain with other skills, pipe outputs via stdin/stdout, e.g., output from a 3D modeling skill into this one's input. Ensure compatibility by matching formats: always convert models to GLTF before integration.
arvr-cli init可将本技能集成到工作流中,将输出导入Unity或Unreal等引擎。例如,运行后,将生成的文件复制到Unity项目中并在脚本中引用。在自定义代码中使用进行API调用。如需与其他技能联动,可通过标准输入/输出管道传递输出,例如将3D建模技能的输出作为本技能的输入。请确保格式兼容:集成前务必将模型转换为GLTF格式。
arvr-cli init$ARVR_API_KEYError Handling
错误处理
Handle errors by checking exit codes from commands; for API calls, parse HTTP responses. Common issues:
- Authentication failure: If $ARVR_API_KEY is invalid, commands return code 401—fix by verifying and exporting the correct key.
- Invalid model format: Use ; if it fails with code 400, convert the file using a tool like Blender.
arvr-cli validate --file model.obj - Example snippet for error checking:
response=$(curl ...); if [ $? -ne 0 ]; then echo "API error: $response"; fi
Always wrap API calls in try-catch blocks in scripts, e.g., in Python: try: requests.post(url) except Exception as e: log_error(e).
通过检查命令的退出码处理错误;对于API调用,需解析HTTP响应。常见问题:
- 认证失败:若无效,命令将返回401码——请验证并导出正确的密钥来修复。
$ARVR_API_KEY - 无效模型格式:使用验证;若返回400码失败,可使用Blender等工具转换文件格式。
arvr-cli validate --file model.obj - 错误检查示例代码片段:
response=$(curl ...); if [ $? -ne 0 ]; then echo "API error: $response"; fi
请始终在脚本中为API调用添加try-catch块,例如在Python中:。
try: requests.post(url) except Exception as e: log_error(e)Concrete Usage Examples
具体使用示例
-
Design a simple AR overlay for a mobile app: First, run. Then, upload a 3D model with
arvr-cli init --project ar-overlay --type ar. Optimize for mobile:curl -X POST -d '{"model": "overlay.glb"}' https://api.openclaw.com/api/vr/models. Finally, integrate the output into an Android app using Unity's AR Foundation.arvr-cli optimize --input overlay.glb --device android -
Create a VR simulation for training: Initialize with. Add spatial mapping:
arvr-cli init --project vr-training --type vr. Build interactions: Use the API to simulate gestures, then test withcurl https://api.openclaw.com/api/ar/spatial-map?roomSize=10x10. Export and import into Unreal Engine for full deployment.arvr-cli simulate --project vr-training
-
为移动应用设计简单的AR叠加层:首先,运行。然后,使用
arvr-cli init --project ar-overlay --type ar上传3D模型。针对移动设备优化:curl -X POST -d '{"model": "overlay.glb"}' https://api.openclaw.com/api/vr/models。最后,将输出通过Unity的AR Foundation集成到Android应用中。arvr-cli optimize --input overlay.glb --device android -
创建用于培训的VR模拟:运行初始化项目。添加空间映射:
arvr-cli init --project vr-training --type vr。构建交互功能:使用API模拟手势,然后运行curl https://api.openclaw.com/api/ar/spatial-map?roomSize=10x10进行测试。导出并导入到Unreal Engine中完成全流程部署。arvr-cli simulate --project vr-training
Graph Relationships
关联关系
- Related to cluster: ar-vr (e.g., shares tags with skills like ar-vr-development).
- Connected via tags: ["ar-vr"] links to other AR/VR skills; ["design"] connects to ui-design and 3d-modeling skills.
- Dependencies: Requires outputs from 3d-modeling skills as inputs.
- 所属集群:ar-vr(例如与ar-vr-development等技能共享标签)。
- 标签关联:["ar-vr"]链接至其他AR/VR技能;["design"]关联至ui-design和3d-modeling技能。
- 依赖关系:需要3d-modeling技能的输出作为输入。