For example, if you try with [font=courier new]Contributions.sh3t[/font] available here saved in SweetHome3DJS root folder and Tomcat installation folder in [font=courier new]/Applications/apache-tomcat-9.0.41[/font], the following PropertiesToJson command will extract .json and texture image files :
Code: Select all
java -cp tools/json/lib/json-20190722.jar:tools/json/src com.eteks.sweethome3d.json.PropertiesToJson . Contributions.sh3t /Applications/apache-tomcat-9.0.41/webapps/SweetHome3DJS-7.1/lib/resources Contributions /Applications/apache-tomcat-9.0.41/webapps/SweetHome3DJS-7.1/lib/resources/textures/Contributions lib/resources/textures/Contributions trueThen, adding the Contributions library to the configuration of JavaScript [font=courier new]application[/font] in [font=courier new]index.jsp[/font] will give:
Code: Select all
var application = new SweetHome3DJSApplication(
{furnitureCatalogURLs: [urlBase + "/lib/resources/DefaultFurnitureCatalog.json",
urlBase + "/lib/resources/BlendSwap-CC-0.json"],
furnitureResourcesURLBase: urlBase + "/",
texturesCatalogURLs: [urlBase + "/lib/resources/DefaultTexturesCatalog.json",
urlBase + "/lib/resources/Contributions.json"],
texturesResourcesURLBase: urlBase + "/",
readHomeURL: urlBase + "/readHome.jsp?home=%s",Code: Select all
serverUserPreferences = new ServerUserPreferences(
new URL [] {new URL(serverBaseUrl, "lib/resources/DefaultFurnitureCatalog.json"),
new URL(serverBaseUrl, "lib/resources/BlendSwap-CC-0.json")}, serverBaseUrl,
new URL [] {new URL(serverBaseUrl, "lib/resources/DefaultTexturesCatalog.json"),
new URL(serverBaseUrl, "lib/resources/Contributions.json")}, serverBaseUrl);