Command Palette

Search for a command to run...

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

spline

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

Spline is a browser-based 3D design tool for building interactive scenes and publishing them to the web as an embed, a web component, or React, Next.js and…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

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

Spline — 3D Design Tool for the Web

Overview

Spline is a browser-based 3D design tool that lets designers create interactive 3D scenes and export them to websites without writing code. Teams use it for 3D landing pages, product showcases, animated illustrations, and interactive experiences: the scene is built in Spline's visual editor (modeling, materials, animation, physics, events), then exported as a hosted URL, a spline-viewer web component, or code for React, Next.js and vanilla JS. This skill covers the code side: embedding an exported scene and controlling it at runtime.

Instructions

Pick the export

In the editor press Export and choose one of the web options. Each produces a URL to copy; after changing the scene, update the export so the URL serves the new version.

Export What you get Use it when
Public URL https://my.spline.design/... page, embeddable in an iframe Sharing a link, or tools that only accept iframes
Viewer spline-viewer web component Any site or builder; needed for page-wide scroll, follow and look-at events
Code → React / Next.js scene.splinecode URL for @splinetool/react-spline The app must read or change objects, variables and events
Code → Vanilla JS scene.splinecode URL for @splinetool/runtime Same control without React

Animations and events only work in the Vanilla JS and React code exports, not in the Three.js or react-three-fiber ones.

React Integration

// Install: npm install @splinetool/react-spline @splinetool/runtime
import Spline from "@splinetool/react-spline";
import type { Application, SplineEvent } from "@splinetool/runtime";
import { useRef } from "react";

export function Hero3D() {
  const splineRef = useRef<Application | null>(null);

  function onLoad(spline: Application) {
    splineRef.current = spline;

    // Find objects by name (set in Spline editor)
    const cube = spline.findObjectByName("HeroCube");
    if (cube) {
      cube.position.y = 2;               // Programmatic control
    }
  }

  // Fires only for objects that have a Mouse Down event in Spline's Events panel
  function onSplineMouseDown(e: SplineEvent) {
    if (e.target.name === "BuyButton") {
      window.location.href = "/checkout";
    }
  }

  return (
    <Spline
      scene="https://prod.spline.design/6Wq1Q7YGyM-iab9i/scene.splinecode"
      onLoad={onLoad}
      onSplineMouseDown={onSplineMouseDown}
      style={{ width: "100%", height: "100vh" }}
    />
  );
}

Spline event props are onSplineMouseDown, onSplineMouseUp, onSplineMouseHover, onSplineKeyDown, onSplineKeyUp, onSplineStart, onSplineLookAt, onSplineFollow and onSplineScroll. A plain onMouseDown is an ordinary DOM handler on the wrapper div and knows nothing about 3D objects.

In Next.js, export as Next.js and import from @splinetool/react-spline/next instead: it is a server component that renders a blurred placeholder until the scene loads.

Viewer, iframe and vanilla runtime

<!-- Web component: no build step, lazy-loads when it scrolls into view -->
<script type="module" src="https://cdn.spline.design/@splinetool/[email protected]/build/spline-viewer.js"></script>
<spline-viewer
  url="https://prod.spline.design/6Wq1Q7YGyM-iab9i/scene.splinecode"
  loading-anim-type="spinner-small-dark"
  events-target="global"
></spline-viewer>

<!-- Public URL in an iframe (simplest, events stay inside the frame) -->
<iframe
  src="https://my.spline.design/splinereactlogocopycopy-eaa074bf6b2cc82d870c96e262a625ae/"
  width="100%" height="600" style="border: none;"
></iframe>

Viewer attributes: url, width, height, background, renderer (auto, webgpu, webgl), loading (auto, lazy, eager), loading-anim-type, unloadable, events-target (local, global), hint. It dispatches load-start, load-complete, viewport-intersection, context-loss and unload events.

// main.js — bundled with Vite, webpack, etc. (npm install @splinetool/runtime)
import { Application } from "@splinetool/runtime";

const canvas = document.getElementById("canvas3d");   // <canvas id="canvas3d"></canvas>
const app = new Application(canvas);
await app.load("https://prod.spline.design/6Wq1Q7YGyM-iab9i/scene.splinecode");

// Listen for events from Spline
app.addEventListener("mouseDown", (e) => {
  console.log("Clicked:", e.target.name);
});

Runtime API

onLoad in React and new Application(canvas) give the same object:

Call Purpose
findObjectByName(name), findObjectById(uuid), getAllObjects() Get objects; each has position, rotation, scale, visible, color, state, show(), hide(), emitEvent()
emitEvent(eventName, nameOrUuid), emitEventReverse(...) Run an event defined in the editor: mouseDown, mouseUp, mouseHover, keyDown, keyUp, start, lookAt, follow, scroll
`s
Полный SKILL.md на GitHub

Установить spline в Claude Code и Claude Desktop

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

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

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

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

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

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

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

_scores.json

FAQ

Что делает скилл spline?

Spline is a browser-based 3D design tool for building interactive scenes and publishing them to the web as an embed, a web component, or React, Next.js and vanilla JavaScript code. Use when a user asks to add a Spline scene to a site, embed a 3D hero or product showcase, control a Spline scene from code with @splinetool/react-spline or @splinetool/runtime, use the spline-viewer component, react to clicks on 3D objects, or make a Spline embed load faster.

Как установить скилл spline?

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

Скилл spline запускает скрипты?

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

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

Сравнить spline с