source: issm/oecreview/Archive/19101-20495/ISSM-19872-19873.diff

Last change on this file was 20498, checked in by Mathieu Morlighem, 9 years ago

CHG: done with Archive/19101-20495

File size: 3.4 KB
  • ../trunk-jpl/src/m/plot/plot_unit.js

     
    5353        node["rotation"] = options.getfieldvalue('view',[0,0,0]);
    5454        node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)];
    5555        node["modelMatrix"] = recalculateModelMatrix(node);
     56        node["alpha"] = options.getfieldvalue('alpha',1.0);
     57        node["overlay"] = true;
     58        node["drawOrder"] = 0;
     59               
    5660        //some defaults:
    5761        texcoords.itemSize = 2;
    5862
  • ../trunk-jpl/src/m/plot/plot_overlay.js

     
    2626        //}}}
    2727
    2828        //Compute coordinates and data range:
    29         var xlim = options.getfieldvalue('xlim',[ArrayMin(x),ArrayMax(x)]);
    30         var ylim = options.getfieldvalue('ylim',[ArrayMin(y),ArrayMax(y)]);
    31         var zlim = options.getfieldvalue('zlim',[ArrayMin(z),ArrayMax(z)]);
     29        var modelxlim = [ArrayMin(x),ArrayMax(x)];
     30        var modelylim = [ArrayMin(y),ArrayMax(y)];
     31        var modelzlim = [ArrayMin(z),ArrayMax(z)];
     32        var xlim = options.getfieldvalue('xlim',modelxlim);
     33        var ylim = options.getfieldvalue('ylim',modelylim);
     34        var zlim = options.getfieldvalue('zlim',modelzlim);
    3235        xmin = xlim[0];
    3336        xmax = xlim[1];
    3437        ymin = ylim[0];
     
    4548        node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)];
    4649        node["modelMatrix"] = recalculateModelMatrix(node);
    4750        node["texture"] = initTexture(gl,options.getfieldvalue('image','images/penguin.png'));
    48         node["alpha"] = options.getfieldvalue('alpha',1.0);
    49         node["overlay"] = true;
     51        //node["alpha"] = options.getfieldvalue('alpha',1.0);
     52        node["overlay"] = false;
     53        node["drawOrder"] = 1;
    5054                               
    5155        //some defaults:
    5256        texcoords.itemSize = 2;
  • ../trunk-jpl/src/m/plot/plot_mesh.js

     
    4242        node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)];
    4343        node["modelMatrix"] = recalculateModelMatrix(node);
    4444        node["drawMode"] = gl.LINES;
     45        //node["alpha"] = options.getfieldvalue('alpha',1.0);
     46        node["overlay"] = false;
     47        node["drawOrder"] = 0;
    4548                               
    4649        //some defaults:
    4750        colors.itemSize = 4;
  • ../trunk-jpl/src/m/plot/webgl.js

     
    120120                modelMatrix:mat4.create(),
    121121                shaderName:"colored",
    122122                overlay:false,
     123                drawOrder:0,
    123124        };
    124125} //}}}
    125126function recalculateModelMatrix(node) { //{{{
     
    368369
    369370        window.requestAnimationFrame(function(time) {draw(gl,options,canvas,nodes)});
    370371        updateCameraMatrix(canvas);
    371         for (var node in nodes) {
    372                 drawSceneGraphNode(gl, canvas, nodes[node]);
     372        var drawPassNumber = 2;
     373        for (var i = drawPassNumber - 1; i >= 0; i--) {
     374                for (var node in nodes) {
     375                        if (nodes[node]["drawOrder"] == i) {
     376                                drawSceneGraphNode(gl, canvas, nodes[node]);
     377                        }
     378                }
    373379        }
    374380} //}}}
    375381//}}}
Note: See TracBrowser for help on using the repository browser.