viral-viewer-2 3.4.9 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/components/animation/viral-animation.js +11 -9
  2. package/dist/components/animation/viral-animation.js.map +1 -1
  3. package/dist/components/centralized-event-handler/viral-centralized-event-handler.d.ts +1 -0
  4. package/dist/components/centralized-event-handler/viral-centralized-event-handler.js +15 -4
  5. package/dist/components/centralized-event-handler/viral-centralized-event-handler.js.map +1 -1
  6. package/dist/components/post-processing/viral-post-processing.d.ts +11 -0
  7. package/dist/components/post-processing/viral-post-processing.js +28 -0
  8. package/dist/components/post-processing/viral-post-processing.js.map +1 -0
  9. package/dist/threejs-addon/post-processing/effect-composer.d.ts +26 -0
  10. package/dist/threejs-addon/post-processing/effect-composer.js +135 -0
  11. package/dist/threejs-addon/post-processing/effect-composer.js.map +1 -0
  12. package/dist/threejs-addon/post-processing/output-pass.d.ts +10 -0
  13. package/dist/threejs-addon/post-processing/output-pass.js +61 -0
  14. package/dist/threejs-addon/post-processing/output-pass.js.map +1 -0
  15. package/dist/threejs-addon/post-processing/render-pass.d.ts +14 -0
  16. package/dist/threejs-addon/post-processing/render-pass.js +50 -0
  17. package/dist/threejs-addon/post-processing/render-pass.js.map +1 -0
  18. package/dist/threejs-addon/post-processing/unreal-bloom-pass.d.ts +49 -0
  19. package/dist/threejs-addon/post-processing/unreal-bloom-pass.js +290 -0
  20. package/dist/threejs-addon/post-processing/unreal-bloom-pass.js.map +1 -0
  21. package/dist/viral-viewer-api.d.ts +2 -0
  22. package/dist/viral-viewer-api.js +2 -0
  23. package/dist/viral-viewer-api.js.map +1 -1
  24. package/package.json +1 -1
@@ -8,7 +8,7 @@ class ViralAnimation {
8
8
  this.clock = new three_1.Clock();
9
9
  }
10
10
  devAnimation() {
11
- var _a, _b, _c, _d, _e;
11
+ var _a, _b, _c, _d, _e, _f;
12
12
  const delta = this.clock.getDelta();
13
13
  const elapsed = this.clock.getElapsedTime();
14
14
  const updated1 = (_a = this.viralViewerApi.viralCamera.cameraControls) === null || _a === void 0 ? void 0 : _a.update(delta);
@@ -17,22 +17,23 @@ class ViralAnimation {
17
17
  }
18
18
  requestAnimationFrame(() => { this.devAnimation(); });
19
19
  if (updated1) {
20
- this.viralViewerApi.viralRenderer.render();
20
+ // this.viralViewerApi.viralRenderer.render();
21
+ (_b = this.viralViewerApi.viralPostProcessing.composer) === null || _b === void 0 ? void 0 : _b.render();
21
22
  if (this.viralViewerApi.viralNavigationCube.cubeCamera) {
22
23
  this.viralViewerApi.viralNavigationCube.cubeCamera.updateCubeCamera();
23
24
  }
24
25
  }
25
26
  if (this.viralViewerApi.viralNavigationCube.cubeCamera && this.viralViewerApi.viralNavigationCube.cubeCamera.cameraControls) {
26
- const updated2 = (_b = this.viralViewerApi.viralNavigationCube.cubeCamera.cameraControls) === null || _b === void 0 ? void 0 : _b.update(delta);
27
+ const updated2 = (_c = this.viralViewerApi.viralNavigationCube.cubeCamera.cameraControls) === null || _c === void 0 ? void 0 : _c.update(delta);
27
28
  if (updated2) {
28
- (_c = this.viralViewerApi.viralNavigationCube.cubeRenderer) === null || _c === void 0 ? void 0 : _c.render();
29
+ (_d = this.viralViewerApi.viralNavigationCube.cubeRenderer) === null || _d === void 0 ? void 0 : _d.render();
29
30
  // this.viralViewerApi.viralCamera.updateMainCamera();
30
31
  }
31
32
  }
32
- (_e = (_d = this.viralViewerApi.viralStats) === null || _d === void 0 ? void 0 : _d.stats) === null || _e === void 0 ? void 0 : _e.update();
33
+ (_f = (_e = this.viralViewerApi.viralStats) === null || _e === void 0 ? void 0 : _e.stats) === null || _f === void 0 ? void 0 : _f.update();
33
34
  }
