技能 threejs-interaction
📦

threejs-interaction

内容修订 r1 安全 ⚙️ 外部命令

Build Interactive Three.js Scenes

Object picking and camera controls can conflict when they share the same canvas. Use Three.js examples to map pointer input, select objects, and coordinate camera movement with editing tools.

支持: Claude Codex Code(CC)
你是维护者?认领此 Skill 📊 72 合格

使用我的智能体安装

将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。

智能体请求
Review the Skillstore skill "threejs-interaction" from https://skillstore.io/skills/cloudai-x-threejs-interaction.md and its manifest at https://skillstore.io/api/skills/cloudai-x-threejs-interaction/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.

你的智能体仍应展示其计划,并按安全策略请求必要确认。

测试它

正在使用“threejs-interaction”。 Clicks select the wrong mesh when the canvas is below a toolbar.

预期结果:

Use the canvas bounds to normalize the pointer position. Raycast only against selectable meshes, then highlight the nearest hit or clear the selection when nothing is hit.

正在使用“threejs-interaction”。 The camera rotates when I drag the scale gizmo.

预期结果:

Disable orbit input when the gizmo starts dragging and restore it when the drag ends. Add the gizmo helper, not the controls object, to the scene.

正在使用“threejs-interaction”。 My selection rectangle does not select a mesh that touches its edge.

预期结果:

SelectionBox checks the center of the mesh's bounding sphere. An overlapping edge does not qualify when the center is outside the selection volume.

安全审计

安全
v1 • 2026/11/21 打开版本化报告

All 65 static alerts are false positives. The 61 shell alerts match Markdown formatting, and the four key-file alerts match browser keyboard shortcuts. The review found no evidence of prompt injection or unauthorized data access.

1
已扫描文件
501
分析行数
0
复核项
0
已忽略误报
最新一次完成的静态与语义审计未检测到已确认的安全发现。这并不能证明该 Skill 没有副作用。
审计者: codex
分享与引用此报告

分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。

打开版本化报告
安全评估

复制报告链接

https://skillstore.io/skills/cloudai-x-threejs-interaction/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown 徽章

[![Skillstore security assessment](https://skillstore.io/badges/skills/cloudai-x-threejs-interaction/security.svg)](https://skillstore.io/skills/cloudai-x-threejs-interaction?utm_source=security_passport_badge)

HTML 徽章

<a href="https://skillstore.io/skills/cloudai-x-threejs-interaction?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/cloudai-x-threejs-interaction/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

嵌入卡片

<iframe src="https://skillstore.io/embed/skills/cloudai-x-threejs-interaction.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
学术引用 (APA · BibTeX · CFF)

APA 引用

cloudai-x. (2026). threejs-interaction security audit report (audit version 1) [Author version unspecified]. Skillstore. https://skillstore.io/skills/cloudai-x-threejs-interaction/audits/1

BibTeX 引用

@techreport{cloudai-x-cloudai-x-threejs-interaction-2026, author = {cloudai-x}, title = {threejs-interaction security audit report (audit version 1)}, institution = {Skillstore}, year = {2026}, number = {1}, url = {https://skillstore.io/skills/cloudai-x-threejs-interaction/audits/1}, note = {Author version unspecified} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "threejs-interaction security audit report (audit version 1)" version: "unspecified" type: report authors: - name: "cloudai-x" date-released: "2026-11-21" url: "https://skillstore.io/skills/cloudai-x-threejs-interaction/audits/1" identifiers: - type: other value: "skillstore:cloudai-x-threejs-interaction:audit:1" description: "Skillstore immutable audit report identifier"

Skillstore 评分

评分依据 证据置信度: 中
55
架构
65
可维护性
87
内容
65
社区
61
规范符合性

你能构建什么

Make a product viewer interactive

Let visitors orbit a product and highlight the nearest selectable part when they click or tap.

Add first-person navigation

Use pointer lock and frame-time updates to move a first-person camera through a browser scene.

Build a scene editing tool

Add rectangle selection and a transform gizmo with snapping. Pause orbiting while users drag the gizmo.

试试这些提示

Pick a Mesh
Add pointer selection to my Three.js r186 canvas. Use canvas-relative coordinates and highlight the nearest selectable mesh.
Configure Orbit Navigation
Add OrbitControls to my product viewer with damping and zoom limits. Show the frame update and explain how to dispose of the controls.
Coordinate the Transform Gizmo and Camera
Attach a transform gizmo to the selected mesh and configure snapping for translation, rotation, and scale. Pause orbiting during gizmo drags and restore it when the drag ends.
Adapt Picking to WebGPU
Adapt my Three.js picking and orbit controls to WebGPURenderer. Use proxy geometry on a dedicated picking layer. Explain where the proxy may differ from the visible mesh.

最佳实践

  • Measure pointer coordinates against the canvas bounds and raycast only against objects users can select.
  • Update time-dependent controls each frame with elapsed seconds from Three.js Timer.
  • Keep references to event handlers so you can remove them, and dispose of controls and timers during teardown.

避免

  • Normalize pointer coordinates against the full window when the canvas is embedded or offset.
  • Let OrbitControls and the transform gizmo respond to the same drag.
  • Assume CPU raycasting detects a surface displaced by a shader.

常见问题

Which Three.js release do the examples target?
They target Three.js r186. Check your installed release before reusing the imports and control methods.
Do camera controls work with both WebGL and WebGPU?
Yes. The controls and Raycaster are independent of the renderer, but WebGPURenderer has a separate initialization step.
Can I use the same picking handler for mouse and touch?
Yes. DOM pointer events can handle mouse, touch, and pen input with the same listener.
Can I pick invisible objects?
Yes. Raycaster tests layers rather than visibility, so an invisible proxy can represent a complex object.
When should I use DragControls instead of TransformControls?
Use DragControls for direct dragging. Use TransformControls when users need visible handles, axis-based edits, or snapping.
Does pointer lock require a user gesture?
Yes. Request pointer lock after a deliberate user action such as clicking an entry button.

开发者详情

作者

cloudai-x

许可证

未知

Skillstore 修订

r1

版本提示

作者未声明版本。

引用

5a685fd3b2304f9e4cbf5164d3ac3186cd35324e

维护新鲜度

2026/11/25

使用量

0 次下载 · 0 次浏览

文件结构

📄 SKILL.md

cloudai-x 的更多技能

查看全部
查看全部