babylon.anaglyphPostProcess.js 1.0 KB

123456789101112131415161718192021
  1. var __extends = (this && this.__extends) || function (d, b) {
  2. for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  3. function __() { this.constructor = d; }
  4. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  5. };
  6. var BABYLON;
  7. (function (BABYLON) {
  8. var AnaglyphPostProcess = (function (_super) {
  9. __extends(AnaglyphPostProcess, _super);
  10. function AnaglyphPostProcess(name, options, rigCameras, samplingMode, engine, reusable) {
  11. var _this = this;
  12. _super.call(this, name, "anaglyph", null, ["leftSampler"], options, rigCameras[1], samplingMode, engine, reusable);
  13. this._passedProcess = rigCameras[0]._rigPostProcess;
  14. this.onApplyObservable.add(function (effect) {
  15. effect.setTextureFromPostProcess("leftSampler", _this._passedProcess);
  16. });
  17. }
  18. return AnaglyphPostProcess;
  19. })(BABYLON.PostProcess);
  20. BABYLON.AnaglyphPostProcess = AnaglyphPostProcess;
  21. })(BABYLON || (BABYLON = {}));