viral-viewer-2 4.6.8 → 4.7.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.
- package/dist/components/post-processing/post-processing-renderer.d.ts +3 -1
- package/dist/components/post-processing/post-processing-renderer.js +7 -1
- package/dist/components/post-processing/post-processing-renderer.js.map +1 -1
- package/dist/components/renderer/viral-renderer.js +1 -0
- package/dist/components/renderer/viral-renderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ export declare class PostProcessingRenderer {
|
|
|
9
9
|
renderPass: RenderPass | null;
|
|
10
10
|
saoPass: SAOPass | null;
|
|
11
11
|
shaderPass: ShaderPass | null;
|
|
12
|
-
colorCorrectionPass: ShaderPass;
|
|
12
|
+
colorCorrectionPass: ShaderPass | null;
|
|
13
13
|
constructor(renderer: WebGLRenderer);
|
|
14
14
|
render(): void;
|
|
15
15
|
initRenderPass(scene: Scene, camera: Camera): void;
|
|
@@ -17,4 +17,6 @@ export declare class PostProcessingRenderer {
|
|
|
17
17
|
turnOnSAOPass(): void;
|
|
18
18
|
initShaderPass(): void;
|
|
19
19
|
turnOnShaderPass(): void;
|
|
20
|
+
initCorrectionColorPass(): void;
|
|
21
|
+
turnOnCorrectionColorPass(): void;
|
|
20
22
|
}
|
|
@@ -13,9 +13,9 @@ class PostProcessingRenderer {
|
|
|
13
13
|
this.renderPass = null;
|
|
14
14
|
this.saoPass = null;
|
|
15
15
|
this.shaderPass = null;
|
|
16
|
+
this.colorCorrectionPass = null;
|
|
16
17
|
this.composer = new effect_composer_1.EffectComposer(this.renderer);
|
|
17
18
|
this.composer.setSize(window.innerWidth, window.innerHeight);
|
|
18
|
-
this.colorCorrectionPass = new shader_pass_1.ShaderPass(color_correction_shader_1.ColorCorrectionShader);
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
21
|
this.composer.render();
|
|
@@ -52,6 +52,12 @@ class PostProcessingRenderer {
|
|
|
52
52
|
this.composer.addPass(this.shaderPass);
|
|
53
53
|
// this.composer.addPass(this.colorCorrectionPass);
|
|
54
54
|
}
|
|
55
|
+
initCorrectionColorPass() {
|
|
56
|
+
this.colorCorrectionPass = new shader_pass_1.ShaderPass(color_correction_shader_1.ColorCorrectionShader);
|
|
57
|
+
}
|
|
58
|
+
turnOnCorrectionColorPass() {
|
|
59
|
+
this.composer.addPass(this.colorCorrectionPass);
|
|
60
|
+
}
|
|
55
61
|
}
|
|
56
62
|
exports.PostProcessingRenderer = PostProcessingRenderer;
|
|
57
63
|
//# 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;AACrF,iFAA6E;AAC7E,2EAAuE;AAEvE,iFAA6E;AAC7E,yEAAqE;AACrE,iGAA4F;AAE5F,MAAa,sBAAsB;IAMjC,YAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;QAJ3C,eAAU,GAAsB,IAAI,CAAC;QACrC,YAAO,GAAmB,IAAI,CAAC;QAC/B,eAAU,GAAsB,IAAI,CAAC;
|
|
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;AAEvE,iFAA6E;AAC7E,yEAAqE;AACrE,iGAA4F;AAE5F,MAAa,sBAAsB;IAMjC,YAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;QAJ3C,eAAU,GAAsB,IAAI,CAAC;QACrC,YAAO,GAAmB,IAAI,CAAC;QAC/B,eAAU,GAAsB,IAAI,CAAC;QACrC,wBAAmB,GAAsB,IAAI,CAAC;QAE5C,IAAI,CAAC,QAAQ,GAAG,IAAI,gCAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClD,IAA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,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC;QACjD,IAAI,CAAC,UAAU,CAAC,QAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC,CAAC;QACvC,IAAI,CAAC,UAAU,CAAC,QAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;IAC1C,CAAC;IACM,gBAAgB;QACrB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvC,mDAAmD;IACrD,CAAC;IAEM,uBAAuB;QAC5B,IAAI,CAAC,mBAAmB,GAAG,IAAI,wBAAU,CAAC,+CAAqB,CAAC,CAAC;IAEnE,CAAC;IAEM,yBAAyB;QAC9B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;IACjD,CAAC;CACF;AA5DD,wDA4DC"}
|
|
@@ -15,6 +15,7 @@ class ViralRenderer {
|
|
|
15
15
|
});
|
|
16
16
|
this.renderer.shadowMap.enabled = true;
|
|
17
17
|
this.renderer.shadowMap.type = three_1.PCFSoftShadowMap;
|
|
18
|
+
this.renderer.outputColorSpace = three_1.SRGBColorSpace;
|
|
18
19
|
this.renderer.setClearColor(0xffffff, 0);
|
|
19
20
|
this.renderer.setSize(this.viralViewerApi.targetElement.offsetWidth, this.viralViewerApi.targetElement.offsetHeight);
|
|
20
21
|
this.viralViewerApi.targetElement.appendChild(this.renderer.domElement);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viral-renderer.js","sourceRoot":"","sources":["../../../src/components/renderer/viral-renderer.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"viral-renderer.js","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