Hi, I want to export my model with decal geometry in gltf or glb.
I found and Decal example made with R3F. and I added an export function, scene to export gltf file .
But when I run export function it show error.
TypeError: Cannot read properties of undefined (reading 'toArray')
at GLTFWriter.processMaterial (https://95d22z.csb.app/node_modules/three/examples/jsm/exporters/GLTFExporter.js:639:34)
When I follow that log I found that it cause error in this line in GLTFExporter.js
processMaterial( material ) {
...
...
const color = material.color.toArray().concat( [ material.opacity ] );
I think decal mesh has material and geometry each. so I can’t understand why this error occur.
Please check live examples and help
Thanks!