在 WebXR 场景中模拟抓取物体,便于交互测试与搬运操作验证。
该技能材料显示其为开源的提示型 WebXR 操作流程,本身未要求密钥或远程连接,整体风险较低。需留意其会驱动 XR 场景交互并可能截图验证,但未见超出声明用途的明显红旗。
材料明确标注无需密钥或环境变量,未见令牌申请、凭证存储或凭证外发描述,凭证滥用面较小。
系统检查项与材料均未声明任何远程端点;描述的操作限于本地 XR 会话、场景查询和截图验证,未见将用户数据发送到外部服务的证据。
该技能会调用 XR/场景相关工具执行交互操作,如进入 XR、移动控制器、设置手柄按键状态和截图;这属于技能的常规执行能力,未见额外本机任意代码执行或越权系统权限申请。
其可读取场景层级、对象变换和头显/控制器状态,并可能通过截图获取当前画面;访问范围与“抓取/移动 XR 物体”用途一致,未见文件系统或无关敏感数据访问描述。
来源指向 GitHub 上的 facebook/immersive-web-sdk,且系统标记为 open-source、prompt-only,可审计性较好。虽 star 为 0、许可证未声明且维护状态未知,可信度与活跃度证据有限,但未见闭源、失真分发或明显供应链红旗。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "iwsdk-grab" 技能: 1. 下载 https://raw.githubusercontent.com/facebook/immersive-web-sdk/main/packages/starter-assets/claude-injections/skills/iwsdk-grab/SKILL.md 2. 保存为 ~/.claude/skills/iwsdk-grab/SKILL.md 3. 装好后重载技能,告诉我可以用了
在当前 WebXR 场景中,用模拟控制器靠近带有 OneHandGrabbable 组件的立方体,并使用 grip/squeeze 执行抓取,然后将它移动到桌面中央。
物体被成功抓起并移动,验证单手抓取与位置更新是否正常。
在 WebXR 场景中找到带有 TwoHandsGrabbable 组件的长杆,使用两个模拟控制器同时靠近并按下 grip/squeeze,测试是否可以双手抓住并旋转它。
长杆能被双手稳定抓取并旋转,用于验证双手交互逻辑是否正确。
在场景中尝试对可抓取物体分别使用 trigger 和 grip/squeeze 输入,确认只有靠近物体并按下 grip/squeeze 时才会触发抓取。
得到清晰的测试结果,确认该抓取机制基于接近检测与 grip/squeeze,而不是 trigger。
Grab an object in the XR scene using the IWER emulated controllers. The workflow has a required core (steps 1-5) that must always execute, and optional extensions (steps 6-9) that depend on the user's intent.
User request is in $ARGUMENTS.
These steps always execute in order. A grab cannot succeed without them.
Check session status. If not in an active XR session, accept and enter.
xr_get_session_status → if not sessionActive → xr_accept_session
Find the object by name in the scene hierarchy. Use scene_get_hierarchy and match against the name from $ARGUMENTS.
scene_get_hierarchy → find node matching the target name
If the object is not found, report the available named objects and stop.
Get the object's world position using its UUID from step 2.
scene_get_object_transform(uuid) → use positionRelativeToXROrigin
Animate the controller to the object's position. Default to "controller-right" unless the user specified left.
xr_animate_to({
device: "controller-right",
position: { x, y, z },
duration: 0.5,
})
OneHandGrabbable and TwoHandsGrabbable are proximity-based and use the squeeze/grip button (index 1), not the trigger.
xr_set_gamepad_state({
device: "controller-right",
buttons: [{ index: 1, value: 1 }],
})
The object is now grabbed. If the user only asked to grab (not move), stop here.
Apply these based on the user's request.
If the user specified a destination position, animate the controller there. If no position was given but the user asked to "move" the object, animate it to in front of the headset.
To find "in front of headset": xr_get_transform({ "device": "headset" }) → place at (head.x, head.y - 0.2, head.z - 0.5) adjusted for head orientation.
xr_animate_to({
device: "controller-right",
position: { x, y, z },
duration: 0.5,
})
Release the squeeze button to drop the object.
xr_set_gamepad_state({
device: "controller-right",
buttons: [{ index: 1, value: 0 }],
})
Animate the controller back to its resting position so it's not overlapping the dropped object.
xr_animate_to({
device: "controller-right",
position: { x: 0.2, y: 1.4, z: -0.3 },
duration: 0.5,
})
Default resting positions: right (0.2, 1.4, -0.3), left (-0.2, 1.4, -0.3).
Take a screenshot to confirm the result.
browser_screenshot
xr_set_device_state to move controllers — it teleports instead of animating, which can break grab state.xr_select or trigger (button index 0) for grabs — OneHandGrabbable/TwoHandsGrabbable respond to squeeze (button index 1).mesh.name = "MyObject" in code before createTransformEntity.帮助开发者高效开发、调试并优化 IWSDK 的 PanelUI 界面面板。
使用 iwsdk CLI 测试抓取系统的多种交互抓取模式
在 XR 场景中定位并点击目标对象,用于验证按钮与交互元素是否正常工作
帮助规划 IWSDK 新功能、系统架构与代码模式,并提供最佳实践建议。
帮助开发者用 iwsdk CLI 测试 XR 交互与面板音频行为是否正常。
用于测试 XR 会话生命周期与模式切换,排查进入退出及状态异常问题。
指导在 IWSDK 项目中实现物理模拟、交互物体与碰撞调试。
用于逐帧调试 WebXR 场景中的物理、动画与实时交互行为。
使用 iwsdk CLI 对比示例场景,测试滑动、瞬转、传送与跳跃移动系统。
使用 iwsdk CLI 测试 Havok 物理系统的重力与刚体行为表现
指导你在 IWSDK 项目中实现深度感知遮挡并排查显示异常问题
将任意网址快速截成可分享图片,支持整页抓取并绕过常见拦截