34
35
  animation() {
35
- var _a, _b, _c;
36
+ var _a, _b, _c, _d;
36
37
  const delta = this.clock.getDelta();
37
38
  const elapsed = this.clock.getElapsedTime();
38
39
  const updated1 = (_a = this.viralViewerApi.viralCamera.cameraControls) === null || _a === void 0 ? void 0 : _a.update(delta);
@@ -41,15 +42,16 @@ class ViralAnimation {
41
42
  }
42
43
  requestAnimationFrame(() => { this.animation(); });
43
44
  if (updated1) {
44
- this.viralViewerApi.viralRenderer.render();
45
+ (_b = this.viralViewerApi.viralPostProcessing.composer) === null || _b === void 0 ? void 0 : _b.render();
46
+ // this.viralViewerApi.viralRenderer.render();
45
47
  if (this.viralViewerApi.viralNavigationCube.cubeCamera) {
46
48
  this.viralViewerApi.viralNavigationCube.cubeCamera.updateCubeCamera();
47
49
  }
48
50
  }
49
51
  if (this.viralViewerApi.viralNavigationCube.cubeCamera && this.viralViewerApi.viralNavigationCube.cubeCamera.cameraControls) {
50
- const updated2 = (_b = this.viralViewerApi.viralNavigationCube.cubeCamera.cameraControls) === null || _b === void 0 ? void 0 : _b.update(delta);
52
+ const updated2 = (_c = this.viralViewerApi.viralNavigationCube.cubeCamera.cameraControls) === null || _c === void 0 ? void 0 : _c.update(delta);
51
53
  if (updated2) {
52
- (_c = this.viralViewerApi.viralNavigationCube.cubeRenderer) === null || _c === void 0 ? void 0 : _c.render();
54
+ (_d = this.viralViewerApi.viralNavigationCube.cubeRenderer) === null || _d === void 0 ? void 0 : _d.render();
53
55
  // this.viralViewerApi.viralCamera.updateMainCamera();
54
56
  }
55
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"viral-animation.js","sourceRoot":"","sources":["../../../src/components/animation/viral-animation.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAG9B,MAAa,cAAc;IAEvB,YAAmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QADjD,UAAK,GAAU,IAAI,aAAK,EAAE,CAAC;IAG3B,CAAC;IAEM,YAAY;;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QAC5C,MAAM,QAAQ,GAAG,MAAA,IAAI,CAAC,cAAc,CAAC,WAA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AC,cAAc,CAAC,WAAW,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;SAE/N;QAED,qBAAqB,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA,CAAC,CAAC,CAAC,CAAC;QAElD,IAAI,QAAQ,EAAE;YACV,MAAA,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,QAAQ,0CAAE,MAAM,EAAE,CAAC;YAE3D,8CAA8C;YAC9C,IAAI,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,UAAU,EAAE;gBACpD,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC;aAEzE;SACJ;QACD,IAAI,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,UAAU,IAAI,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,UAAU,CAAC,cAAc,EAAE;YAEzH,MAAM,QAAQ,GAAG,MAAA,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,UAAU,CAAC,cAAc,0CAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YAElG,IAAI,QAAQ,EAAE;gBACV,MAAA,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,YAAY,0CAAE,MAAM,EAAE,CAAC;gBAC/D,sDAAsD;aACzD;SACJ;IAEL,CAAC;CAEJ;AAtED,wCAsEC"}
@@ -3,4 +3,5 @@ export declare class ViralCentralizedEventHandler {
3
3
  viralViewerApi: ViralViewerApi;
4
4
  constructor(viralViewerApi: ViralViewerApi);
5
5
  private contextMenuEventHandler;
6
+ windowHandler(): void;
6
7
  }
@@ -5,21 +5,22 @@ const types_1 = require("../../types");
5
5
  class ViralCentralizedEventHandler {
6
6
  constructor(viralViewerApi) {
7
7
  this.viralViewerApi = viralViewerApi;
8
+ this.windowHandler();
8
9
  this.contextMenuEventHandler();
9
10
  }
10
11
  //#region Context Menu
11
12
  contextMenuEventHandler() {
12
13
  if (this.viralViewerApi.viralContextMenu) {
13
- this.viralViewerApi.viralContextMenu.addContextItem(0, 'Show all elements', (result) => {
14
+ this.viralViewerApi.viralContextMenu.addContextItem(0, "Show all elements", (result) => {
14
15
  this.viralViewerApi.viralContextMenu.hideContextMenu();
15
16
  });
16
- this.viralViewerApi.viralContextMenu.addContextItem(1, 'Isolate', (result) => {
17
+ this.viralViewerApi.viralContextMenu.addContextItem(1, "Isolate", (result) => {
17
18
  this.viralViewerApi.viralContextMenu.hideContextMenu();
18
19
  });
19
- this.viralViewerApi.viralContextMenu.addContextItem(2, 'Hide', (result) => {
20
+ this.viralViewerApi.viralContextMenu.addContextItem(2, "Hide", (result) => {
20
21
  this.viralViewerApi.viralContextMenu.hideContextMenu();
21
22
  });
22
- this.viralViewerApi.viralContextMenu.addContextItem(3, 'Focus', (result) => {
23
+ this.viralViewerApi.viralContextMenu.addContextItem(3, "Focus", (result) => {
23
24
  this.viralViewerApi.viralContextMenu.hideContextMenu();
24
25
  });
25
26
  }
@@ -32,6 +33,16 @@ class ViralCentralizedEventHandler {
32
33
  });
33
34
  }
34
35
  }
36
+ //#endregion
37
+ //#region Camera
38
+ //#endregion
39
+ //#region Window
40
+ windowHandler() {
41
+ window.onresize = () => {
42
+ this.viralViewerApi.viralCamera.resizeCanvas();
43
+ this.viralViewerApi;
44
+ };
45
+ }
35
46
  }
36
47
  exports.ViralCentralizedEventHandler = ViralCentralizedEventHandler;
37
48
  //# sourceMappingURL=viral-centralized-event-handler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"viral-centralized-event-handler.js","sourceRoot":"","sources":["../../../src/components/centralized-event-handler/viral-centralized-event-handler.ts"],"names":[],"mappings":";;;AACA,uCAAkD;AAGlD,MAAa,4BAA4B;IACrC,YAAmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QAC7C,IAAI,CAAC,uB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AA;YACtG,CAAC,CAAC,CAAA;YACF,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,gBAAgB,CAAC,2BAAmB,CAAC,kBAAkB,EAAE,iBAAiB,EAAE,CAAC,MAAkB,EAAE,EAAE;gBAC9H,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAA;YAC1D,CAAC,CAAC,CAAA;SACL;IACL,CAAC;CAMJ;AAvCD,oEAuCC"}
1
+ {"version":3,"file":"viral-centralized-event-handler.js","sourceRoot":"","sources":["../../../src/components/centralized-event-handler/viral-centralized-event-handler.ts"],"names":[],"mappings":";;;AACA,uCAAkD;AAGlD,MAAa,4BAA4B;IACvC,YAAmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QAC/C,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAED,sBAAsB;IACd,uBAAuB;QAC7B,IAAI,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE;YACxC,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,cAAc,CACjD,CAAC,EACD,mBAAmB,EACnB,CAAC,MAAW,EAAE,EAAE;gBACd,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC;YACzD,CAAC,CACF,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,cAAc,CACjD,CAAC,EACD,SAAS,EACT,CAAC,MAAW,EAAE,EAAE;gBACd,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC;YACzD,CAAC,CACF,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,cAAc,CACjD,CAAC,EACD,MAAM,EACN,CAAC,MAAW,EAAE,EAAE;gBACd,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC;YACzD,CAAC,CACF,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,cAAc,CACjD,CAAC,EACD,OAAO,EACP,CAAC,MAAW,EAAE,EAAE;gBACd,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC;YACzD,CAAC,CACF,CAAC;SACH;QAED,IAAI,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;YAClC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,gBAAgB,CAC7C,2BAAmB,CAAC,mBAAmB,EACvC,iBAAiB,EACjB,CAAC,MAAkB,EAAE,EAAE;gBACrB,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,eAAe,CAClD,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,OAAO,EACd,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CACb,CAAC;YACJ,CAAC,CACF,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,gBAAgB,CAC7C,2BAAmB,CAAC,kBAAkB,EACtC,iBAAiB,EACjB,CAAC,MAAkB,EAAE,EAAE;gBACrB,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC;YACzD,CAAC,CACF,CAAC;SACH;IACH,CAAC;IACD,YAAY;IAEZ,gBAAgB;IAEhB,YAAY;IAEZ,gBAAgB;IAChB,aAAa;QACX,MAAM,CAAC,QAAQ,GAAG,GAAG,EAAE;YACrB,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;YAC/C,IAAI,CAAC,cAAc,CAAA;QACrB,CAAC,CAAC;IACJ,CAAC;CAEF;AA1ED,oEA0EC"}
@@ -0,0 +1,11 @@
1
+ import { EffectComposer } from "../../threejs-addon/post-processing/effect-composer";
2
+ import { RenderPass } from "../../threejs-addon/post-processing/render-pass";
3
+ import { UnrealBloomPass } from "../../threejs-addon/post-processing/unreal-bloom-pass";
4
+ import { ViralViewerApi } from "../../viral-viewer-api";
5
+ export declare class ViralPostProcessing {
6
+ private viralViewerApi;
7
+ composer: EffectComposer | null;
8
+ renderPass: RenderPass | null;
9
+ bloomPass: UnrealBloomPass | null;
10
+ constructor(viralViewerApi: ViralViewerApi);
11
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ViralPostProcessing = void 0;
4
+ const three_1 = require("three");
5
+ const effect_composer_1 = require("../../threejs-addon/post-processing/effect-composer");
6
+ const render_pass_1 = require("../../threejs-addon/post-processing/render-pass");
7
+ const unreal_bloom_pass_1 = require("../../threejs-addon/post-processing/unreal-bloom-pass");
8
+ class ViralPostProcessing {
9
+ constructor(viralViewerApi) {
10
+ this.viralViewerApi = viralViewerApi;
11
+ this.composer = null;
12
+ //effect
13
+ this.renderPass = null;
14
+ this.bloomPass = null;
15
+ if (this.viralViewerApi.viralScene) {
16
+ this.composer = new effect_composer_1.EffectComposer(this.viralViewerApi.viralRenderer.renderer);
17
+ this.renderPass = new render_pass_1.RenderPass(this.viralViewerApi.viralScene.scene, this.viralViewerApi.viralCamera.camera);
18
+ this.bloomPass = new unreal_bloom_pass_1.UnrealBloomPass(new three_1.Vector2(window.innerWidth, window.innerHeight), 1.5, 0.4, 0.85);
19
+ this.bloomPass.threshold = 0;
20
+ this.bloomPass.strength = 1;
21
+ this.bloomPass.radius = 0.5;
22
+ this.composer.addPass(this.renderPass);
23
+ this.composer.addPass(this.bloomPass);
24
+ }
25
+ }
26
+ }
27
+ exports.ViralPostProcessing = ViralPostProcessing;
28
+ //# sourceMappingURL=viral-post-processing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viral-post-processing.js","sourceRoot":"","sources":["../../../src/components/post-processing/viral-post-processing.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,yFAAqF;AACrF,iFAA6E;AAC7E,6FAAwF;AAGxF,MAAa,mBAAmB;IAM9B,YAAoB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QALlD,aAAQ,GAA0B,IAAI,CAAC;QACvC,QAAQ;QACR,eAAU,GAAsB,IAAI,CAAC;QACrC,cAAS,GAA2B,IAAI,CAAC;QAGvC,IAAI,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;YAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,gCAAc,CAChC,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,QAAQ,CAC3C,CAAC;YAEF,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAU,CAC9B,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,KAAK,EACpC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,CACvC,CAAC;YAEF,IAAI,CAAC,SAAS,GAAG,IAAI,mCAAe,CAClC,IAAI,eAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,EAClD,GAAG,EACH,GAAG,EACH,IAAI,CACL,CAAC;YACF,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,CAAC,CAAC;YAC5B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,GAAG,CAAC;YAE5B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACvC;IACH,CAAC;CACF;AA/BD,kDA+BC"}
@@ -0,0 +1,26 @@
1
+ export class EffectComposer {
2
+ constructor(renderer: any, renderTarget: any);
3
+ renderer: any;
4
+ _pixelRatio: any;
5
+ _width: any;
6
+ _height: any;
7
+ renderTarget1: any;
8
+ renderTarget2: any;
9
+ writeBuffer: any;
10
+ readBuffer: any;
11
+ renderToScreen: boolean;
12
+ passes: any[];
13
+ copyPass: any;
14
+ clock: Clock;
15
+ swapBuffers(): void;
16
+ addPass(pass: any): void;
17
+ insertPass(pass: any, index: any): void;
18
+ removePass(pass: any): void;
19
+ isLastEnabledPass(passIndex: any): boolean;
20
+ render(deltaTime: any): void;
21
+ reset(renderTarget: any): void;
22
+ setSize(width: any, height: any): void;
23
+ setPixelRatio(pixelRatio: any): void;
24
+ dispose(): void;
25
+ }
26
+ import { Clock } from 'three';
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EffectComposer = void 0;
4
+ const three_1 = require("three");
5
+ const CopyShader_js_1 = require("../shaders/CopyShader.js");
6
+ const ShaderPass_js_1 = require("./ShaderPass.js");
7
+ const MaskPass_js_1 = require("./MaskPass.js");
8
+ const MaskPass_js_2 = require("./MaskPass.js");
9
+ class EffectComposer {
10
+ constructor(renderer, renderTarget) {
11
+ this.renderer = renderer;
12
+ this._pixelRatio = renderer.getPixelRatio();
13
+ if (renderTarget === undefined) {
14
+ const size = renderer.getSize(new three_1.Vector2());
15
+ this._width = size.width;
16
+ this._height = size.height;
17
+ renderTarget = new three_1.WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio);
18
+ renderTarget.texture.name = 'EffectComposer.rt1';
19
+ }
20
+ else {
21
+ this._width = renderTarget.width;
22
+ this._height = renderTarget.height;
23
+ }
24
+ this.renderTarget1 = renderTarget;
25
+ this.renderTarget2 = renderTarget.clone();
26
+ this.renderTarget2.texture.name = 'EffectComposer.rt2';
27
+ this.writeBuffer = this.renderTarget1;
28
+ this.readBuffer = this.renderTarget2;
29
+ this.renderToScreen = true;
30
+ this.passes = [];
31
+ this.copyPass = new ShaderPass_js_1.ShaderPass(CopyShader_js_1.CopyShader);
32
+ this.clock = new three_1.Clock();
33
+ }
34
+ swapBuffers() {
35
+ const tmp = this.readBuffer;
36
+ this.readBuffer = this.writeBuffer;
37
+ this.writeBuffer = tmp;
38
+ }
39
+ addPass(pass) {
40
+ this.passes.push(pass);
41
+ pass.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
42
+ }
43
+ insertPass(pass, index) {
44
+ this.passes.splice(index, 0, pass);
45
+ pass.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
46
+ }
47
+ removePass(pass) {
48
+ const index = this.passes.indexOf(pass);
49
+ if (index !== -1) {
50
+ this.passes.splice(index, 1);
51
+ }
52
+ }
53
+ isLastEnabledPass(passIndex) {
54
+ for (let i = passIndex + 1; i < this.passes.length; i++) {
55
+ if (this.passes[i].enabled) {
56
+ return false;
57
+ }
58
+ }
59
+ return true;
60
+ }
61
+ render(deltaTime) {
62
+ // deltaTime value is in seconds
63
+ if (deltaTime === undefined) {
64
+ deltaTime = this.clock.getDelta();
65
+ }
66
+ const currentRenderTarget = this.renderer.getRenderTarget();
67
+ let maskActive = false;
68
+ for (let i = 0, il = this.passes.length; i < il; i++) {
69
+ const pass = this.passes[i];
70
+ if (pass.enabled === false)
71
+ continue;
72
+ pass.renderToScreen = (this.renderToScreen && this.isLastEnabledPass(i));
73
+ pass.render(this.renderer, this.writeBuffer, this.readBuffer, deltaTime, maskActive);
74
+ if (pass.needsSwap) {
75
+ if (maskActive) {
76
+ const context = this.renderer.getContext();
77
+ const stencil = this.renderer.state.buffers.stencil;
78
+ //context.stencilFunc( context.NOTEQUAL, 1, 0xffffffff );
79
+ stencil.setFunc(context.NOTEQUAL, 1, 0xffffffff);
80
+ this.copyPass.render(this.renderer, this.writeBuffer, this.readBuffer, deltaTime);
81
+ //context.stencilFunc( context.EQUAL, 1, 0xffffffff );
82
+ stencil.setFunc(context.EQUAL, 1, 0xffffffff);
83
+ }
84
+ this.swapBuffers();
85
+ }
86
+ if (MaskPass_js_1.MaskPass !== undefined) {
87
+ if (pass instanceof MaskPass_js_1.MaskPass) {
88
+ maskActive = true;
89
+ }
90
+ else if (pass instanceof MaskPass_js_2.ClearMaskPass) {
91
+ maskActive = false;
92
+ }
93
+ }
94
+ }
95
+ this.renderer.setRenderTarget(currentRenderTarget);
96
+ }
97
+ reset(renderTarget) {
98
+ if (renderTarget === undefined) {
99
+ const size = this.renderer.getSize(new three_1.Vector2());
100
+ this._pixelRatio = this.renderer.getPixelRatio();
101
+ this._width = size.width;
102
+ this._height = size.height;
103
+ renderTarget = this.renderTarget1.clone();
104
+ renderTarget.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
105
+ }
106
+ this.renderTarget1.dispose();
107
+ this.renderTarget2.dispose();
108
+ this.renderTarget1 = renderTarget;
109
+ this.renderTarget2 = renderTarget.clone();
110
+ this.writeBuffer = this.renderTarget1;
111
+ this.readBuffer = this.renderTarget2;
112
+ }
113
+ setSize(width, height) {
114
+ this._width = width;
115
+ this._height = height;
116
+ const effectiveWidth = this._width * this._pixelRatio;
117
+ const effectiveHeight = this._height * this._pixelRatio;
118
+ this.renderTarget1.setSize(effectiveWidth, effectiveHeight);
119
+ this.renderTarget2.setSize(effectiveWidth, effectiveHeight);
120
+ for (let i = 0; i < this.passes.length; i++) {
121
+ this.passes[i].setSize(effectiveWidth, effectiveHeight);
122
+ }
123
+ }
124
+ setPixelRatio(pixelRatio) {
125
+ this._pixelRatio = pixelRatio;
126
+ this.setSize(this._width, this._height);
127
+ }
128
+ dispose() {
129
+ this.renderTarget1.dispose();
130
+ this.renderTarget2.dispose();
131
+ this.copyPass.dispose();
132
+ }
133
+ }
134
+ exports.EffectComposer = EffectComposer;
135
+ //# sourceMappingURL=effect-composer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effect-composer.js","sourceRoot":"","sources":["../../../src/threejs-addon/post-processing/effect-composer.js"],"names":[],"mappings":";;;AAAA,iCAIe;AACf,4DAAsD;AACtD,mDAA6C;AAC7C,+CAAyC;AACzC,+CAA8C;AAE9C,MAAM,cAAc;IAEhB,YAAY,QAAQ,EAAE,YAAY;QAE9B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC;QAE5C,IAAI,YAAY,KAAK,SAAS,EAAE;YAE5B,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC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C;QAExD,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAC5D,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAE5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAEzC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;SAE3D;IAEL,CAAC;IAED,aAAa,CAAC,UAAU;QAEpB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAE9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAE5C,CAAC;IAED,OAAO;QAEH,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;QAE7B,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;IAE5B,CAAC;CAEJ;AAEQ,wCAAc"}
@@ -0,0 +1,10 @@
1
+ export class OutputPass {
2
+ uniforms: any;
3
+ material: RawShaderMaterial;
4
+ fsQuad: any;
5
+ _outputColorSpace: any;
6
+ _toneMapping: any;
7
+ render(renderer: any, writeBuffer: any, readBuffer: any): void;
8
+ dispose(): void;
9
+ }
10
+ import { RawShaderMaterial } from 'three';
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OutputPass = void 0;
4
+ const three_1 = require("three");
5
+ const Pass_js_1 = require("./Pass.js");
6
+ const OutputShader_js_1 = require("../shaders/OutputShader.js");
7
+ class OutputPass extends Pass_js_1.Pass {
8
+ constructor() {
9
+ super();
10
+ //
11
+ const shader = OutputShader_js_1.OutputShader;
12
+ this.uniforms = three_1.UniformsUtils.clone(shader.uniforms);
13
+ this.material = new three_1.RawShaderMaterial({
14
+ uniforms: this.uniforms,
15
+ vertexShader: shader.vertexShader,
16
+ fragmentShader: shader.fragmentShader
17
+ });
18
+ this.fsQuad = new Pass_js_1.FullScreenQuad(this.material);
19
+ // internal cache
20
+ this._outputColorSpace = null;
21
+ this._toneMapping = null;
22
+ }
23
+ render(renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */) {
24
+ this.uniforms['tDiffuse'].value = readBuffer.texture;
25
+ this.uniforms['toneMappingExposure'].value = renderer.toneMappingExposure;
26
+ // rebuild defines if required
27
+ if (this._outputColorSpace !== renderer.outputColorSpace || this._toneMapping !== renderer.toneMapping) {
28
+ this._outputColorSpace = renderer.outputColorSpace;
29
+ this._toneMapping = renderer.toneMapping;
30
+ this.material.defines = {};
31
+ if (this._outputColorSpace == three_1.SRGBColorSpace)
32
+ this.material.defines.SRGB_COLOR_SPACE = '';
33
+ if (this._toneMapping === three_1.LinearToneMapping)
34
+ this.material.defines.LINEAR_TONE_MAPPING = '';
35
+ else if (this._toneMapping === three_1.ReinhardToneMapping)
36
+ this.material.defines.REINHARD_TONE_MAPPING = '';
37
+ else if (this._toneMapping === three_1.CineonToneMapping)
38
+ this.material.defines.CINEON_TONE_MAPPING = '';
39
+ else if (this._toneMapping === three_1.ACESFilmicToneMapping)
40
+ this.material.defines.ACES_FILMIC_TONE_MAPPING = '';
41
+ this.material.needsUpdate = true;
42
+ }
43
+ //
44
+ if (this.renderToScreen === true) {
45
+ renderer.setRenderTarget(null);
46
+ this.fsQuad.render(renderer);
47
+ }
48
+ else {
49
+ renderer.setRenderTarget(writeBuffer);
50
+ if (this.clear)
51
+ renderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil);
52
+ this.fsQuad.render(renderer);
53
+ }
54
+ }
55
+ dispose() {
56
+ this.material.dispose();
57
+ this.fsQuad.dispose();
58
+ }
59
+ }
60
+ exports.OutputPass = OutputPass;
61
+ //# sourceMappingURL=output-pass.js.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MAAM,CAAC,OAAO,EAAE,CAAC;IAE1B,CAAC;CAEJ;AAEQ,gCAAU"}
@@ -0,0 +1,14 @@
1
+ export class RenderPass {
2
+ constructor(scene: any, camera: any, overrideMaterial: any, clearColor: any, clearAlpha: any);
3
+ scene: any;
4
+ camera: any;
5
+ overrideMaterial: any;
6
+ clearColor: any;
7
+ clearAlpha: any;
8
+ clear: boolean;
9
+ clearDepth: boolean;
10
+ needsSwap: boolean;
11
+ _oldClearColor: Color;
12
+ render(renderer: any, writeBuffer: any, readBuffer: any): void;
13
+ }
14
+ import { Color } from 'three';
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RenderPass = void 0;
4
+ const three_1 = require("three");
5
+ const Pass_js_1 = require("./Pass.js");
6
+ class RenderPass extends Pass_js_1.Pass {
7
+ constructor(scene, camera, overrideMaterial, clearColor, clearAlpha) {
8
+ super();
9
+ this.scene = scene;
10
+ this.camera = camera;
11
+ this.overrideMaterial = overrideMaterial;
12
+ this.clearColor = clearColor;
13
+ this.clearAlpha = (clearAlpha !== undefined) ? clearAlpha : 0;
14
+ this.clear = true;
15
+ this.clearDepth = false;
16
+ this.needsSwap = false;
17
+ this._oldClearColor = new three_1.Color();
18
+ }
19
+ render(renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */) {
20
+ const oldAutoClear = renderer.autoClear;
21
+ renderer.autoClear = false;
22
+ let oldClearAlpha, oldOverrideMaterial;
23
+ if (this.overrideMaterial !== undefined) {
24
+ oldOverrideMaterial = this.scene.overrideMaterial;
25
+ this.scene.overrideMaterial = this.overrideMaterial;
26
+ }
27
+ if (this.clearColor) {
28
+ renderer.getClearColor(this._oldClearColor);
29
+ oldClearAlpha = renderer.getClearAlpha();
30
+ renderer.setClearColor(this.clearColor, this.clearAlpha);
31
+ }
32
+ if (this.clearDepth) {
33
+ renderer.clearDepth();
34
+ }
35
+ renderer.setRenderTarget(this.renderToScreen ? null : readBuffer);
36
+ // TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600
37
+ if (this.clear)
38
+ renderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil);
39
+ renderer.render(this.scene, this.camera);
40
+ if (this.clearColor) {
41
+ renderer.setClearColor(this._oldClearColor, oldClearAlpha);
42
+ }
43
+ if (this.overrideMaterial !== undefined) {
44
+ this.scene.overrideMaterial = oldOverrideMaterial;
45
+ }
46
+ renderer.autoClear = oldAutoClear;
47
+ }
48
+ }
49
+ exports.RenderPass = RenderPass;
50
+ //# sourceMappingURL=render-pass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-pass.js","sourceRoot":"","sources":["../../../src/threejs-addon/post-processing/render-pass.js"],"names":[],"mappings":";;;AAAA,iCAEe;AACf,uCAAiC;AAEjC,MAAM,UAAW,SAAQ,cAAI;IAEzB,YAAY,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU;QAE/D,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAEzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAE9D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,cAAc,GAAG,IAAI,aAAK,EAAE,CAAC;IAEtC,CAAC;IAED,MAAM,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,4BAA4B;QAEjE,MAAM,YAAY,GAAG,QAAQ,CAAC,SAAS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IAEtC,CAAC;CAEJ;AAEQ,gCAAU"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * UnrealBloomPass is inspired by the bloom pass of Unreal Engine. It creates a
3
+ * mip map chain of bloom textures and blurs them with different radii. Because
4
+ * of the weighted combination of mips, and because larger blurs are done on
5
+ * higher mips, this effect provides good quality and performance.
6
+ *
7
+ * Reference:
8
+ * - https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/Bloom/
9
+ */
10
+ export class UnrealBloomPass {
11
+ constructor(resolution: any, strength: any, radius: any, threshold: any);
12
+ strength: any;
13
+ radius: any;
14
+ threshold: any;
15
+ resolution: Vector2;
16
+ clearColor: Color;
17
+ renderTargetsHorizontal: WebGLRenderTarget[];
18
+ renderTargetsVertical: WebGLRenderTarget[];
19
+ nMips: number;
20
+ renderTargetBright: WebGLRenderTarget;
21
+ highPassUniforms: any;
22
+ materialHighPassFilter: ShaderMaterial;
23
+ separableBlurMaterials: ShaderMaterial[];
24
+ compositeMaterial: ShaderMaterial;
25
+ bloomTintColors: Vector3[];
26
+ copyUniforms: any;
27
+ materialCopy: ShaderMaterial;
28
+ enabled: boolean;
29
+ needsSwap: boolean;
30
+ _oldClearColor: Color;
31
+ oldClearAlpha: number;
32
+ basic: MeshBasicMaterial;
33
+ fsQuad: any;
34
+ dispose(): void;
35
+ setSize(width: any, height: any): void;
36
+ render(renderer: any, writeBuffer: any, readBuffer: any, deltaTime: any, maskActive: any): void;
37
+ getSeperableBlurMaterial(kernelRadius: any): ShaderMaterial;
38
+ getCompositeMaterial(nMips: any): ShaderMaterial;
39
+ }
40
+ export namespace UnrealBloomPass {
41
+ const BlurDirectionX: Vector2;
42
+ const BlurDirectionY: Vector2;
43
+ }
44
+ import { Vector2 } from 'three';
45
+ import { Color } from 'three';
46
+ import { WebGLRenderTarget } from 'three';
47
+ import { ShaderMaterial } from 'three';
48
+ import { Vector3 } from 'three';
49
+ import { MeshBasicMaterial } from 'three';
@@ -0,0 +1,290 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnrealBloomPass = void 0;
4
+ const three_1 = require("three");
5
+ const Pass_js_1 = require("./Pass.js");
6
+ const CopyShader_js_1 = require("../shaders/CopyShader.js");
7
+ const LuminosityHighPassShader_js_1 = require("../shaders/LuminosityHighPassShader.js");
8
+ /**
9
+ * UnrealBloomPass is inspired by the bloom pass of Unreal Engine. It creates a
10
+ * mip map chain of bloom textures and blurs them with different radii. Because
11
+ * of the weighted combination of mips, and because larger blurs are done on
12
+ * higher mips, this effect provides good quality and performance.
13
+ *
14
+ * Reference:
15
+ * - https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/Bloom/
16
+ */
17
+ class UnrealBloomPass extends Pass_js_1.Pass {
18
+ constructor(resolution, strength, radius, threshold) {
19
+ super();
20
+ this.strength = (strength !== undefined) ? strength : 1;
21
+ this.radius = radius;
22
+ this.threshold = threshold;
23
+ this.resolution = (resolution !== undefined) ? new three_1.Vector2(resolution.x, resolution.y) : new three_1.Vector2(256, 256);
24
+ // create color only once here, reuse it later inside the render function
25
+ this.clearColor = new three_1.Color(0, 0, 0);
26
+ // render targets
27
+ this.renderTargetsHorizontal = [];
28
+ this.renderTargetsVertical = [];
29
+ this.nMips = 5;
30
+ let resx = Math.round(this.resolution.x / 2);
31
+ let resy = Math.round(this.resolution.y / 2);
32
+ this.renderTargetBright = new three_1.WebGLRenderTarget(resx, resy);
33
+ this.renderTargetBright.texture.name = 'UnrealBloomPass.bright';
34
+ this.renderTargetBright.texture.generateMipmaps = false;
35
+ for (let i = 0; i < this.nMips; i++) {
36
+ const renderTargetHorizonal = new three_1.WebGLRenderTarget(resx, resy);
37
+ renderTargetHorizonal.texture.name = 'UnrealBloomPass.h' + i;
38
+ renderTargetHorizonal.texture.generateMipmaps = false;
39
+ this.renderTargetsHorizontal.push(renderTargetHorizonal);
40
+ const renderTargetVertical = new three_1.WebGLRenderTarget(resx, resy);
41
+ renderTargetVertical.texture.name = 'UnrealBloomPass.v' + i;
42
+ renderTargetVertical.texture.generateMipmaps = false;
43
+ this.renderTargetsVertical.push(renderTargetVertical);
44
+ resx = Math.round(resx / 2);
45
+ resy = Math.round(resy / 2);
46
+ }
47
+ // luminosity high pass material
48
+ const highPassShader = LuminosityHighPassShader_js_1.LuminosityHighPassShader;
49
+ this.highPassUniforms = three_1.UniformsUtils.clone(highPassShader.uniforms);
50
+ this.highPassUniforms['luminosityThreshold'].value = threshold;
51
+ this.highPassUniforms['smoothWidth'].value = 0.01;
52
+ this.materialHighPassFilter = new three_1.ShaderMaterial({
53
+ uniforms: this.highPassUniforms,
54
+ vertexShader: highPassShader.vertexShader,
55
+ fragmentShader: highPassShader.fragmentShader,
56
+ defines: {}
57
+ });
58
+ // Gaussian Blur Materials
59
+ this.separableBlurMaterials = [];
60
+ const kernelSizeArray = [3, 5, 7, 9, 11];
61
+ resx = Math.round(this.resolution.x / 2);
62
+ resy = Math.round(this.resolution.y / 2);
63
+ for (let i = 0; i < this.nMips; i++) {
64
+ this.separableBlurMaterials.push(this.getSeperableBlurMaterial(kernelSizeArray[i]));
65
+ this.separableBlurMaterials[i].uniforms['texSize'].value = new three_1.Vector2(resx, resy);
66
+ resx = Math.round(resx / 2);
67
+ resy = Math.round(resy / 2);
68
+ }
69
+ // Composite material
70
+ this.compositeMaterial = this.getCompositeMaterial(this.nMips);
71
+ this.compositeMaterial.uniforms['blurTexture1'].value = this.renderTargetsVertical[0].texture;
72
+ this.compositeMaterial.uniforms['blurTexture2'].value = this.renderTargetsVertical[1].texture;
73
+ this.compositeMaterial.uniforms['blurTexture3'].value = this.renderTargetsVertical[2].texture;
74
+ this.compositeMaterial.uniforms['blurTexture4'].value = this.renderTargetsVertical[3].texture;
75
+ this.compositeMaterial.uniforms['blurTexture5'].value = this.renderTargetsVertical[4].texture;
76
+ this.compositeMaterial.uniforms['bloomStrength'].value = strength;
77
+ this.compositeMaterial.uniforms['bloomRadius'].value = 0.1;
78
+ this.compositeMaterial.needsUpdate = true;
79
+ const bloomFactors = [1.0, 0.8, 0.6, 0.4, 0.2];
80
+ this.compositeMaterial.uniforms['bloomFactors'].value = bloomFactors;
81
+ this.bloomTintColors = [new three_1.Vector3(1, 1, 1), new three_1.Vector3(1, 1, 1), new three_1.Vector3(1, 1, 1), new three_1.Vector3(1, 1, 1), new three_1.Vector3(1, 1, 1)];
82
+ this.compositeMaterial.uniforms['bloomTintColors'].value = this.bloomTintColors;
83
+ // copy material
84
+ const copyShader = CopyShader_js_1.CopyShader;
85
+ this.copyUniforms = three_1.UniformsUtils.clone(copyShader.uniforms);
86
+ this.copyUniforms['opacity'].value = 1.0;
87
+ this.materialCopy = new three_1.ShaderMaterial({
88
+ uniforms: this.copyUniforms,
89
+ vertexShader: copyShader.vertexShader,
90
+ fragmentShader: copyShader.fragmentShader,
91
+ blending: three_1.AdditiveBlending,
92
+ depthTest: false,
93
+ depthWrite: false,
94
+ transparent: true
95
+ });
96
+ this.enabled = true;
97
+ this.needsSwap = false;
98
+ this._oldClearColor = new three_1.Color();
99
+ this.oldClearAlpha = 1;
100
+ this.basic = new three_1.MeshBasicMaterial();
101
+ this.fsQuad = new Pass_js_1.FullScreenQuad(null);
102
+ }
103
+ dispose() {
104
+ for (let i = 0; i < this.renderTargetsHorizontal.length; i++) {
105
+ this.renderTargetsHorizontal[i].dispose();
106
+ }
107
+ for (let i = 0; i < this.renderTargetsVertical.length; i++) {
108
+ this.renderTargetsVertical[i].dispose();
109
+ }
110
+ this.renderTargetBright.dispose();
111
+ //
112
+ for (let i = 0; i < this.separableBlurMaterials.length; i++) {
113
+ this.separableBlurMaterials[i].dispose();
114
+ }
115
+ this.compositeMaterial.dispose();
116
+ this.materialCopy.dispose();
117
+ this.basic.dispose();
118
+ //
119
+ this.fsQuad.dispose();
120
+ }
121
+ setSize(width, height) {
122
+ let resx = Math.round(width / 2);
123
+ let resy = Math.round(height / 2);
124
+ this.renderTargetBright.setSize(resx, resy);
125
+ for (let i = 0; i < this.nMips; i++) {
126
+ this.renderTargetsHorizontal[i].setSize(resx, resy);
127
+ this.renderTargetsVertical[i].setSize(resx, resy);
128
+ this.separableBlurMaterials[i].uniforms['texSize'].value = new three_1.Vector2(resx, resy);
129
+ resx = Math.round(resx / 2);
130
+ resy = Math.round(resy / 2);
131
+ }
132
+ }
133
+ render(renderer, writeBuffer, readBuffer, deltaTime, maskActive) {
134
+ renderer.getClearColor(this._oldClearColor);
135
+ this.oldClearAlpha = renderer.getClearAlpha();
136
+ const oldAutoClear = renderer.autoClear;
137
+ renderer.autoClear = false;
138
+ renderer.setClearColor(this.clearColor, 0);
139
+ if (maskActive)
140
+ renderer.state.buffers.stencil.setTest(false);
141
+ // Render input to screen
142
+ if (this.renderToScreen) {
143
+ this.fsQuad.material = this.basic;
144
+ this.basic.map = readBuffer.texture;
145
+ renderer.setRenderTarget(null);
146
+ renderer.clear();
147
+ this.fsQuad.render(renderer);
148
+ }
149
+ // 1. Extract Bright Areas
150
+ this.highPassUniforms['tDiffuse'].value = readBuffer.texture;
151
+ this.highPassUniforms['luminosityThreshold'].value = this.threshold;
152
+ this.fsQuad.material = this.materialHighPassFilter;
153
+ renderer.setRenderTarget(this.renderTargetBright);
154
+ renderer.clear();
155
+ this.fsQuad.render(renderer);
156
+ // 2. Blur All the mips progressively
157
+ let inputRenderTarget = this.renderTargetBright;
158
+ for (let i = 0; i < this.nMips; i++) {
159
+ this.fsQuad.material = this.separableBlurMaterials[i];
160
+ this.separableBlurMaterials[i].uniforms['colorTexture'].value = inputRenderTarget.texture;
161
+ this.separableBlurMaterials[i].uniforms['direction'].value = UnrealBloomPass.BlurDirectionX;
162
+ renderer.setRenderTarget(this.renderTargetsHorizontal[i]);
163
+ renderer.clear();
164
+ this.fsQuad.render(renderer);
165
+ this.separableBlurMaterials[i].uniforms['colorTexture'].value = this.renderTargetsHorizontal[i].texture;
166
+ this.separableBlurMaterials[i].uniforms['direction'].value = UnrealBloomPass.BlurDirectionY;
167
+ renderer.setRenderTarget(this.renderTargetsVertical[i]);
168
+ renderer.clear();
169
+ this.fsQuad.render(renderer);
170
+ inputRenderTarget = this.renderTargetsVertical[i];
171
+ }
172
+ // Composite All the mips
173
+ this.fsQuad.material = this.compositeMaterial;
174
+ this.compositeMaterial.uniforms['bloomStrength'].value = this.strength;
175
+ this.compositeMaterial.uniforms['bloomRadius'].value = this.radius;
176
+ this.compositeMaterial.uniforms['bloomTintColors'].value = this.bloomTintColors;
177
+ renderer.setRenderTarget(this.renderTargetsHorizontal[0]);
178
+ renderer.clear();
179
+ this.fsQuad.render(renderer);
180
+ // Blend it additively over the input texture
181
+ this.fsQuad.material = this.materialCopy;
182
+ this.copyUniforms['tDiffuse'].value = this.renderTargetsHorizontal[0].texture;
183
+ if (maskActive)
184
+ renderer.state.buffers.stencil.setTest(true);
185
+ if (this.renderToScreen) {
186
+ renderer.setRenderTarget(null);
187
+ this.fsQuad.render(renderer);
188
+ }
189
+ else {
190
+ renderer.setRenderTarget(readBuffer);
191
+ this.fsQuad.render(renderer);
192
+ }
193
+ // Restore renderer settings
194
+ renderer.setClearColor(this._oldClearColor, this.oldClearAlpha);
195
+ renderer.autoClear = oldAutoClear;
196
+ }
197
+ getSeperableBlurMaterial(kernelRadius) {
198
+ return new three_1.ShaderMaterial({
199
+ defines: {
200
+ 'KERNEL_RADIUS': kernelRadius,
201
+ 'SIGMA': kernelRadius
202
+ },
203
+ uniforms: {
204
+ 'colorTexture': { value: null },
205
+ 'texSize': { value: new three_1.Vector2(0.5, 0.5) },
206
+ 'direction': { value: new three_1.Vector2(0.5, 0.5) }
207
+ },
208
+ vertexShader: `varying vec2 vUv;
209
+ void main() {
210
+ vUv = uv;
211
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
212
+ }`,
213
+ fragmentShader: `#include <common>
214
+ varying vec2 vUv;
215
+ uniform sampler2D colorTexture;
216
+ uniform vec2 texSize;
217
+ uniform vec2 direction;
218
+
219
+ float gaussianPdf(in float x, in float sigma) {
220
+ return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;
221
+ }
222
+ void main() {
223
+ vec2 invSize = 1.0 / texSize;
224
+ float fSigma = float(SIGMA);
225
+ float weightSum = gaussianPdf(0.0, fSigma);
226
+ vec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;
227
+ for( int i = 1; i < KERNEL_RADIUS; i ++ ) {
228
+ float x = float(i);
229
+ float w = gaussianPdf(x, fSigma);
230
+ vec2 uvOffset = direction * invSize * x;
231
+ vec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;
232
+ vec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;
233
+ diffuseSum += (sample1 + sample2) * w;
234
+ weightSum += 2.0 * w;
235
+ }
236
+ gl_FragColor = vec4(diffuseSum/weightSum, 1.0);
237
+ }`
238
+ });
239
+ }
240
+ getCompositeMaterial(nMips) {
241
+ return new three_1.ShaderMaterial({
242
+ defines: {
243
+ 'NUM_MIPS': nMips
244
+ },
245
+ uniforms: {
246
+ 'blurTexture1': { value: null },
247
+ 'blurTexture2': { value: null },
248
+ 'blurTexture3': { value: null },
249
+ 'blurTexture4': { value: null },
250
+ 'blurTexture5': { value: null },
251
+ 'bloomStrength': { value: 1.0 },
252
+ 'bloomFactors': { value: null },
253
+ 'bloomTintColors': { value: null },
254
+ 'bloomRadius': { value: 0.0 }
255
+ },
256
+ vertexShader: `varying vec2 vUv;
257
+ void main() {
258
+ vUv = uv;
259
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
260
+ }`,
261
+ fragmentShader: `varying vec2 vUv;
262
+ uniform sampler2D blurTexture1;
263
+ uniform sampler2D blurTexture2;
264
+ uniform sampler2D blurTexture3;
265
+ uniform sampler2D blurTexture4;
266
+ uniform sampler2D blurTexture5;
267
+ uniform float bloomStrength;
268
+ uniform float bloomRadius;
269
+ uniform float bloomFactors[NUM_MIPS];
270
+ uniform vec3 bloomTintColors[NUM_MIPS];
271
+
272
+ float lerpBloomFactor(const in float factor) {
273
+ float mirrorFactor = 1.2 - factor;
274
+ return mix(factor, mirrorFactor, bloomRadius);
275
+ }
276
+
277
+ void main() {
278
+ gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +
279
+ lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +
280
+ lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +
281
+ lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +
282
+ lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );
283
+ }`
284
+ });
285
+ }
286
+ }
287
+ exports.UnrealBloomPass = UnrealBloomPass;
288
+ UnrealBloomPass.BlurDirectionX = new three_1.Vector2(1.0, 0.0);
289
+ UnrealBloomPass.BlurDirectionY = new three_1.Vector2(0.0, 1.0);
290
+ //# sourceMappingURL=unreal-bloom-pass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unreal-bloom-pass.js","sourceRoot":"","sources":["../../../src/threejs-addon/post-processing/unreal-bloom-pass.js"],"names":[],"mappings":";;;AAAA,iCASe;AACf,uCAAiD;AACjD,4DAAsD;AACtD,wFAAkF;AAElF;;;;;;;;GAQG;AACH,MAAM,eAAgB,SAAQ,cAAI;IAE9B,YAAY,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS;QAE/C,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,QAAQ,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,CAAC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{ ViralContextMenu } from "./components/context-menu/viral-context-menu";
15
15
  import { ViralCentralizedEventHandler } from "./components/centralized-event-handler/viral-centralized-event-handler";
16
16
  import { ViralLoader } from "./components/loader/viral.loader";
17
17
  import { ViralStats } from "./components/stats/viral-stats";
18
+ import { ViralPostProcessing } from "./components/post-processing/viral-post-processing";
18
19
  export declare class ViralViewerApi {
19
20
  options: ViewerOptions;
20
21
  targetElement: HTMLElement;
@@ -30,6 +31,7 @@ export declare class ViralViewerApi {
30
31
  viralAnimation: ViralAnimation;
31
32
  viralCentralizedEventHandler: ViralCentralizedEventHandler;
32
33
  viralLoader: ViralLoader;
34
+ viralPostProcessing: ViralPostProcessing;
33
35
  viralCompressProcessor: ViralCompressProcessor;
34
36
  worker3: ViralViewerWorker3;
35
37
  localStorageService: LocalStorageService;
@@ -17,6 +17,7 @@ const viral_context_menu_1 = require("./components/context-menu/viral-context-me
17
17
  const viral_centralized_event_handler_1 = require("./components/centralized-event-handler/viral-centralized-event-handler");
18
18
  const viral_loader_1 = require("./components/loader/viral.loader");
19
19
  const viral_stats_1 = require("./components/stats/viral-stats");
20
+ const viral_post_processing_1 = require("./components/post-processing/viral-post-processing");
20
21
  class ViralViewerApi {
21
22
  constructor(options) {
22
23
  this.viralCompressProcessor = new viral_compress_processor_1.ViralCompressProcessor();
@@ -34,6 +35,7 @@ class ViralViewerApi {
34
35
  this.viralMouse = new viral_mouse_1.ViralMouse(this);
35
36
  this.viralKeyboard = new viral_keyboard_1.ViralKeyboard(this);
36
37
  this.viralAnimation = new viral_animation_1.ViralAnimation(this);
38
+ this.viralPostProcessing = new viral_post_processing_1.ViralPostProcessing(this);
37
39
  this.viralCentralizedEventHandler = new viral_centralized_event_handler_1.ViralCentralizedEventHandler(this);
38
40
  this.viralLoader = new viral_loader_1.ViralLoader(this);
39
41
  this.worker3 = new viral_viewer_3_worker_1.ViralViewerWorker3(this);
@@ -1 +1 @@
1
- {"version":3,"file":"viral-viewer-api.js","sourceRoot":"","sources":["../src/vi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