Re: Export HTML5 plug-in

by Puybaret » Wed Dec 12, 2018 6:16 pm

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, [font=courier new]getClosestItemsAt[/font] method takes in parameter 2D coordinates, so translating to canvas space just consist of substracting [font=courier new]rect.x[/font] and [font=courier new]rect.y[/font] from [font=courier new]e.clientX[/font] and [font=courier new]e.clientY[/font]. Measuring pixel locations at screen with your mouse pointer would have given you the solution...