Command Palette

Search for a command to run...

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

image-sphere

БесплатноЗапускает вложенные скриптыНе проверен

Builds a three.js image sphere in which photos sit as camera-facing planes scattered over an invisible sphere that drifts on its own, spins with flick…

arla6kaот arla6ka★ 650 звёзд на GitHub

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

Image sphere

A cloud of photos on an invisible sphere that drifts, spins on a drag and opens one on a click. See it live at https://design.how/vault/image-sphere.

What to build

Seventeen photos float in a loose ball in the middle of the card, fjords, waterfalls, mountains, a deer, a walrus, strawberries, a bird in flight. Each one is a flat picture that always turns to face the viewer, so the sphere is never drawn; it shows up only as the arrangement, with the near photos bigger and in front and the far ones small behind them. The whole cloud turns slowly on two axes at once, so it never settles into one plain spin.

Each photo is a three.js plane, 50 units tall and as wide as its aspect, placed at a seeded random point on a sphere of radius 180 with the radius jittered by up to 40 either way. Every frame the planes get the inverse of the group's rotation, which keeps them square to the camera, and a scale of 0.8 plus their world depth over 2000, eased, so depth reads as size. Transparent planes do not write depth, so overlaps blend cleanly.

A drag adds to a target rotation that the sphere eases toward at 0.2 a frame; on release the last step becomes a spin that decays by 0.94 a frame and hands back to the drift. A press that moves less than 6 pixels is a click. It ray-casts the front-most photo and eases it to a point 300 units in front of the camera, scaled to fill 62% of the view height there, while every other photo fades to 16% opacity. Hovering a photo grows it to 120%.

Workflow

  1. Copy assets/template/ into the project, for example to components/image-sphere/. It is React and TypeScript: images.ts, engine.ts, card.tsx, plus runtime/, the small helpers they import.
  2. Read the FIXED steps below before touching the code. They are what makes the effect; keep them.
  3. Change only the VARIABLE values in the params file, or pass them as props where the card takes them.
  4. Mount the card in a box with a fixed aspect ratio of 1344 / 620, so the page never shifts when it paints.
  5. Copy assets/media/ to the app's static folder as public/image-sphere/. Every file there is a placeholder, a neutral gradient or a short abstract clip; assets/media/README.md lists what each one stands for. Replace them with the project's own images or clips at the same paths. The template loads nothing from any other host.
  6. Read references/perf.md before changing the engine or mounting several visuals on one page.
  7. Run node scripts/check.mjs components/image-sphere on the copied folder, fix every line it prints, and rerun until it prints ok.

FIXED

  • Make one plane per photo with a basic material, depthWrite off, and place it at a seeded random point on a sphere with a jittered radius.
  • Each frame, add a small constant drift to the group rotation plus the eased drag rotation, and copy the inverse group quaternion onto every plane so it faces the camera.
  • Scale each plane by 0.8 + worldZ / 2000, times the hover scale when the ray cast hits it, eased toward that target.
  • Turn the last drag step into a velocity on release and decay it each frame, so a flick keeps spinning.
  • On a click, ease the hit plane from its home spot to a fixed point in front of the camera, converted into group space, and dim the others.
  • Stop on webglcontextlost, and on destroy dispose every geometry, texture and material, then renderer.dispose() and renderer.forceContextLoss().
  • Under reduced motion, snap every plane to its billboard and depth scale and draw once; clicking does nothing.

VARIABLE

Name Default What it changes
SPHERE_PATHS seventeen photos The images. Any count works.
RADIUS 180 The sphere the photos sit on.
PLANE_SIZE 50 The height of a photo plane before depth scaling.
AUTO_ROT_Y 0.0005 The ambient drift per frame around the vertical axis.
HOVER_SCALE 1.2 How much the photo under the pointer grows.
INERTIA_DECAY 0.94 How fast a flick spin dies away.
FOCUS_FILL 0.62 How much of the view height a clicked photo fills.
Полный SKILL.md на GitHub

Установить image-sphere в Claude Code и Claude Desktop

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

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

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

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

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

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

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

assets/media/README.mdassets/media/vault/grid/grid-1.webpassets/media/vault/grid/grid-10.webpassets/media/vault/grid/grid-11.webpassets/media/vault/grid/grid-12.webpassets/media/vault/grid/grid-13.webpassets/media/vault/grid/grid-14.webpassets/media/vault/grid/grid-15.webpassets/media/vault/grid/grid-16.webpassets/media/vault/grid/grid-17.webpassets/media/vault/grid/grid-18.webpassets/media/vault/grid/grid-2.webpassets/media/vault/grid/grid-3.webpassets/media/vault/grid/grid-4.webpassets/media/vault/grid/grid-6.webpassets/media/vault/grid/grid-7.webpassets/media/vault/grid/grid-8.webpassets/media/vault/grid/grid-9.webpassets/template/card.tsxassets/template/engine.tsassets/template/images.tsassets/template/runtime/dispose.tsassets/template/runtime/media.tsassets/template/runtime/use-pause.tsreferences/perf.mdscripts/check.mjs

FAQ

Что делает скилл image-sphere?

Builds a three.js image sphere in which photos sit as camera-facing planes scattered over an invisible sphere that drifts on its own, spins with flick momentum when dragged, enlarges the photo under the pointer and glides a clicked photo to the centre as a lightbox while the rest dim. Use when someone asks for a 3D image sphere, a spinning photo globe, a draggable gallery in three.js, an orbiting image cloud, or a billboard sprite gallery with a lightbox.

Как установить скилл image-sphere?

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

Скилл image-sphere запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить image-sphere с