---
name: "spline-3d-interactive-embeds"
description: "Embed and control interactive Spline 3D scenes in React and Next.js applications."
metadata:
  author: "Spline"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "embed spline 3d in react"
  - "trigger spline event from react"
  - "control spline scene object"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Spline 3D Web Interactive Embeds

Integrates @splinetool/react-spline and @splinetool/runtime: triggering 3D state transitions, responding to user clicks, mutating text objects, and optimizing Spline file loading.

## When to Invoke
Invoke this skill whenever you need to:
- embed spline 3d in react
- trigger spline event from react
- control spline scene object

## Execution SOP & Rules
1. Load Spline components dynamically using Next.js next/dynamic with { ssr: false }.
2. Attach onLoad={(splineApp) => ...} callback to capture the interactive Spline instance.
3. Trigger custom event triggers with splineApp.emitEvent('mouseHover', 'TargetObjectName').
4. Provide a lightweight 2D CSS placeholder while the .splinecode scene binary downloads.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
