How to import furniture in Applet

This topic has been viewed 3300 times and has 4 replies
Thread status: Active
Questions about Sweet Home 3D installation [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
[email protected]
Posts: 3
Joined: Mon Oct 15, 2012 2:28 pm

How to import furniture in Applet

Post by [email protected] »

Hi I am santhosh

I am trying to configure the sweet home 3d application as applet.
I am facing problem in listing the furniturecatalog menus. i am able to display additional catalog list but images are not rendered. Please help me to resolve the problem.

Regards
Santhosh
Regards
Santhosh
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: How to import furniture in Applet

Post by Puybaret »

There must be a problem in the values you gave to icon# properties and/or furnitureResourcesURLBase applet parameter. If you want more help, you should give more details about the way you use these parameters.
Emmanuel Puybaret, Sweet Home 3D creator
[email protected]
Posts: 3
Joined: Mon Oct 15, 2012 2:28 pm

Re: How to import furniture in Applet

Post by [email protected] »

Hi Puybaret,

Thanks for your quick response,
Following attributes being used.

<script>
var javaMinimumVersion = "1.6.0_10";
var jars = "/online/additionalLanguages.zip,lib/SweetHome3DApplet.jar,lib/Loader3DS1_2u.jar,lib/batik-svgpathparser-1.7.jar,lib/jnlp.jar";


jars += ",lib/freehep-vectorgraphics-svg-2.1.1.jar,lib/sunflow-0.07.3g.jar,lib/jmf.jar";
if (!navigator.platform.match("Mac.*")) {
jars += ",lib/iText-2.1.7.jar";
}


if (navigator.platform.match("Win.*")) {
if (navigator.platform.match(".*64")) {
jars += ",lib/windows/x64/java3d.jar";
} else {
jars += ",lib/windows/i386/java3d.jar";
}
} else if (navigator.platform.match("Mac.*")) {
javaMinimumVersion = "1.5";
jars += ",lib/macosx/java3d.jar";
} else if (navigator.platform.match("Linux.*")) {
javaMinimumVersion = "1.6"; // OpenJDK doesn't give its subversion
if (navigator.platform.match(".*64")) {
jars += ",lib/linux/x64/java3d.jar";
} else {
jars += ",lib/linux/i386/java3d.jar";
}
} else {
jars += ",lib/java3d.jar";
}

var attributes = {codebase:".",
code:"com.eteks.sweethome3d.applet.SweetHome3DApplet",
archive:jars,
width:"100%", height:"600",
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:"online/listHomes.jsp",
readHomeURL:"online/readHome.jsp?home=%s",
writeHomeURL:"online/writeHome.jsp",
readPreferencesURL:"online/readPreferences.jsp",
writePreferencesURL:"online/writePreferences.jsp",
enableExportToSH3D:"true",
enableExportToSVG:"true",
enableExportToOBJ:"true",
enablePrintToPDF:"true",
enableCreatePhoto:"true",
enableCreateVideo:"true",

javaDisabled:'"><p align="center" style="margin:30px"><font color="#FF0000">Enable Java in the preferences of your browser<br>and/or install <a href="http://java.com">Java</a> to run Sweet Home 3D Online.</font></p><dummy att="'};
deployJava.setInstallerType('kernel');
deployJava.setAdditionalPackages('javax.swing,javax.imageio');
deployJava.runApplet(attributes, parameters, javaMinimumVersion);
</script>

furnitureCatalog:

id#1=eTeks#bed140x190
name#1=Bed 140x190
category#1=Bedroom
icon#1=bed140x190.png
model#1=bed140x190.zip!/bed140x190.obj
width#1=158
depth#1=208
height#1=70
movable#1=true
doorOrWindow#1=false

additionalFurnitureCatalog:

id#1=PeterSmolik#bookcase
name#1=Bookcase
category#1=Living room
icon#1=contributions/bookcase.png
model#1=contributions/bookcase.zip!/bookcase.obj
multiPartModel#1=true
width#1=182.5
depth#1=31.25
height#1=150.
movable#1=true
doorOrWindow#1=false
creator#1=Peter Smolik

Thanks
Santhosh
Regards
Santhosh
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: How to import furniture in Applet

Post by Puybaret »

From these parameters, bed140x190.png should be placed in a folder named models, and this folder should be in the same folder as the applet HTML file, since codebase attribute is equal to the current folder.

By the way, it would be nice to explain why you try to deploy your own online version.
Emmanuel Puybaret, Sweet Home 3D creator
[email protected]
Posts: 3
Joined: Mon Oct 15, 2012 2:28 pm

Re: How to import furniture in Applet

Post by [email protected] »

Hi

Thanks for reply. Yes i have fixed in the same way yesterday. We are planning to use this application for our internal use.
Regards
Santhosh
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest