Changeset 20585
- Timestamp:
- 04/30/16 18:46:15 (9 years ago)
- Location:
- issm/trunk-jpl/src/m/plot
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/plot_mesh.js
r20584 r20585 64 64 node["drawMode"] = gl.LINES; 65 65 node["drawOrder"] = 0; 66 node["maskEnabled"] = options. exist('mask');67 node["maskHeight"] = options.getfieldvalue(' maskheight',150.0)*options.getfieldvalue('heightscale',1);68 node["maskColor"] = options.getfieldvalue(' maskcolor',[0.0,0.0,1.0,1.0]);66 node["maskEnabled"] = options.getfieldvalue('innermask','off') == 'on'; 67 node["maskHeight"] = options.getfieldvalue('innermaskheight',150.0)*options.getfieldvalue('heightscale',1); 68 node["maskColor"] = options.getfieldvalue('innermaskcolor',[0.0,0.0,1.0,1.0]); 69 69 70 70 //some defaults: … … 73 73 //retrieve some options 74 74 var linewidth=options.getfieldvalue('linewidth',1); 75 var edgecolor=options.getfieldvalue('edgecolor','black'); 75 var edgecolor=new RGBColor(options.getfieldvalue('edgecolor','black')); 76 if (edgecolor.ok) edgecolor = [edgecolor.r/255.0, edgecolor.g/255.0, edgecolor.b/255.0, 1.0]; 77 else throw Error(sprintf("s%s%s\n","initWebGL error message: cound not find out edgecolor color for curent canvas ",canvas)); 76 78 77 79 //node plot {{{ … … 86 88 var vertex = vec3.create(); 87 89 var magnitude; 88 var color = [0.0, 0.0, 0.0, 1.0];90 var color = edgecolor; 89 91 for(var i = 0; i < x.length; i++){ 90 92 //Check for NaN values and remove from indices array as necessary, but preserve vertex array spacing -
issm/trunk-jpl/src/m/plot/plot_quiver.js
r20584 r20585 68 68 node["useIndexBuffer"] = false; 69 69 node["drawOrder"] = 0; 70 node["maskEnabled"] = options. exist('mask');71 node["maskHeight"] = options.getfieldvalue(' maskheight',150.0)*options.getfieldvalue('heightscale',1);72 node["maskColor"] = options.getfieldvalue(' maskcolor',[0.0,0.0,1.0,1.0]);70 node["maskEnabled"] = options.getfieldvalue('innermask','off') == 'on'; 71 node["maskHeight"] = options.getfieldvalue('innermaskheight',150.0)*options.getfieldvalue('heightscale',1); 72 node["maskColor"] = options.getfieldvalue('innermaskcolor',[0.0,0.0,1.0,1.0]); 73 73 74 74 //some defaults: … … 77 77 //retrieve some options 78 78 var linewidth=options.getfieldvalue('linewidth',1); 79 var edgecolor=options.getfieldvalue('edgecolor',[0.0,0.0,0.0,1.0]); //have RGBColor switch with array color? 80 //var edgecolor=options.getfieldvalue('edgecolor','black'); //have RGBColor switch with array color? 79 80 var edgecolor=new RGBColor(options.getfieldvalue('edgecolor','black')); 81 if (edgecolor.ok) edgecolor = [edgecolor.r/255.0, edgecolor.g/255.0, edgecolor.b/255.0, 1.0]; 82 else throw Error(sprintf("s%s%s\n","initWebGL error message: cound not find out edgecolor color for curent canvas ",canvas)); 81 83 82 84 //node plot {{{ … … 105 107 106 108 xyz2 = vec3.fromValues(vx[i], vy[i], 0.0); 107 magnitude = 1000 00.0; //mesh resolution109 magnitude = 1000.0; //mesh resolution 108 110 vec3.normalize(direction, xyz2); 109 111 vec3.scale(direction, direction, magnitude); -
issm/trunk-jpl/src/m/plot/plot_unit.js
r20584 r20585 175 175 for(var i = 0; i < x.length; i++){ 176 176 //Check for NaN values and remove from indices array as necessary, but preserve vertex array spacing 177 if (isNaN(x[i]) || isNaN(y[i]) || isNaN(z[i]) || isNaN(data[i] )) {177 if (isNaN(x[i]) || isNaN(y[i]) || isNaN(z[i]) || isNaN(data[i][0])) { 178 178 nanindices[i] = i; 179 179 vertices[vertices.length] = vertex[0]; -
issm/trunk-jpl/src/m/plot/webgl.js
r20584 r20585 498 498 var gl = canvas.gl; 499 499 var backgroundcolor = new RGBColor(options.getfieldvalue('backgroundcolor','lightcyan')); 500 if(backgroundcolor.ok){ 501 gl.clearColor(backgroundcolor.r/255.0, backgroundcolor.g/255.0, backgroundcolor.b/255.0, 1.0); 502 } 500 if (backgroundcolor.ok) gl.clearColor(backgroundcolor.r/255.0, backgroundcolor.g/255.0, backgroundcolor.b/255.0, 1.0); 503 501 else throw Error(sprintf("s%s%s\n","initWebGL error message: cound not find out background color for curent canvas ",canvas)); 504 502
Note:
See TracChangeset
for help on using the changeset viewer.