France
Joined: Nov 7, 2005
Post Count: 9418
Status:
Offline
Re: Export to HTML5 plug-in
Hello everybody,
Here's the new versions 1.2 of Export to HTML5 and Export to XML/OBJ plug-ins. Both plug-ins are now based on the management of the new XML entry that was added to .sh3d files in Sweet Home 3D 5.3. The JavaScript part of the Export to HTML5 plug-in now supports pinch for zoom under Android and Windows, and was optimized to draw 3D lines faster.
To let the XML entry generated by Export to XML/OBJ plug-in share the same DTD as the Home.xml entry in .sh3d files, its XML format had to evolve a little to fix some typos and other small problems: - logitude attribute of <compass> element was corrected as longitude - nameVisible attribute of <room> element was renamed as areaVisible - size attribute of <textStyle> element was renamed as fontSize - <Text> element was renamed as <text> with lowercase letters - the default value of wallsAlpha attribute of <environment> element is now 0 instead of 1 - the default value of thickness attribute of <polyline> element is now 1 instead of 0. I sincerely hope these changes won't bother you too much. A few attributes were missing too but that won't change the way you could have already use the XML files generated by the plug-in. The properties stored in HomeObject instances were also saved in <property> elements, and read in JavaScript if needed. Finally, the attributes named structure and exportFlags are the only additional attributes in the <home> element written by Export to XML/OBJ plug-in.
Hope you'll enjoy these improvements
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
United States
Joined: Dec 27, 2016
Post Count: 11
Status:
Offline
Re: Export to HTML5 plug-in
Hi Emmanuel,
Do you think at some point in the future this plugin could be enhanced to add WebVR functionality? I have tried the obj2vr app and while it looked promising, there are bugs and issues (mainly the flipped objects, minimum viewing distance and lighting). It appears like it is not being developed anymore. I also tried uploading to Sketchfab since they use WebVR but it is difficult to get the same great sky textures and lighting options as in Sweet Home 3D. The rooms just don't look as good.
France
Joined: Nov 7, 2005
Post Count: 9418
Status:
Offline
Re: Export to HTML5 plug-in
Rhawke, sorry, I don't have knowledge about WebVR yet, so it's difficult for me to answer.
DemiChron, source code of Sweet Home 3D JS project is available here.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
----------------------------------------
[Edit 1 times,
last edit by Puybaret at Sep 6, 2017, 3:02:05 PM]
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: Export to HTML5 plug-in
Before I start updating the lib directory: Are Export to HTML5 plug-in 1.2 lib/*.js files compatible with older files (.zip and viewHome.html). Just about to export a couple of new homes, but would wish for the earlier to work as well. Or the other way around - that the existing 1.0/1.1 js files can deal with the new export.
Not a big problem, and fully understandable if not, just curious if I need to set aside some extra time to redo the old files. Will at some point anyway.
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: Export to HTML5 plug-in
Thanks. We will see whether I take the chance... - or do the entire presentation differently. Btw. I experienced some trouble. Updating files and viewing with Opera, some of the settings (the .zip file maybe) must have been cached somewhere, because the virtual visitor location refused to change even if the files were updated on the server. Spent a frustrating 30 minutes trying to figure out why my virtual visitor was always far underground even if the files were updated. But then I tried another browser. Probably nothing you can do about that - but good to know if someone is struggeling with updating their exports. Just try another browser (or clear all cached files).
Anyway. The HTML export really is a nice tool. Just to let you know your efforts are appreciated. ok
France
Joined: May 17, 2017
Post Count: 1
Status:
Offline
Re: Export to HTML5 plug-in
Hello Emmanuel, Thanks for you very nice work ! Sorry to ask this question but I find this plugin very useful so I downloded it After adding the plugin "exporter en hmtl", I" got a a zip file and tried to open with Firefox the file "ViewHome.
Here's the error message I got :
Error: ReferenceError: viewHome is not defined
I put myself as a customer receiving his plan to see how is was, and it was not.
My laptop is pretty new, with Windows 10 pro and I use mainly Firefox. Perhaps I need another plugin or software to see it work
Thanks a lot for your help and have a very nice day.