Changeset 20208


Ignore:
Timestamp:
02/17/16 17:49:26 (9 years ago)
Author:
dlcheng
Message:

CHG (javascript): Correcting translation transforms and removing debug statement.

Location:
issm/trunk-jpl/src/m/plot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/plot_mesh.js

    r20205 r20208  
    4949        node["shader"] = gl["shaders"][node["shaderName"]]["program"];
    5050        node["scale"] = [scale, scale, scale*options.getfieldvalue('heightscale',1)];
    51         node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)];
     51        node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (2 / scale)];
    5252        node["modelMatrix"] = recalculateModelMatrix(node);
    5353        node["drawMode"] = gl.LINES;
  • issm/trunk-jpl/src/m/plot/plot_overlay.js

    r20207 r20208  
    5050        node["shader"] = gl["shaders"][node["shaderName"]]["program"];
    5151        node["scale"] = [scale, scale, scale*options.getfieldvalue('heightscale',1)];
    52         node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)];
     52        node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (2 / scale)];
    5353        node["modelMatrix"] = recalculateModelMatrix(node);
    5454        node["texture"] = initTexture(gl,options.getfieldvalue('image'));
  • issm/trunk-jpl/src/m/plot/plot_unit.js

    r20207 r20208  
    5757        node["shader"] = gl["shaders"][node["shaderName"]]["program"];
    5858        node["scale"] = [scale, scale, scale*options.getfieldvalue('heightscale',1)];
    59         node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)];
     59        node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (2 / scale)];
    6060        node["modelMatrix"] = recalculateModelMatrix(node);
    6161        node["alpha"] = options.getfieldvalue('alpha',1.0);
     
    9090                                datamax = caxis[1];
    9191                                datadelta = datamax - datamin;
    92                                 console.log(datadelta, caxis);
    9392
    9493                                vertices.itemSize = 3;
Note: See TracChangeset for help on using the changeset viewer.