|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: Export HTML5 plug-in |
||
| Print at Dec 16, 2025, 6:07:44 PM |
|
|
| Posted by dorin at Dec 5, 2018, 6:46:31 PM |
|
Re: Export HTML5 plug-in I'am not sure but could be a problem of browser rather than coding. Look at this answer ---------------------------------------- A computer program does what you tell it to do, not what you want it to do. Murphy's Law When all else fails, read the instructions. Murphy's Law If you don't like "AS IS", DIY. Dorin's law |
| Posted by Puybaret at Dec 5, 2018, 8:51:56 PM |
|
Re: Export HTML5 plug-in Thanks for trying to help Dorin, but your link points to problems in the Online version, not with the HTML5 viewer version. Anyway, you're not wrong when your speak about browsers, because the viewer could also not work correctly on some browsers (even if I don't hope so). boe666, the most helpful code is the one tested on a real web server with a real SH3D file. So please, upload your failing HTML5 code on a public web server with a SH3D file. You could also use the very good JavaScript debuggers available in all modern browsers, and find what's wrong by yourself. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by boe666 at Dec 6, 2018, 9:28:20 AM |
|
Re: Export HTML5 plug-in ok. So I clean the code, and put all on this link: http://smarted.pl/sh3d/viewHome.html# As You can see - all object are selectable by code. But not by the mouse. Please check console. Code below: |
| Posted by boe666 at Dec 10, 2018, 10:03:48 AM |
|
Re: Export HTML5 plug-in Can somebody help ? |
| Posted by boe666 at Dec 11, 2018, 8:02:47 AM |
|
Re: Export HTML5 plug-in Ok, so if nobody can help in this situation, maybe sombody can help - how to calculate z dimention and z,y depend of actual camera's position ? Where can I find proper values? |
| Posted by Puybaret at Dec 11, 2018, 10:16:41 AM |
|
Re: Export HTML5 plug-in I tried your program in Safari debugger and the object returned at the line var obj = HPC.getComponent3D().getClosestItemAt(x, y);You should really learn how to use a JavaScript debugger. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by boe666 at Dec 11, 2018, 11:31:56 AM |
|
Re: Export HTML5 plug-in I understand my mistake, but can You show me how i can translate them in canvas space ? Maybe some links ? |
| Posted by boe666 at Dec 11, 2018, 12:45:08 PM |
|
Re: Export HTML5 plug-in I'm trying to understand this, i think it's depend on camera position (before i think the getClosestItemAt calculate this automaticaly) but without any examples i don't know how to start. |
| Posted by Puybaret at Dec 11, 2018, 1:04:07 PM |
|
Re: Export HTML5 plug-in I wrote you how to fix your issue. Sorry, I can't help you more, it's really basic JavaScript. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by boe666 at Dec 11, 2018, 1:24:46 PM |
|
Re: Export HTML5 plug-in so, if I understand this proper. I have to translate x,y coordinates (given from flat rectangle) to coordinates in the actual perspective of my model's floor. After this, method getClosestItemAt fill return objects. Am I Correct ? |
|
|
|
Current timezone is GMT Dec 16, 2025, 6:07:44 PM |