# Measuring html position related to thrrejs object position in canvas

**URL:** <https://discourse.threejs.org/t/measuring-html-position-related-to-thrrejs-object-position-in-canvas/10871>\
**Category:** Questions\
**Tags:** object3d, html\
**Created:** [November 16, 2019, 7:45am UTC](https://discourse.threejs.org/t/measuring-html-position-related-to-thrrejs-object-position-in-canvas/10871 "2019-11-16T07:45:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![angel\_jo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/angel_jo/32/7208_2.png) [@angel\_jo](https://discourse.threejs.org/u/angel_jo)\
**Post date:** [November 16, 2019, 7:45am UTC](https://discourse.threejs.org/t/measuring-html-position-related-to-thrrejs-object-position-in-canvas/10871/1 "2019-11-16T07:45:46Z")

</div>

hey i am wondering whether it possible to find html position related to an object position in scene.for example i have an object at position (0,0,0).how may i know where it located relating to html.like (top:350px;left:80px;).is there any reliable formula or functions to measure exact position of html related to an object?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [November 16, 2019, 1:49pm UTC](https://discourse.threejs.org/t/measuring-html-position-related-to-thrrejs-object-position-in-canvas/10871/2 "2019-11-16T13:49:30Z")

</div>

Have you tried the following solution?

> [@How to converting world coordinates to 2D mouse coordinates in ThreeJS](https://discourse.threejs.org/t/how-to-converting-world-coordinates-to-2d-mouse-coordinates-in-threejs/2251/3):
>
> vector.project( camera ); This only converts a vector to normalized device space. You still have to map the vector to 2D screen space. Something like: vector.x = ( vector.x + 1) \* width / 2; vector.y = - ( vector.y - 1) \* height / 2; vector.z = 0; width and height represent the dimensions of the canvas (renderer.domElement).

`vector` would be the position of you object in world space.
