| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 value = 'effect : "' + (value ? value.name : 'NULL') + '"'; | 309 value = 'effect : "' + (value ? value.name : 'NULL') + '"'; |
| 310 } else if (param.isAClassName('o3d.ParamState')) { | 310 } else if (param.isAClassName('o3d.ParamState')) { |
| 311 value = param.value; | 311 value = param.value; |
| 312 value = 'state : "' + (value ? value.name : 'NULL') + '"'; | 312 value = 'state : "' + (value ? value.name : 'NULL') + '"'; |
| 313 } else if (param.isAClassName('o3d.ParamTransform')) { | 313 } else if (param.isAClassName('o3d.ParamTransform')) { |
| 314 value = param.value; | 314 value = param.value; |
| 315 value = 'transform : "' + (value ? value.name : 'NULL') + '"'; | 315 value = 'transform : "' + (value ? value.name : 'NULL') + '"'; |
| 316 } else if (param.isAClassName('o3d.ParamDrawList')) { | 316 } else if (param.isAClassName('o3d.ParamDrawList')) { |
| 317 value = param.value; | 317 value = param.value; |
| 318 value = 'drawlist : "' + (value ? value.name : 'NULL') + '"'; | 318 value = 'drawlist : "' + (value ? value.name : 'NULL') + '"'; |
| 319 } else if (param.isAClassName('o3d.ParamRenderSurface')) { |
| 320 value = param.value; |
| 321 value = 'renderSurface : "' + (value ? value.name : 'NULL') + '"'; |
| 322 } else if (param.isAClassName('o3d.ParamRenderDepthStencilSurface')) { |
| 323 value = param.value; |
| 324 value = 'renderDepthStencilSurface: "' + (value ? value.name : 'NULL') + |
| 325 '"'; |
| 319 } else if (param.isAClassName('o3d.ParamDrawContext')) { | 326 } else if (param.isAClassName('o3d.ParamDrawContext')) { |
| 320 value = param.value; | 327 value = param.value; |
| 321 value = 'drawcontext : "' + (value ? value.name : 'NULL') + '"'; | 328 value = 'drawcontext : "' + (value ? value.name : 'NULL') + '"'; |
| 322 } | 329 } |
| 323 | 330 |
| 324 return value; | 331 return value; |
| 325 }; | 332 }; |
| 326 | 333 |
| 327 /** | 334 /** |
| 328 * Dumps an single parameter | 335 * Dumps an single parameter |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 * Dumps an entire RenderGraph tree. | 576 * Dumps an entire RenderGraph tree. |
| 570 * @param {!o3d.RenderNode} render_node RenderNode to start dumping from. | 577 * @param {!o3d.RenderNode} render_node RenderNode to start dumping from. |
| 571 * @param {string} opt_prefix Optional prefix for indenting. | 578 * @param {string} opt_prefix Optional prefix for indenting. |
| 572 */ | 579 */ |
| 573 o3djs.dump.dumpRenderNodeTree = function(render_node, opt_prefix) { | 580 o3djs.dump.dumpRenderNodeTree = function(render_node, opt_prefix) { |
| 574 opt_prefix = opt_prefix || ''; | 581 opt_prefix = opt_prefix || ''; |
| 575 | 582 |
| 576 o3djs.dump.dumpRenderNode(render_node, opt_prefix); | 583 o3djs.dump.dumpRenderNode(render_node, opt_prefix); |
| 577 | 584 |
| 578 var child_prefix = opt_prefix + ' '; | 585 var child_prefix = opt_prefix + ' '; |
| 579 var children = render_node.children; | 586 // Get the list of children sorted by priority. |
| 587 var children = render_node.children.sort(function(a, b) { |
| 588 return a.priority - b.priority; |
| 589 }); |
| 580 for (var c = 0; c < children.length; c++) { | 590 for (var c = 0; c < children.length; c++) { |
| 581 o3djs.dump.dumpRenderNodeTree(children[c], child_prefix); | 591 o3djs.dump.dumpRenderNodeTree(children[c], child_prefix); |
| 582 } | 592 } |
| 583 }; | 593 }; |
| 584 | 594 |
| 585 /** | 595 /** |
| 586 * Dumps a javascript stack track. | 596 * Dumps a javascript stack track. |
| 587 */ | 597 */ |
| 588 o3djs.dump.dumpStackTrace = function() { | 598 o3djs.dump.dumpStackTrace = function() { |
| 589 o3djs.dump.dump('Stack trace:\n'); | 599 o3djs.dump.dump('Stack trace:\n'); |
| 590 var nextCaller = arguments.callee.caller; | 600 var nextCaller = arguments.callee.caller; |
| 591 while (nextCaller) { | 601 while (nextCaller) { |
| 592 o3djs.dump.dump(o3djs.dump.getSignature_(nextCaller) + '\n'); | 602 o3djs.dump.dump(o3djs.dump.getSignature_(nextCaller) + '\n'); |
| 593 nextCaller = nextCaller.caller; | 603 nextCaller = nextCaller.caller; |
| 594 } | 604 } |
| 595 o3djs.dump.dump('\n\n'); | 605 o3djs.dump.dump('\n\n'); |
| 596 }; | 606 }; |
| 597 | 607 |
| OLD | NEW |