Programming, Three.js, React-Three-Fiber

Adding an AI-Generated 3D Spinning Cat to a React App Using Meshy.ai and ‘React Three Fiber’. Was It Easy?

Yes! It was surprisingly easy and fast, actually! I popped this AI-generated 3D cat onto my web site’s contact page, just for fun. Here’s how.

Screen grab of my Contact page, where I popped this 3D AI-generated cat character, who’ll spin around there forever waiting for people to email me, I guess. Don’t spam me, though, or he’ll bite. ;-)

With all of my talk about metaverses lately, I was curious to try out some related tech, just to see how it all works. Specifically, I wanted to look into web-based 3D rendering, animation, camera controls, etc. — all of the things that metaverses typically utilize when building these tricked-out immersive environments that we all have come to love.

After a little poking around, it seemed that a library called Three.js was a frontrunner in this area. It’s got a ton of documentation, as well, which is always nice. (Three.js is built atop WebGL, by the way, a popular API for rendering graphics within web browsers.)

I soon decided that I’d like to add a 3D model to my website, perhaps in some rather lonely corner of the site. That said, my personal web site uses React, so I looked around for any React-specific implementations of Three — and of course a great one existed. It’s called React-Three-Fiber (a strange-sounding name, perhaps, but it refers to React, Three.js, and React’s new-ish…

--

--