source:
issm/oecreview/Archive/19101-20495/ISSM-19872-19873.diff@
20498
Last change on this file since 20498 was 20498, checked in by , 9 years ago | |
---|---|
File size: 3.4 KB |
-
../trunk-jpl/src/m/plot/plot_unit.js
53 53 node["rotation"] = options.getfieldvalue('view',[0,0,0]); 54 54 node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)]; 55 55 node["modelMatrix"] = recalculateModelMatrix(node); 56 node["alpha"] = options.getfieldvalue('alpha',1.0); 57 node["overlay"] = true; 58 node["drawOrder"] = 0; 59 56 60 //some defaults: 57 61 texcoords.itemSize = 2; 58 62 -
../trunk-jpl/src/m/plot/plot_overlay.js
26 26 //}}} 27 27 28 28 //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); 32 35 xmin = xlim[0]; 33 36 xmax = xlim[1]; 34 37 ymin = ylim[0]; … … 45 48 node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)]; 46 49 node["modelMatrix"] = recalculateModelMatrix(node); 47 50 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; 50 54 51 55 //some defaults: 52 56 texcoords.itemSize = 2; -
../trunk-jpl/src/m/plot/plot_mesh.js
42 42 node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)]; 43 43 node["modelMatrix"] = recalculateModelMatrix(node); 44 44 node["drawMode"] = gl.LINES; 45 //node["alpha"] = options.getfieldvalue('alpha',1.0); 46 node["overlay"] = false; 47 node["drawOrder"] = 0; 45 48 46 49 //some defaults: 47 50 colors.itemSize = 4; -
../trunk-jpl/src/m/plot/webgl.js
120 120 modelMatrix:mat4.create(), 121 121 shaderName:"colored", 122 122 overlay:false, 123 drawOrder:0, 123 124 }; 124 125 } //}}} 125 126 function recalculateModelMatrix(node) { //{{{ … … 368 369 369 370 window.requestAnimationFrame(function(time) {draw(gl,options,canvas,nodes)}); 370 371 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 } 373 379 } 374 380 } //}}} 375 381 //}}}
Note:
See TracBrowser
for help on using the repository browser.