After successfully loading a basic glb model created in SketchUp using Three.JS, I encountered an issue with displaying text on the model. The model includes a group identified as Text.
Despite being able to load and visualize the model correctly in Three.js, attempts to apply text as a texture were unsuccessful. Upon assigning the texture, it rendered only as black. Interestingly, substituting a color instead of the texture worked as expected. Various methods were explored to resolve this issue, but the texture continued to display as black.
The assignment code used is as follows:
var textModelMesh = FindMeshWithNameInModel(model, "Text");
var textTexture = CreateCanvasTexture("Hello");
textModelMesh.material = new THREE.MeshBasicMaterial({ side: THREE.DoubleSide, map: textTexture})
If you have any insights or solutions on how to showcase text on the loaded model, please share them.
Fiddle link: https://jsfiddle.net/ajo27ny4/28/