← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

threejs-interaction

Three.js交互 - 射线投射、控制器、鼠标/触摸输入、对象选择。在处理用户输入、实现点击检测、添加摄像机控制或创建交互式3D体验时使用。

person作者: jakexiaohubgithub

Three.js Interaction

Detailed Guide

Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

When to Use

  • You need user interaction inside a Three.js scene.
  • The task involves raycasting, object picking, pointer handling, touch input, or camera controls.
  • You are building an interactive 3D experience rather than a passive render.

Example

Add pointer selection to this canvas using its bounding rectangle, test after resize/scroll and provide keyboard selection. Dispose listeners/controls on unmount and verify picking nested meshes.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.