|
1378 | 1378 | var i1 = handle.i1, i2 = handle.i2, j1 = handle.j1, j2 = handle.j2, |
1379 | 1379 | i, j, x1, x2, y1, y2, binz, reduced, nobottom, notop, |
1380 | 1380 | main = this.main_painter(), |
1381 | | - split_faces = ((this.options.Lego === 11) || (this.options.Lego === 13)) && (this.GetObject().fFillColor<2); // split each layer on two parts |
1382 | | - |
| 1381 | + histo = this.GetObject(), |
| 1382 | + split_faces = (this.options.Lego === 11) || (this.options.Lego === 13); // split each layer on two parts |
1383 | 1383 |
|
1384 | 1384 | if ((i1 >= i2) || (j1 >= j2)) return; |
1385 | 1385 |
|
|
1511 | 1511 | geometry.addAttribute( 'normal', new THREE.BufferAttribute( normals, 3 ) ); |
1512 | 1512 | // geometry.computeVertexNormals(); |
1513 | 1513 |
|
1514 | | - var rootcolor = this.GetObject().fFillColor, |
| 1514 | + var rootcolor = histo.fFillColor, |
1515 | 1515 | fcolor = JSROOT.Painter.root_colors[rootcolor]; |
1516 | 1516 |
|
1517 | 1517 | if (palette) { |
|
1570 | 1570 | //geom2.computeVertexNormals(); |
1571 | 1571 |
|
1572 | 1572 | //var material2 = new THREE.MeshLambertMaterial( { color: 0xFF0000 } ); |
1573 | | - var material2 = new THREE.MeshBasicMaterial( { color: 0xFF0000, shading: THREE.SmoothShading } ); |
| 1573 | + |
| 1574 | + var color2 = (rootcolor<2) ? new THREE.Color(0xFF0000) : |
| 1575 | + new THREE.Color(d3.rgb(fcolor).darker(0.5).toString()); |
| 1576 | + |
| 1577 | + var material2 = new THREE.MeshBasicMaterial( { color: color2, shading: THREE.SmoothShading } ); |
1574 | 1578 |
|
1575 | 1579 | var mesh2 = new THREE.Mesh(geom2, material2); |
1576 | 1580 | mesh2.bins_index = indx2; |
|
1674 | 1678 | if (uselineindx) |
1675 | 1679 | geometry.setIndex(new THREE.BufferAttribute(lindicies, 1)); |
1676 | 1680 |
|
1677 | | - var lcolor = JSROOT.Painter.root_colors[this.GetObject().fLineColor]; |
| 1681 | + var lcolor = JSROOT.Painter.root_colors[histo.fLineColor]; |
1678 | 1682 |
|
1679 | 1683 | material = new THREE.LineBasicMaterial({ color: new THREE.Color(lcolor) }); |
1680 | | - if (!JSROOT.browser.isIE) material.linewidth = this.GetObject().fLineWidth; |
| 1684 | + if (!JSROOT.browser.isIE) material.linewidth = histo.fLineWidth; |
1681 | 1685 | var line = new THREE.LineSegments(geometry, material); |
1682 | 1686 |
|
1683 | 1687 | /* |
|
1976 | 1980 | geometry.computeVertexNormals(); |
1977 | 1981 | if (donormals && (lvl===1)) RecalculateNormals(geometry.getAttribute('normal').array); |
1978 | 1982 |
|
1979 | | - |
1980 | 1983 | var fcolor, material; |
1981 | 1984 | if (docolorfaces) { |
1982 | 1985 | fcolor = this.getIndexColor(lvl); |
|
0 commit comments