|
Sweet Home 3D Forum » List all forums » » Forum: Installation » » » Thread: Running the SweetHome3D java applet in a browser - textures & furniture issues |
||
| Print at Dec 25, 2025, 9:48:41 PM |
|
|
| Posted by TwistedLincoln at Jan 18, 2011, 4:54:06 PM |
|
Running the SweetHome3D java applet in a browser - textures & furniture issues I have been attempting to install SweetHome3d to my local server (running apache) so I can share it between my various machines on my internal network. I want it to run in the browser window, so I'm not using Java Web Start. I successfully compiled the applet, and it starts just fine in the browser. But (as expected), there are no furniture models or textures. Per this thread I modified furnitureCatalog.zip, additionalFurnitureCatalog.zip and texturesCatalog.zip to remove references to the SweetHome3D server, and replaced it with the address to mine. On my server, the main direcotry that everything is in is http://192.168.0.100/sweethome, and the applet files are located at http://192.168.0.100/sweethome/lib. I placed the three zip files mentioned above in a directory called "online" inside the main sweethome3d directory (so http://192.168.0.100/sweethome/online Here's a example entry from the PluginFurnitureCatalog.properties file from furnitureCatalog.zip: Inside of the SweetHome3DApplet.html, I added the following: I then used wget to download all the models from the SweetHome3D server, and placed them in the http://192.168.0.100/sweethome/models directory, making sure to keep the directory structure intact (i.e. some models are in the contributions directory, etc). I did the same with the textures (putting them in the http://192.168.0.100/sweethome/textures directory). Based on the instructions in the other thread, it would seem that's all I need to do. And yet I still have no textures or furniture in the applet. Am I missing something? |
| Posted by Puybaret at Jan 18, 2011, 7:34:37 PM |
|
Re: Running the SweetHome3D java applet in a browser - textures & furniture issues As explained in SweetHome3DApplet javadoc, the URLs in the parameters texturesCatalogURLs and furnitureCatalogURLs can be absolute or relative to the code base of the applet (not its document base). So I would first try an absolute URL, then once it works, I would check the codebase in applet's attributes (if you didn't cite this attribute it will be equal to the directory where you placed the document containing the applet). ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by TwistedLincoln at Jan 19, 2011, 10:53:55 PM |
|
Re: Running the SweetHome3D java applet in a browser - textures & furniture issues I tried using absolute URLs to no avail. However when I returned the settings to the relative ones, I suddenly got a listing of the furniture. Not sure why that happened, as I didn't change anything. However things are still not working properly. Now when connecting from a Linux machine, the top work area (where you draw walls, etc) is grayed out and you cannot drag-and-drop items to it. However you can right-click on a furnature item and add it to the plan that way. When connecting from a Windows machine, the work area is functional, and drag-and-drop works fine, however no images are displayed for the furniture listings, and added items show up as cubes rather than looking like the item in question. The official version hosted on SweetHome3D works fine on both machines. I'm completely lost as to what's happening here. Any ideas? |
| Posted by TwistedLincoln at Jan 26, 2011, 11:00:21 PM |
|
Re: Running the SweetHome3D java applet in a browser - textures & furniture issues I'm still stuck with this problem. Can anyone point me in the right direction? |
| Posted by Puybaret at Jan 27, 2011, 1:41:47 AM |
|
Re: Running the SweetHome3D java applet in a browser - textures & furniture issues I would build by hand the URLs of the models and check if they work. I would also try first to work with no proxy to ensure you get the direct connection to your server. Java is able to handle proxy settings but make it simple first. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by TwistedLincoln at Jan 29, 2011, 10:13:13 PM |
|
Re: Running the SweetHome3D java applet in a browser - textures & furniture issues The URLs of the models work fine directly (ie when entered into a web browser, they prompt to download the proper model file). I'm not sure what you mean by working without a proxy. I am connecting directly to the server within my internal network, there is no proxy involved. |
| Posted by TwistedLincoln at Feb 2, 2011, 8:12:12 PM |
|
Re: Running the SweetHome3D java applet in a browser - textures & furniture issues I've partially solved this issue: by removing the trailing slash from the models and textures base directories settings, I now properly get model icons in Windows, and the drag & drop issue seems to be fixed in Linux. For other's reference here is my SweetHome3DApplet: var attributes = {codebase:".",Unfortuantely, I still get "block" shapes instead of proper models in the 3D section when running on Windows. Thinking it was an Internet Explorer issue, I tried using Firefox, with the same results. My first thought was that it had something to do with how Java is set up on the Windows machine, but if that was the case, why would the official version hosted on SweetHome3D's servers work properly? |
| Posted by knaig at Apr 2, 2012, 12:43:11 PM |
|
Re: Running the SweetHome3D java applet in a browser - textures & furniture issues I have the exact same problem. I use the eclipse platform. Does anyone have the solution? Any chance it might be a version problem? |
| Posted by knaig at Apr 2, 2012, 8:14:27 PM |
|
Re: Running the SweetHome3D java applet in a browser - textures & furniture issues When I compile the code from eclipse, I get the this.applet.getCodeBase() = "D:\SweetHome3D-3.4-src\classes". Not sure why this is the case. Shouldn't codeBase be pointing to "SweetHome3D-3.4-src"? Regards, Karthik |
| Posted by dimm at Apr 13, 2012, 11:10:45 PM |
|
Re: Running the SweetHome3D java applet in a browser - textures & furniture issues I still get "block" shapes instead of proper models in the 3D section when running on Windows. Thinking it was an Internet Explorer issue, I tried using Firefox, with the same results. Zip each model or change catalog definitions. |
|
|
|
Current timezone is GMT Dec 25, 2025, 9:48:41 PM |