← 提示词库 Anthropic/claude-design/skills/3d-object/SKILL.md 原文 md
🌐 中英双语对照

name: 3d-object
description: "three.js model, downloadable as OBJ or GLB"
user-invocable: true

3D object / 3D 对象

Model a 3D object the user can inspect from every angle and download,
built with three.js and presented in the three_d_stage starter.

构建一个用户可从任意角度查看并下载的 3D 对象模型,使用 three.js 构建,并以 three_d_stage 起始组件呈现。

START by calling copy_starter_component with kind: "three_d_stage.js" —
it is the whole viewer: studio lighting, ground shadow, orbit controls,
an auto-framed camera, and a toolbar that downloads the object as
OBJ + MTL or GLB. Read the copied file's usage block and follow its page
skeleton exactly. You only write the model-building module script.

首先调用 copy_starter_component,kind 取 "three_d_stage.js"——它就是整个查看器:影棚灯光、地面阴影、轨道控制、自动取景相机,以及一个可将对象下载为 OBJ + MTL 或 GLB 的工具栏。阅读复制出的文件中的用法块,并严格遵循其页面骨架。你只需编写构建模型的模块脚本。

Build the page as plain HTML — a .html file with ordinary

Build the model programmatically, as a THREE.Group composed of named
parts:

以编程方式构建模型,作为一个由命名部件组成的 THREE.Group:

The stage's toolbar gives the user OBJ + MTL (universal, geometry +
per-material colors) and GLB (the modern interchange format — keeps the
part hierarchy and PBR materials; imports cleanly into Blender, Maya,
Cinema 4D, Unity, Unreal). Those two are the export formats on offer —
when the user asks for something else (FBX, USDZ, STEP), say plainly
that the stage exports OBJ + MTL and GLB.

舞台的工具栏为用户提供 OBJ + MTL(通用格式,几何体 + 每材质颜色)和 GLB(现代交换格式——保留部件层级与 PBR 材质;可干净地导入 Blender、Maya、Cinema 4D、Unity、Unreal)。这两者就是可选的导出格式——当用户要求其他格式(FBX、USDZ、STEP)时,直说舞台只能导出 OBJ + MTL 和 GLB。

Iterate with screenshots: the stage keeps its last frame readable, so
the ordinary screenshot tools capture the live canvas — no extra steps.
After editing a module file, reload with show_html before screenshotting
(the iframe caches already-loaded modules). Look at the object from the
default framing and refine silhouette, proportion, and material
separation — the silhouette carries the object.

通过截图迭代:舞台会保持最后一帧可读,因此普通截图工具即可捕捉活动画布——无需额外步骤。编辑模块文件后,先用 show_html 重新加载再截图(iframe 会缓存已加载的模块)。从默认取景观察对象,打磨轮廓、比例和材质区分——轮廓决定对象的观感。
【评论】该技能对 three.js 的版本、URL 与 SRI 完整性哈希做了锁定,是防止依赖被篡改的供应链安全措施;封闭的 import map 则进一步保证不会意外加载未校验的脚本。