France
Joined: Nov 7, 2005
Post Count: 9430
Status:
Offline
Re: Export to HTML5 plug-in - Bug
This would require a deeper investigation because the demo provided with the viewer does not works as expected when activateCameraSwitchKey is set to false .
About setting transformations for an animation, I wanted to share a test we made some time ago with Véronique who designed a home containing 22 mannequins showing different postures of a walking man. Only the first mannequin is actually displayed and a simple script changes each 50 ms the transformations and size of the mannequin from the hidden mannequins postures, moving the location of the mannequin to make it appear as if it's moving. As shown in the following animated GIF, it works pretty well even if it's not perfect (the location of the mannequin would probably need some refinements).
If you want to try with your own models, download the attached file and change the script of the HTML file marked at the comment
// Animate mannequins
Good luck!
---------------------------------------- WalkingMan.zip
(556943 bytes)
(Download count: 5504)
(Simulation of a walking man with JavaScript)
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Netherlands
Joined: Apr 8, 2022
Post Count: 1442
Status:
Offline
Re: Export to HTML5 plug-in - Bug
That looks great! A walking character was the first thing I thought about and you and Véronique already did it. It must have been a lot of work creating all mannequin positions and transformations. I'm definitely going to study this.
-- The viewHome example works as expected but its a separate web page, not an overlay. I'm not going to create a separate page for each model that has a 3dview. Besides the spacebar problem the overlay moves the rest of the page too much with mouse scrolls for zooming, the overlay moves partially out of the visible area. The overlay should remain static in place and mouse actions should be limited to the overlay until it is closed.
I'm experimenting with using the viewHome code in a html <object> and show/hide with buttons. I'm just an amateur with html but I read that using iframes is discouraged. No luck so far. The overlay is perfect if it remained fixed in place and the spacebar can be blocked.
---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects
France
Joined: Feb 8, 2024
Post Count: 2
Status:
Offline
Re: Export to HTML5 plug-in - Bug
Hello :)
I think i borked my home ... For some reason i'm encountering 2 problematic issue, 1 the roof is nolonger rendering and i see my upper level flooring, and exporting the house in HTML5 crash Here is the log of it, but i really can't read java ><
Can i fix this ? does that error say anything obvious ? It use to work, and i hosted that on a private site for the renovation company to look at ><
Also, i got pointed at this thread about converting the xml into something that blender could import to add light with correct setting, and fix transparency of texture ... but it doesn't look like the right topic ?
Netherlands
Joined: Apr 8, 2022
Post Count: 1442
Status:
Offline
Re: Export to HTML5 plug-in
Is there a way to get the unminimized versions of the viewmodel.min.js and viewhome.min.js files?
---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects
France
Joined: Nov 7, 2005
Post Count: 9430
Status:
Offline
Re: Export to HTML5 plug-in
@vlycop You must use a plug-in which uses some data that the plug-in may not be able to handle.
@Keet In project SweetHome3DJS, you should remove the lines 375 to 391 in build.xml and run Ant viewerBuild target.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Netherlands
Joined: Apr 8, 2022
Post Count: 1442
Status:
Offline
Re: Export to HTML5 plug-in
@Keet In project SweetHome3DJS, you should remove the lines 375 to 391 in build.xml and run Ant viewerBuild target.
Unfortunately I don't have the build environment for this...
---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects
France
Joined: Nov 7, 2005
Post Count: 9430
Status:
Offline
Re: Export to HTML5 plug-in
I can send them to you if needed. If it's for debugging purpose, you should know that debuggers in browsers let you unminify code. It won't rename local variables to their original name but it's most of the time enough to find bugs.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Netherlands
Joined: Apr 8, 2022
Post Count: 1442
Status:
Offline
Re: Export to HTML5 plug-in
I can send them to you if needed. If it's for debugging purpose, you should know that debuggers in browsers let you unminify code. It won't rename local variables to their original name but it's most of the time enough to find bugs.
If you could I would very much appreciate it. You have my email. Thank you in advance!
---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects