Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

3d-scene

БесплатноБез исполняемых скриптовНе проверен

A small 3D world: several objects in a setting (a diorama, a room, a courtyard, a tabletop, a little landscape), planned first, lit by a real sky, textured…

feimacodeот feimacode★ 1 227 звёзд на GitHub

Об этом скилле

3D Scene

Intent. A small world shown well: several objects that belong together in one setting (a diorama, a corner of a room, a courtyard, a tabletop, a small landscape), lit by a real sky, framed by a camera that knows where to look, and optionally moving through it. The page is one self-contained three.js scene. People use it as a hero visual, a still, or a short flythrough clip.

Use 3d-object instead for a single product or logo on a stage. This isn't a game: no player, physics or input beyond orbiting.

1. Plan before you build

Write the scene spec first, as a block in the page, and build everything from it:

<script type="application/od-scene+json" id="scene-spec">
{
  "explicit": ["stone courtyard", "dusk", "brass lantern", "two potted plants", "10 s flythrough"],
  "inferred": ["8 × 6 m floor", "walls 2.4 m high on three sides", "lantern on a 1.6 m post, left of center"],
  "units": "m",
  "seed": 7,
  "layout": [
    { "name": "floor", "position": [0, 0, 0], "size": [8, 0.1, 6] },
    { "name": "lantern", "position": [-1.2, 1.6, 0.5], "size": [0.12, 0.29, 0.1] }
  ],
  "focal": "lantern",
  "views": {
    "hero": { "position": [5.5, 2.4, 6.5], "target": [-0.6, 1.2, 0.3], "fov": 40 },
    "heroPortrait": { "position": [4.2, 2.0, 5.6], "target": [-0.8, 1.3, 0.4], "fov": 52 }
  },
  "path": [
    { "t": 0, "position": [6.5, 2.8, 7.5], "target": [0, 1, 0] },
    { "t": 10, "position": [2.5, 1.6, 3.5], "target": [-1, 1.2, 0] }
  ],
  "duration": 10,
  "assets": [{ "source": "polyhaven", "id": "Lantern_01", "url": "https://dl.polyhaven.org/…/Lantern_01_1k.gltf", "license": "CC0" }]
}
</script>
  • explicit holds only what the user said. Everything you decided goes in inferred, so the user can see and change your assumptions.
  • Sizes are real meters. Use the asset tool's sizes for models. A model made at real size and shrunk (a 1:87 kart) records "scale": "1:87" on its asset.
  • focal names the layout item (or a group of items) the scene is about. There is one focal point; everything else supports it.
  • Before building anything non-trivial, show the user the layout and views as a short table. For anything that must be spatially exact (a real place, a floor plan, a recreated photo), draw a top-down SVG with meter dimensions and get it confirmed first.
  • The page reads the block (JSON.parse(document.getElementById('scene-spec').textContent)) to place objects and drive the camera, so the spec and the render can't disagree.

2. Blockout, then finished

For a scene with more than about five objects, build a blockout first: boxes and simple forms at the final positions and sizes, with the final camera and light. Set window.odScene.tier = "blockout", check it, and get one critique on layout, scale and framing only. Then build the finished scene (tier: "finished", the default). Never show a blockout to the user as the result.

3. Build the scene

Use exactly these pinned URLs, through an import map:

<script type="importmap">
{ "imports": {
  "three": "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js",
  "three/addons/": "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/"
} }
</script>

Don't write three.js <script src> tags from memory: three.min.js is gone since r160 and examples/js since r148.

  • Canvas and renderer: one full-bleed <canvas id="stage" data-od-webgl>; WebGLRenderer({ canvas, antialias: true, preserveDrawingBuffer: true }), outputColorSpace = SRGBColorSpace, toneMapping = ACESFilmicToneMapping, pixel ratio capped at 2, sized from the canvas's CSS box on load and resize.
  • Assets: call find_feima_design_3d_assets for what procedural code can't make convincingly: a sky, stone, wood, plaster, a lantern, a chair, a plant. It returns free CC0 files from Poly Haven with direct URLs. Use 1k files; 2k only for the hero object. If it can't reach Poly Haven, build procedurally and say so.
    • Sky (HDRI): new RGBELoader().loadAsync(url), then scene.environment = pmrem.fromEquirectangular(tex).texture, and scene.background = tex (with tex.mapping = EquirectangularReflectionMapping) when the sky should show. The lights go with it as in section 4.

    • Textures: load diffuse with colorSpace = SRGBColorSpace; normal, roughness and ARM stay linear. Set wrapS/wrapT to RepeatWrapping and repeat to the surface size in meters divided by about 2 (most Poly Haven textures cover about 2 m). An ARM map is AO in red, roughness in green, metalness in blue: use it as aoMap, roughnessMap and metalnessMap together.

    • Models: a Poly Haven .gltf refers to its .bin and textures by relative paths that don't exist on the CDN. Pass the tool's includes map through a loading manager:

      function polyHavenLoader(includes) {
        const manager = new THREE.LoadingManager();
        manager.setURLModifier((url) => {
          for (const [rel, abs] of Object.entries(includes)
      
Полный SKILL.md на GitHub

Установить 3d-scene в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.od-local-overlay

FAQ

Что делает скилл 3d-scene?

A small 3D world: several objects in a setting (a diorama, a room, a courtyard, a tabletop, a little landscape), planned first, lit by a real sky, textured with free CC0 assets, as stills or a camera flythrough video.

Как установить скилл 3d-scene?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл 3d-scene запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить 3d-scene с