santhosh.r@20technologies.com
Newbie
Joined: Oct 15, 2012
Post Count: 3
Status:
Offline
|
|
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
|
[Oct 18, 2012, 6:11:35 AM]
|
|
[Link]
|
|