How to export multiple varying 3d scenes with GLTFExporter in react-three-fiber

I’m trying to create multiple 3d models of a cube varying in the texture used on the faces of each using react-three-fiber. I would like them exported as gltf files.

I have been using this — Exporting scene in GLTF format from react-three-fiber — as a guideline. I have the ref component and callback, however I’m not sure how to call GLTFExporter with, say, a button, so that it exports a cube with different faces every time (until the options from a given directory runs out). I also have one scene I am able to export as example for now.

Ideally, I would like to have a directory for the different cubes, and the GLTFExporter "button" would access a different folder from there with the different faces each time.

Source: React – Stack Overflow

November 16, 2021
Category : News
Tags: gltf | react-component | react-three-fiber | reactjs | three.js

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.