babylon.blurPostProcess.js 1.2 KB

123456789101112131415161718192021222324252627
  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. __.prototype = b.prototype;
  5. d.prototype = new __();
  6. };
  7. var BABYLON;
  8. (function (BABYLON) {
  9. var BlurPostProcess = (function (_super) {
  10. __extends(BlurPostProcess, _super);
  11. function BlurPostProcess(name, direction, blurWidth, ratio, camera, samplingMode, engine, reusable) {
  12. var _this = this;
  13. if (samplingMode === void 0) { samplingMode = BABYLON.Texture.BILINEAR_SAMPLINGMODE; }
  14. _super.call(this, name, "blur", ["screenSize", "direction", "blurWidth"], null, ratio, camera, samplingMode, engine, reusable);
  15. this.direction = direction;
  16. this.blurWidth = blurWidth;
  17. this.onApply = function (effect) {
  18. effect.setFloat2("screenSize", _this.width, _this.height);
  19. effect.setVector2("direction", _this.direction);
  20. effect.setFloat("blurWidth", _this.blurWidth);
  21. };
  22. }
  23. return BlurPostProcess;
  24. })(BABYLON.PostProcess);
  25. BABYLON.BlurPostProcess = BlurPostProcess;
  26. })(BABYLON || (BABYLON = {}));
  27. //# sourceMappingURL=babylon.blurPostProcess.js.map