Community编程与开发github.com

cloudai-x/threejs-interaction

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

threejs-interaction 是什么?

cloudai-x/threejs-interaction 是一个专为 Three.js 应用设计的交互能力集,专注于处理用户输入,包括鼠标点击、触摸事件、对象选择(通过 Raycaster 射线检测)以及相机控制。它帮助开发者快速集成常见的3D交互模式,如拖拽旋转、缩放、平移视角,以及精确拾取场景中的物体。该技能适用于各类 Three.js 项目,如产品展示、数据可视化、游戏或教育工具。其核心原理是通过封装 Three.js 的 Raycaster、OrbitControls 等模块,提供简洁的 API 和事件系统,降低交互逻辑的重复开发成本。支持桌面端和移动端触摸输入,并兼容主流 Three.js 版本。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cloudai-x/threejs-skills/tree/main/skills/threejs-interaction

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

threejs-interaction 是做什么的?

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

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

cloudai-x/threejs-animation

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

cloudai-x/threejs-fundamentals

Three.js scene setup, cameras, renderer, Object3D hierarchy, coordinate systems. Use when setting up 3D scenes, creating cameras, configuring renderers, managing object hierarchies, or working with transforms.

cloudai-x/threejs-geometry

Three.js geometry creation - built-in shapes, BufferGeometry, custom geometry, instancing. Use when creating 3D shapes, working with vertices, building custom meshes, or optimizing with instanced rendering.

cloudai-x/threejs-lighting

Three.js lighting - light types, shadows, environment lighting. Use when adding lights, configuring shadows, setting up IBL, or optimizing lighting performance.

cloudai-x/threejs-loaders

Three.js asset loading - GLTF, textures, images, models, async patterns. Use when loading 3D models, textures, HDR environments, or managing loading progress.

cloudai-x/threejs-materials

Three.js materials - PBR, basic, phong, shader materials, material properties. Use when styling meshes, working with textures, creating custom shaders, or optimizing material performance.

cloudai-x/threejs-postprocessing

Three.js post-processing - EffectComposer, bloom, DOF, screen effects. Use when adding visual effects, color grading, blur, glow, or creating custom screen-space shaders.

cloudai-x/threejs-shaders

Three.js shaders - GLSL, ShaderMaterial, uniforms, custom effects. Use when creating custom visual effects, modifying vertices, writing fragment shaders, or extending built-in materials.

cloudai-x/threejs-textures

Three.js textures - texture types, UV mapping, environment maps, texture settings. Use when working with images, UV coordinates, cubemaps, HDR environments, or texture optimization.

相关技能