šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Book a DemoInstallSign in
Socket

@splinetool/r3f-spline

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splinetool/r3f-spline

[![](https://raw.githubusercontent.com/splinetool/react-spline/main/.github/screenshots/hero.png)](https://my.spline.design/splinereactlogocopycopy-eaa074bf6b2cc82d870c96e262a625ae/)

1.0.2
latest
npm
Version published
Weekly downloads
1.2K
48.92%
Maintainers
4
Weekly downloads
Ā 
Created
Source

r3f-spline

r3f-spline is a React hook that lets you use your Spline scene with react-three-fiber.

🌈 Spline is a friendly 3d collaborative design tool for the web.

Website — Twitter — Community — Documentation

Install

yarn add @splinetool/r3f-spline @splinetool/loader

or

npm install @splinetool/r3f-spline @splinetool/loader

NOTE: make sure you also install the @react-three/fiber and three dependencies.

Usage

import useSpline from '@splinetool/r3f-spline'

export default function Scene({ ...props }) {
  const { nodes, materials } = useSpline('https://prod.spline.design/2fzdsSVagfszNxsd/scene.spline')

  return (
    <group {...props} dispose={null}>
      <mesh
        name="Rectangle"
        geometry={nodes.Rectangle.geometry}
        material={materials['Rectangle Material']}
      />
    </group>
  )
}

Examples

FAQs

Package last updated on 02 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts