Print at Dec 16, 2025, 5:25:46 AM

Posted by Puybaret at Dec 12, 2018, 6:16:00 PM
Re: Export HTML5 plug-in
Your questions are not stupid, but most contributors in the forum are Sweet Home 3D users, not programmers (and even less JavaScript programmers). If you want to understand how to use Sweet Home 3D JS, learn how to use the debugger in your browser, this will help you in many cases.
By the way, getClosestItemsAt method takes in parameter 2D coordinates, so translating to canvas space just consist of substracting rect.x and rect.y from e.clientX and e.clientY. Measuring pixel locations at screen with your mouse pointer would have given you the solution...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator