936a458df8c410426dcbc8860ee5a32e64530057.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. System.register(["__unresolved_0", "cc", "__unresolved_1", "cc/env"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, assert, Component, BuiltinPipelineSettings, EDITOR, _dec, _dec2, _dec3, _class, _crd, ccclass, disallowMultiple, executeInEditMode, menu, requireComponent, BuiltinPipelinePassBuilder;
  4. function _reportPossibleCrUseOfBuiltinPipelineSettings(extras) {
  5. _reporterNs.report("BuiltinPipelineSettings", "./builtin-pipeline-settings", _context.meta, extras);
  6. }
  7. function _reportPossibleCrUseOfPipelineSettings(extras) {
  8. _reporterNs.report("PipelineSettings2", "./builtin-pipeline", _context.meta, extras);
  9. }
  10. return {
  11. setters: [function (_unresolved_) {
  12. _reporterNs = _unresolved_;
  13. }, function (_cc) {
  14. _cclegacy = _cc.cclegacy;
  15. __checkObsolete__ = _cc.__checkObsolete__;
  16. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  17. _decorator = _cc._decorator;
  18. assert = _cc.assert;
  19. Component = _cc.Component;
  20. }, function (_unresolved_2) {
  21. BuiltinPipelineSettings = _unresolved_2.BuiltinPipelineSettings;
  22. }, function (_ccEnv) {
  23. EDITOR = _ccEnv.EDITOR;
  24. }],
  25. execute: function () {
  26. _crd = true;
  27. _cclegacy._RF.push({}, "6f940g8/JJDi6Fbog7GFmbH", "builtin-pipeline-pass", undefined);
  28. /*
  29. Copyright (c) 2021-2024 Xiamen Yaji Software Co., Ltd.
  30. https://www.cocos.com/
  31. Permission is hereby granted, free of charge, to any person obtaining a copy
  32. of this software and associated documentation files (the "Software"), to deal
  33. in the Software without restriction, including without limitation the rights to
  34. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  35. of the Software, and to permit persons to whom the Software is furnished to do so,
  36. subject to the following conditions:
  37. The above copyright notice and this permission notice shall be included in
  38. all copies or substantial portions of the Software.
  39. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  40. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  41. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  42. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  43. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  44. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  45. THE SOFTWARE.
  46. */
  47. __checkObsolete__(['_decorator', 'assert', 'Component', 'rendering']);
  48. ({
  49. ccclass,
  50. disallowMultiple,
  51. executeInEditMode,
  52. menu,
  53. requireComponent
  54. } = _decorator);
  55. _export("BuiltinPipelinePassBuilder", BuiltinPipelinePassBuilder = (_dec = ccclass('BuiltinPipelinePassBuilder'), _dec2 = menu('Rendering/BuiltinPipelinePassBuilder'), _dec3 = requireComponent(_crd && BuiltinPipelineSettings === void 0 ? (_reportPossibleCrUseOfBuiltinPipelineSettings({
  56. error: Error()
  57. }), BuiltinPipelineSettings) : BuiltinPipelineSettings), _dec(_class = _dec2(_class = _dec3(_class = disallowMultiple(_class = executeInEditMode(_class = class BuiltinPipelinePassBuilder extends Component {
  58. constructor() {
  59. super(...arguments);
  60. this._parent = void 0;
  61. this._settings = void 0;
  62. }
  63. getConfigOrder() {
  64. return 0;
  65. }
  66. getRenderOrder() {
  67. return 200;
  68. }
  69. onEnable() {
  70. this._parent = this.getComponent(_crd && BuiltinPipelineSettings === void 0 ? (_reportPossibleCrUseOfBuiltinPipelineSettings({
  71. error: Error()
  72. }), BuiltinPipelineSettings) : BuiltinPipelineSettings);
  73. this._settings = this._parent.getPipelineSettings();
  74. if (!Object.prototype.hasOwnProperty.call(this._settings, '_passes')) {
  75. Object.defineProperty(this._settings, '_passes', {
  76. value: [],
  77. configurable: false,
  78. enumerable: false,
  79. writable: true
  80. });
  81. }
  82. assert(this._settings._passes !== undefined);
  83. this._settings._passes.push(this);
  84. if (EDITOR) {
  85. this._parent._tryEnableEditorPreview();
  86. }
  87. }
  88. onDisable() {
  89. assert(Object.prototype.hasOwnProperty.call(this._settings, '_passes'));
  90. var passes = this._settings._passes;
  91. assert(passes !== undefined);
  92. var idx = passes.indexOf(this);
  93. assert(idx >= 0);
  94. passes.splice(idx, 1);
  95. }
  96. }) || _class) || _class) || _class) || _class) || _class));
  97. _cclegacy._RF.pop();
  98. _crd = false;
  99. }
  100. };
  101. });
  102. //# sourceMappingURL=936a458df8c410426dcbc8860ee5a32e64530057.js.map