view Resources/CMake/3dhop-4.3.patch @ 70:a5c1be2ec26a

new configuration option: STL.3DHOP.CanvasStyle
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 04 Oct 2024 17:12:49 +0200
parents b798387b085c
children
line wrap: on
line source

diff -urEb 3dhop.orig/3DHOP_all_tools.html 3dhop/3DHOP_all_tools.html
--- 3dhop.orig/3DHOP_all_tools.html	2024-10-04 15:38:25.961879494 +0200
+++ 3dhop/3DHOP_all_tools.html	2024-10-04 15:39:42.273297957 +0200
@@ -101,11 +101,30 @@
  </div>
 <!--SECTIONS-->
 
- <canvas id="draw-canvas" style="background-image: url(skins/backgrounds/light.jpg)"/>
+ <canvas id="draw-canvas" style="${{CANVAS_STYLE}}"/>
 </div>
 </body>
 
 <script type="text/javascript">
+// http://stackoverflow.com/a/21903119/881731
+function GetUrlParameter(sParam)
+{
+  var sPageURL = decodeURIComponent(window.location.search.substring(1));
+  var sURLVariables = sPageURL.split('&');
+
+  for (var i = 0; i < sURLVariables.length; i++) {
+    var sParameterName = sURLVariables[i].split('=');
+
+    if (sParameterName[0] === sParam) {
+      return sParameterName[1] === undefined ? '' : sParameterName[1];
+    }
+  }
+
+  return '';
+};
+
+var instanceId = GetUrlParameter('instance');
+
 var presenter = null;
 
 function setup3dhop() {
@@ -113,7 +132,7 @@
 
 	presenter.setScene({
 		meshes: {
-			"mesh_1" : { url: "models/gargo.nxz" }
+			"mesh_1" : { url: "../3dhop-instances/" + instanceId + ".nxz" }
 		},
 		modelInstances : {
 			"model_1" : { 
Only in 3dhop: 3DHOP_all_tools.html~