diff Resources/CMake/3dhop-4.3.patch @ 62:b798387b085c

added 3DHOP viewer version 4.3
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 15 Jun 2024 16:08:52 +0200
parents
children a5c1be2ec26a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/CMake/3dhop-4.3.patch	Sat Jun 15 16:08:52 2024 +0200
@@ -0,0 +1,38 @@
+diff -urEb 3dhop.orig/3DHOP_all_tools.html 3dhop/3DHOP_all_tools.html
+--- 3dhop.orig/3DHOP_all_tools.html	2024-06-15 15:43:28.329045772 +0200
++++ 3dhop/3DHOP_all_tools.html	2024-06-15 15:50:04.629862005 +0200
+@@ -106,6 +106,25 @@
+ </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" : {