Title: How to get the x and y of canvas coordinates from a x,y,z point in the viewer. Is required for CustomToolTip of the Data Visualization extension
Tags: autodesk-forge;autodesk-viewer
Question: Im trying to put a CustomToolTip to a Sprite from the Data Visualization extension. In the documentation it shows multiple examples like this one link, but I have not found the code they use to get it, or any other code example using this feature. The documentation also isn't being of a lot of help to find how to get the x and y coords.
The idea is to add a CustomToolTip with a title and description to a Sprite

Here is the accepted answer: I have found how to get the x and y coords.
viewer.worldToClient(new THREE.Vector3( x, y, z )) with the x,y,z being the 3d coords you want to convert to the canvas 2d coords. It will give back a  THREE.Vector3 object, where z has value 0, and x,y has the desired values


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2021:00:06/23/21', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<autodesk-forge><autodesk-viewer>', 'Title': 'How to get the x and y of canvas coordinates from a x,y,z point in the viewer. Is required for CustomToolTip of the Data Visualization extension', 'ViewCount': 78, 'id': 68096848, 'user_AboutMe': '<p>Developer</p>\n', 'user_AccountId': 21834668.0, 'user_DisplayName': 'NoName', 'user_Reputation': 3.0, 'user_Views': 3.0, 'user_id': 16129135.0}}