Print at Dec 27, 2025, 11:30:46 AM View all posts in this thread on one page
Posted by [email protected] at Oct 17, 2012, 2:46:30 PM
How to import furniture in Applet
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

Posted by Puybaret at Oct 17, 2012, 8:11:23 PM
Re: How to import furniture in Applet
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

Posted by [email protected] at Oct 18, 2012, 6:11:35 AM
Re: How to import furniture in Applet
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

Posted by Puybaret at Oct 18, 2012, 8:22:50 AM
Re: How to import furniture in Applet
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

Posted by [email protected] at Oct 19, 2012, 4:44:51 AM
Re: How to import furniture in Applet
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