/** * EXPERIMENTAL components to play around with but not officially use in the demo while * we develop. */ import {useEffect, useState} from 'react'; import {Object3DNode, extend} from '@react-three/fiber'; import ThreeMeshUI from 'three-mesh-ui'; import {} from '@react-three/xr'; import {Sparkles, Shadow} from '@react-three/drei'; // import FontImage from './assets/Roboto-msdf.png'; import {FontLoader} from 'three/examples/jsm/loaders/FontLoader.js'; import {TextGeometry} from 'three/examples/jsm/geometries/TextGeometry.js'; import ThreeMeshUIText from './ThreeMeshUIText'; import {ContactShadows, BakeShadows} from '@react-three/drei'; extend({TextGeometry}); extend(ThreeMeshUI); declare module '@react-three/fiber' { interface ThreeElements { textGeometry: Object3DNode; } } // This is for textGeometry.. not using three-mesh-ui to display text export function TitleMesh() { const font = new FontLoader().parse(); console.log('font', font); const [text, setText] = useState('Text'); useEffect(() => { setTimeout(() => { setText(text + ' more '); console.log('adding more tex..', text); }, 1000); }, [text]); return ( ); } export function Sphere({ size = 1, amount = 50, color = 'white', emissive, ...props }) { return ( ); } export function Title({accentColor}) { return ( ); } export function RandomComponents() { return ( <> ); }