Skip to content

Instantly share code, notes, and snippets.

@PantherHawk
PantherHawk / FloatingShvitiExperience.js
Created May 25, 2021 22:57
Use of React Three Fiber SVG Loader
import * as THREE from 'three';
import React, { useState, useEffect, useRef } from 'react';
import PropTypes from 'prop-types';
import { Canvas, extend, useThree, useFrame } from 'react-three-fiber';
import flatten from 'lodash-es/flatten';
import { SVGLoader as loader } from 'three/examples/jsm/loaders/SVGLoader';
import SVG_SHVITI_URL from './Shviti.svg';
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";