智慧水务管理系统 - 精河县供水工程综合管理平台

FrustumCommands.js 764B

1234567891011121314151617181920212223242526272829
  1. import Pass from "../Renderer/Pass.js";
  2. /**
  3. * Defines a list of commands whose geometry are bound by near and far distances from the camera.
  4. * @alias FrustumCommands
  5. * @constructor
  6. *
  7. * @param {number} [near=0.0] The lower bound or closest distance from the camera.
  8. * @param {number} [far=0.0] The upper bound or farthest distance from the camera.
  9. *
  10. * @private
  11. */
  12. function FrustumCommands(near, far) {
  13. this.near = near ?? 0.0;
  14. this.far = far ?? 0.0;
  15. const numPasses = Pass.NUMBER_OF_PASSES;
  16. const commands = new Array(numPasses);
  17. const indices = new Array(numPasses);
  18. for (let i = 0; i < numPasses; ++i) {
  19. commands[i] = [];
  20. indices[i] = 0;
  21. }
  22. this.commands = commands;
  23. this.indices = indices;
  24. }
  25. export default FrustumCommands;