viral-viewer-2 4.6.3 → 4.6.5
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.
- package/dist/components/post-processing/post-processing-renderer.d.ts +5 -2
- package/dist/components/post-processing/post-processing-renderer.js +8 -2
- package/dist/components/post-processing/post-processing-renderer.js.map +1 -1
- package/dist/components/renderer/viral-renderer.js +3 -1
- package/dist/components/renderer/viral-renderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { Camera, Scene, WebGLRenderer } from "three";
|
|
2
2
|
import { EffectComposer } from "../../threejs-addon/post-processing/effect-composer";
|
|
3
|
+
import { RenderPass } from "../../threejs-addon/post-processing/render-pass";
|
|
3
4
|
import { SAOPass } from "../../threejs-addon/post-processing/sao-pass";
|
|
4
|
-
import {
|
|
5
|
+
import { ShaderPass } from "../../threejs-addon/post-processing/shader-pass";
|
|
5
6
|
export declare class PostProcessingRenderer {
|
|
6
7
|
private renderer;
|
|
7
8
|
composer: EffectComposer;
|
|
8
|
-
renderPass:
|
|
9
|
+
renderPass: RenderPass | null;
|
|
9
10
|
saoPass: SAOPass | null;
|
|
11
|
+
shaderPass: ShaderPass;
|
|
10
12
|
constructor(renderer: WebGLRenderer);
|
|
11
13
|
render(): void;
|
|
12
14
|
initRenderPass(scene: Scene, camera: Camera): void;
|
|
13
15
|
initSAOPass(scene: Scene, camera: Camera): void;
|
|
14
16
|
turnOnSAOPass(): void;
|
|
17
|
+
turnOnShaderPass(): void;
|
|
15
18
|
}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PostProcessingRenderer = void 0;
|
|
4
4
|
const effect_composer_1 = require("../../threejs-addon/post-processing/effect-composer");
|
|
5
|
+
const render_pass_1 = require("../../threejs-addon/post-processing/render-pass");
|
|
5
6
|
const sao_pass_1 = require("../../threejs-addon/post-processing/sao-pass");
|
|
6
|
-
const
|
|
7
|
+
const shader_pass_1 = require("../../threejs-addon/post-processing/shader-pass");
|
|
8
|
+
const fxaa_shader_1 = require("../../threejs-addon/shaders/fxaa-shader");
|
|
7
9
|
class PostProcessingRenderer {
|
|
8
10
|
constructor(renderer) {
|
|
9
11
|
this.renderer = renderer;
|
|
@@ -11,13 +13,14 @@ class PostProcessingRenderer {
|
|
|
11
13
|
this.saoPass = null;
|
|
12
14
|
this.composer = new effect_composer_1.EffectComposer(this.renderer);
|
|
13
15
|
this.composer.setSize(window.innerWidth, window.innerHeight);
|
|
16
|
+
this.shaderPass = new shader_pass_1.ShaderPass(fxaa_shader_1.FXAAShader);
|
|
14
17
|
}
|
|
15
18
|
render() {
|
|
16
19
|
this.composer.render();
|
|
17
20
|
}
|
|
18
21
|
initRenderPass(scene, camera) {
|
|
19
22
|
if (!this.renderPass) {
|
|
20
|
-
this.renderPass = new
|
|
23
|
+
this.renderPass = new render_pass_1.RenderPass(scene, camera);
|
|
21
24
|
this.composer.addPass(this.renderPass);
|
|
22
25
|
}
|
|
23
26
|
}
|
|
@@ -35,6 +38,9 @@ class PostProcessingRenderer {
|
|
|
35
38
|
turnOnSAOPass() {
|
|
36
39
|
this.composer.addPass(this.saoPass);
|
|
37
40
|
}
|
|
41
|
+
turnOnShaderPass() {
|
|
42
|
+
this.composer.addPass(this.shaderPass);
|
|
43
|
+
}
|
|
38
44
|
}
|
|
39
45
|
exports.PostProcessingRenderer = PostProcessingRenderer;
|
|
40
46
|
//# sourceMappingURL=post-processing-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-processing-renderer.js","sourceRoot":"","sources":["../../../src/components/post-processing/post-processing-renderer.ts"],"names":[],"mappings":";;;AACA,yFAAqF;
|
|
1
|
+
{"version":3,"file":"post-processing-renderer.js","sourceRoot":"","sources":["../../../src/components/post-processing/post-processing-renderer.ts"],"names":[],"mappings":";;;AACA,yFAAqF;AACrF,iFAA6E;AAC7E,2EAAuE;AAEv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C,OAAO,CAAC,MAAM,CAAC,eAAe,GAAG,EAAE,CAAA;YACxC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,GAAG,CAAC,CAAA;SACzC;IACH,CAAC;IAEM,aAAa;QAClB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAEM,gBAAgB;QACrB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;CACF;AA5CD,wDA4CC"}
|
|
@@ -8,7 +8,9 @@ class ViralRenderer {
|
|
|
8
8
|
this.viralViewerApi = viralViewerApi;
|
|
9
9
|
this.renderer = new three_1.WebGLRenderer({
|
|
10
10
|
alpha: true,
|
|
11
|
-
antialias:
|
|
11
|
+
antialias: false,
|
|
12
|
+
stencil: false,
|
|
13
|
+
depth: false,
|
|
12
14
|
logarithmicDepthBuffer: true,
|
|
13
15
|
powerPreference: "high-performance",
|
|
14
16
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viral-renderer.js","sourceRoot":"","sources":["../../../src/components/renderer/viral-renderer.ts"],"names":[],"mappings":";;;AAAA,iCAA8E;AAE9E,0FAAqF;AAErF,MAAa,aAAa;
|
|
1
|
+
{"version":3,"file":"viral-renderer.js","sourceRoot":"","sources":["../../../src/components/renderer/viral-renderer.ts"],"names":[],"mappings":";;;AAAA,iCAA8E;AAE9E,0FAAqF;AAErF,MAAa,aAAa;IAYxB,YAAmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QAXjD,aAAQ,GAAkB,IAAI,qBAAa,CAAC;YAC1C,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,KAAK;YAChB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK;YACZ,sBAAsB,EAAE,IAAI;YAC5B,eAAe,EAAE,kBAAkB;SACpC,CAAC,CAAC;QAKD,IAAI,CAAC,QAAQ,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