Ignore:
Timestamp:
08/31/16 00:56:52 (9 years ago)
Author:
dlcheng
Message:

CHG (JS): Transform matrices rework improvements and switch to using meters as base units. Separating translaton center and rotation/scale pivot. Adding seperate rendering options for sky, space, and ground under "render" option, replacing "atmosphere". Updating plotdoc. Adding in modifyZoom function for UI interfacing with canvas.zoom. Adding printNodes function for debugging node attributes.

File:
1 edited

Legend:

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

    r21138 r21173  
    6161        var node = Node(gl,options);
    6262        canvas.nodes[canvas.nodes.length] = node;
    63         scale = 1;
     63        node["name"] = "mesh";
    6464        node["shaderName"] = "Colored";
    6565        node["shader"] = gl["shaders"][node["shaderName"]];
    6666        node["lineWidth"] = options.getfieldvalue('linewidth',1);
    67         node["scale"] = [scale, scale, scale * matrixscale];
    68         node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (2 / scale)];
     67        node["scale"] = [1, 1, matrixscale];
     68        node["rotation"] = [-90, 0, 0];
     69        node["translation"] = [(xmin + xmax) / 2, (ymin + ymax) / 2, (zmin + zmax) / 2];
     70        node["center"] = [(xmin + xmax) / 2, (ymin + ymax) / 2, (zmin + zmax) / 2];
    6971        node["modelMatrix"] = recalculateModelMatrix(node);
    7072        node["drawMode"] = gl.LINES;
Note: See TracChangeset for help on using the changeset viewer.