Skip to content
Snippets Groups Projects
Commit f38118b8 authored by Bertrand Bellenot's avatar Bertrand Bellenot
Browse files

- Add contribution from Chun-Wei SHEN (waynesan@twgrid.org) for 3D wireframe...

- Add contribution from Chun-Wei SHEN (waynesan@twgrid.org) for 3D wireframe display of TH3 and TH2 (lego plot) using the three.js library
- Added box geometry and material, bin color, lighting, shading, picking, and automatic detection of WebGL capability of the browser for optimized rendering
- Added feedback for 2D and 3D histograms (highlighting and tooltips)
- Added a root file containing a TH3 (as 3D TH3 demo)

Note: It is highly recommended to use a WebGL enabled browser to manipulate 3D objects. And in particular Google Chrome, which is by far the fastest one (for the time being)
When WebGL is not available, the fallback solution uses canvas (e.g. with IE, or on iOS) which is good enough to display 3D objects, but too slow to manipulate them


git-svn-id: http://root.cern.ch/svn/root/trunk@49247 27541ba8-7e3a-0410-8455-c3a389f83636
parent 1a2689ab
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -22,9 +22,10 @@ ...@@ -22,9 +22,10 @@
<option value = " " selected = "selected">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option> <option value = " " selected = "selected">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
<option value = "files/ct.root">ct.root</option> <option value = "files/ct.root">ct.root</option>
<option value = "files/exclusion.root">exclusion.root</option> <option value = "files/exclusion.root">exclusion.root</option>
<option value = "files/hsimple.root">hsimple.root</option>
<option value = "files/fillrandom.root">fillrandom.root</option> <option value = "files/fillrandom.root">fillrandom.root</option>
<option value = "files/glbox.root">glbox.root</option>
<option value = "files/graph.root">graph.root</option> <option value = "files/graph.root">graph.root</option>
<option value = "files/hsimple.root">hsimple.root</option>
<option value = "files/legends.root">legends.root</option> <option value = "files/legends.root">legends.root</option>
<option value = "files/rf107.root">rf107.root</option> <option value = "files/rf107.root">rf107.root</option>
<option value = "files/stacks.root">stacks.root</option> <option value = "files/stacks.root">stacks.root</option>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</head> </head>
<body onload="BuildSimpleGUI()"> <body onload="BuildSimpleGUI()">
<div id="simpleGUI" files="files/ct.root;files/exclusion.root;files/hsimple.root;files/fillrandom.root;files/graph.root;files/legends.root;files/rf107.root;files/stacks.root;files/zdemo.root"></div> <div id="simpleGUI" files="files/ct.root;files/exclusion.root;files/fillrandom.root;files/glbox.root;files/graph.root;files/hsimple.root;files/legends.root;files/rf107.root;files/stacks.root;files/zdemo.root"></div>
</body> </body>
......
This diff is collapsed.
...@@ -160,6 +160,7 @@ function displayTree(tree, cycle, node_id) { ...@@ -160,6 +160,7 @@ function displayTree(tree, cycle, node_id) {
function displayObject(obj, cycle, idx) { function displayObject(obj, cycle, idx) {
if (!obj['_typename'].match(/\bJSROOTIO.TH1/) && if (!obj['_typename'].match(/\bJSROOTIO.TH1/) &&
!obj['_typename'].match(/\bJSROOTIO.TH2/) && !obj['_typename'].match(/\bJSROOTIO.TH2/) &&
!obj['_typename'].match(/\bJSROOTIO.TH3/) &&
!obj['_typename'].match(/\bJSROOTIO.TGraph/) && !obj['_typename'].match(/\bJSROOTIO.TGraph/) &&
!obj['_typename'].match(/\bRooHist/) && !obj['_typename'].match(/\bRooHist/) &&
!obj['_typename'].match(/\RooCurve/) && !obj['_typename'].match(/\RooCurve/) &&
...@@ -191,6 +192,7 @@ function displayMappedObject(obj_name, list_name, offset) { ...@@ -191,6 +192,7 @@ function displayMappedObject(obj_name, list_name, offset) {
} }
if (!obj['_typename'].match(/\bJSROOTIO.TH1/) && if (!obj['_typename'].match(/\bJSROOTIO.TH1/) &&
!obj['_typename'].match(/\bJSROOTIO.TH2/) && !obj['_typename'].match(/\bJSROOTIO.TH2/) &&
!obj['_typename'].match(/\bJSROOTIO.TH3/) &&
!obj['_typename'].match(/\bJSROOTIO.TGraph/) && !obj['_typename'].match(/\bJSROOTIO.TGraph/) &&
!obj['_typename'].match(/\bRooHist/) && !obj['_typename'].match(/\bRooHist/) &&
!obj['_typename'].match(/\RooCurve/) && !obj['_typename'].match(/\RooCurve/) &&
...@@ -216,9 +218,12 @@ function AssertPrerequisites(andThen) { ...@@ -216,9 +218,12 @@ function AssertPrerequisites(andThen) {
loadScript('http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js', function() { loadScript('http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js', function() {
loadScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js', function() { loadScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js', function() {
loadScript('http://d3js.org/d3.v2.min.js', function() { loadScript('http://d3js.org/d3.v2.min.js', function() {
loadScript(source_dir+'scripts/jquery.mousewheel.js', function() {
loadScript(source_dir+'scripts/dtree.js', function() { loadScript(source_dir+'scripts/dtree.js', function() {
loadScript(source_dir+'scripts/rawinflate.js', function() { loadScript(source_dir+'scripts/rawinflate.js', function() {
loadScript(source_dir+'scripts/JSRootCore.js', function() { loadScript(source_dir+'scripts/JSRootCore.js', function() {
loadScript(source_dir+'scripts/three.min.js', function() {
loadScript(source_dir+'fonts/helvetiker_regular.typeface.js', function() {
loadScript(source_dir+'scripts/JSRootD3Painter.js', function() { loadScript(source_dir+'scripts/JSRootD3Painter.js', function() {
loadScript(source_dir+'scripts/JSRootIOEvolution.js', function() { loadScript(source_dir+'scripts/JSRootIOEvolution.js', function() {
if (andThen) { if (andThen) {
...@@ -235,7 +240,7 @@ function AssertPrerequisites(andThen) { ...@@ -235,7 +240,7 @@ function AssertPrerequisites(andThen) {
$(version).prependTo("body"); $(version).prependTo("body");
} }
$('#report').addClass("ui-accordion ui-accordion-icons ui-widget ui-helper-reset"); $('#report').addClass("ui-accordion ui-accordion-icons ui-widget ui-helper-reset");
}) }) }) }) }) }) }) }); }) }) }) }) }) }) }) }) }) }) });
return true; return true;
} }
return false; return false;
......
...@@ -159,4 +159,32 @@ button.closeButton { ...@@ -159,4 +159,32 @@ button.closeButton {
overflow: hidden; overflow: hidden;
} }
/*--------------------------------------------------|
| tooltip style |
|--------------------------------------------------*/
#tt {
position:absolute;
display:block;
}
#tttop {
display:block;
height:5px;
margin-left:5px;
overflow:hidden;
}
#ttcont {
display:block;
padding:2px 12px 3px 7px;
margin-left:5px;
font-size: 11px;
background:#777;
color:#fff;
}
#ttbot {
display:block;
height:5px;
margin-left:5px;
overflow:hidden;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment