My current project involves developing a dimensioning tool using Three.js. I am facing a challenge in trying to display dimensions of distances over a line between two objects, much like the example shown with 2.455. https://i.sstatic.net/8Oac2.png
Unfortunately, due to limitations in Threejs R88, HTML encoding is not supported, making it impossible to incorporate functions such as superscript in TextGeometry directly. One workaround would involve adding a second text geometry for the superscript number, but I am looking for alternative solutions that are cleaner and more efficient. Any suggestions on how to tackle this issue?
An attempt like the following does not yield the desired result:
var ss = '5'.sup();
var geometry = new THREE.TextGeometry( '2.45' + ss, {
font: font,
size: 80,
height: 5});
Thank you for any insights or recommendations you may have.