Can't Get Text Geometry to show

Hi,

I’m running an instance of TextGeometry, but I can’t seem to get it to show. Can someone please take a look?

https://jsfiddle.net/yorunii/Lf15u2ev/

Thank you

You are missing all the basics components of a three.js scene (Scene, Renderer, Camera). Try going over the Creating a Scene tutorial first.

Looks like I accidentally took that out. I was trying some different things and I took out the Scene, Renderer, and Camera. Let me add it back.

Ok try this one: https://jsfiddle.net/yorunii/9m52vpn9/

I’m still getting just a black screen, which is what I was getting before.

The fiddle is still missing quite a bit - looks like you may have deleted the last couple of lines.

And somewhere in there, you will certainly want to have scene.add( geometry );

Ah, I see what happened. I thought the “Update” button would save my work in jsfiddle, but, alas, it does not. I have to use “Set As Base,” which is a little confusing.

And thank you! I did add the scene. But still no scene to show.

https://jsfiddle.net/yorunii/tbay8f0j/

Every time you click update in jsfiddle it will add a number to the end:

https://jsfiddle.net/yorunii/9m52vpn9/1
https://jsfiddle.net/yorunii/9m52vpn9/2
https://jsfiddle.net/yorunii/9m52vpn9/3
Etc.

That way you can switch back to old versions.

Your code is adding a geometry directly to the scene. I think you need to create a mesh – providing geometry and material as parameters – and add that to the scene instead.

^ That’s what I meant…

Ok I can try creating a mesh and seeing how that works. I was doing this exercise here: https://threejs.org/docs/index.html#api/geometries/TextGeometry, but I’m not sure what else needs to be added to the exercise.

I decided to load the font from Git instead of locally. I assume that part was done correctly?

ah I see. Thank you

@yorunii hi !
Were you able to make it show? I’m still facing problems to show Text Geometry.
I checked your code on jsfiddle but that’s also not helpful.
In my case it’s just giving me an undefined error.
Any help would be appreciated.

Here’s a link to my code:
https://jsfiddle.net/watney/btjham9L/3/

Did you see that?
How to create a text geometry?
https://jsfiddle.net/f2Lommf5/14075/


Also to be found in the collection Collection of examples from discourse.threejs.org
there http://discourse.threejs.hofk.de/2018/index2018.html