Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 13
Posts: 13   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 8265 times and has 12 replies Next Thread
TwistedLincoln
Member




Joined: Jan 18, 2011
Post Count: 29
Status: Offline
Reply to this Post  Reply with Quote 
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:


name#1=Bed 140x190
category#1=Bedroom
icon#1=http://192.168.0.100/sweethome/models/bed140x190.png
model#1=jar:http://192.168.0.100/sweethome/models/bed140x190.zip!/bed140x190.obj
width#1=158
depth#1=208
height#1=70
movable#1=true
doorOrWindow#1=false


Inside of the SweetHome3DApplet.html, I added the following:


var parameters = {java_arguments:"-Xmx512m -Dcom.eteks.sweethome3d.deploymentInformation=Online",
showMemoryStatus:"true",
userLanguage:"en",
furnitureCatalogURLs:"online/furnitureCatalog.zip online/additionalFurnitureCatalog.zip",
texturesCatalogURLs:"online/texturesCatalog.zip",

listHomesURL:"",
readHomeURL:"",
writeHomeURL:""

};


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?
[Jan 18, 2011, 3:54:06 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
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
[Jan 18, 2011, 6:34:37 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
TwistedLincoln
Member




Joined: Jan 18, 2011
Post Count: 29
Status: Offline
Reply to this Post  Reply with Quote 
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?
[Jan 19, 2011, 9:53:55 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
TwistedLincoln
Member




Joined: Jan 18, 2011
Post Count: 29
Status: Offline
Reply to this Post  Reply with Quote 
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?
[Jan 26, 2011, 10:00:21 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
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
[Jan 27, 2011, 12:41:47 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
TwistedLincoln
Member




Joined: Jan 18, 2011
Post Count: 29
Status: Offline
Reply to this Post  Reply with Quote 
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.
[Jan 29, 2011, 9:13:13 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
TwistedLincoln
Member




Joined: Jan 18, 2011
Post Count: 29
Status: Offline
Reply to this Post  Reply with Quote 
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:".",
code:"com.eteks.sweethome3d.applet.SweetHome3DApplet",
archive:jars,
width:"100%", height:"95%",
name:"SweetHome3DOnline"};
var parameters = {java_arguments:"-Xmx512m -Dcom.eteks.sweethome3d.deploymentInformation=Online",
showMemoryStatus:"true",
userLanguage:"en",
furnitureCatalogURLs:"online/furnitureCatalog.zip online/additionalFurnitureCatalog.zip",
furnitureResourcesURLBase:"models",
texturesCatalogURLs:"online/texturesCatalog.zip",
texturesResourcesURLBase:"textures",

listHomesURL:"",
readHomeURL:"",
writeHomeURL:""

};


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?
[Feb 2, 2011, 7:12:12 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
knaig
Newbie




Joined: Mar 18, 2012
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
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?
[Apr 2, 2012, 10:43:11 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
knaig
Newbie




Joined: Mar 18, 2012
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
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
[Apr 2, 2012, 6:14:27 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
dimm
Newbie




Joined: Apr 4, 2012
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
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.
[Apr 13, 2012, 9:10:45 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 13   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved