I load a simple glb model created in SketchUp using Three.JS. The model contains a group called Text.
The model loads and displays fine in Three.js, and I can find the mesh by traversing the loaded model.
I want to create some text and then display that text as a texture on the model. But when I assign the texture, it's just black. If a assign a color instead, it works as intended. I tried a lot of different stuff, but the texture just remains black.
I assign using the below code:
var textModelMesh = FindMeshWithNameInModel(model, "Text");
var textTexture = CreateCanvasTexture("Hello");
textModelMesh.material = new THREE.MeshBasicMaterial({ side: THREE.DoubleSide, map: textTexture})
How do I get the text to display on the loaded model?
Fiddle link: https://jsfiddle.net/ajo27ny4/28/