vasturiano/3d-force-graph-vr

How to render an image sprite and display text at the same time ?

Closed this issue · 0 comments

Hi, i'm currently displaying 2D icons in the VR graph using sprites and I found another example to display only text as well, i'm looking for away to display my image sprite AND a text below, I haven't found a way to do so yet.

Here's how I'm rendering my nodes currently (just displaying a sprite based on a field in my node)

nodeThreeObject={(node) => { const imgTexture = new THREE.TextureLoader().load( get_icon(node["node_label_type"]).src ); const material = new THREE.SpriteMaterial({ map: imgTexture, }); const sprite = new THREE.Sprite(material); sprite.scale.set(12, 12); return sprite; }}

Is there a way I can add some text on top of the sprite I'm rendering ? I'm looking for a way to render multiple sprites for a single node instead of just one as i'm doing currently. Thanks a lot