viral-viewer-2 3.8.4 → 3.8.7
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/ambient-occlusion-effect.d.ts +2 -0
- package/dist/components/post-processing/ambient-occlusion-effect.js +4 -0
- package/dist/components/post-processing/ambient-occlusion-effect.js.map +1 -1
- package/dist/components/renderer/viral-renderer.js +6 -6
- package/dist/components/renderer/viral-renderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EffectComposer } from "../../threejs-addon/post-processing/effect-composer";
|
|
2
|
+
import { OutputPass } from "../../threejs-addon/post-processing/output-pass";
|
|
2
3
|
import { RenderPass } from "../../threejs-addon/post-processing/render-pass";
|
|
3
4
|
import { SAOPass } from "../../threejs-addon/post-processing/sao-pass";
|
|
4
5
|
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
@@ -7,5 +8,6 @@ export declare class AmbientOcclusionEffect {
|
|
|
7
8
|
composer: EffectComposer | null;
|
|
8
9
|
renderPass: RenderPass | null;
|
|
9
10
|
saoPass: SAOPass | null;
|
|
11
|
+
outputPass: OutputPass | null;
|
|
10
12
|
constructor(viralViewerApi: ViralViewerApi);
|
|
11
13
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AmbientOcclusionEffect = void 0;
|
|
4
4
|
const effect_composer_1 = require("../../threejs-addon/post-processing/effect-composer");
|
|
5
|
+
const output_pass_1 = require("../../threejs-addon/post-processing/output-pass");
|
|
5
6
|
const render_pass_1 = require("../../threejs-addon/post-processing/render-pass");
|
|
6
7
|
const sao_pass_1 = require("../../threejs-addon/post-processing/sao-pass");
|
|
7
8
|
class AmbientOcclusionEffect {
|
|
@@ -11,6 +12,7 @@ class AmbientOcclusionEffect {
|
|
|
11
12
|
//effect
|
|
12
13
|
this.renderPass = null;
|
|
13
14
|
this.saoPass = null;
|
|
15
|
+
this.outputPass = null;
|
|
14
16
|
if (this.viralViewerApi.viralScene) {
|
|
15
17
|
this.composer = new effect_composer_1.EffectComposer(this.viralViewerApi.viralRenderer.renderer);
|
|
16
18
|
this.composer.setSize(this.viralViewerApi.targetElement.offsetWidth, this.viralViewerApi.targetElement.offsetHeight);
|
|
@@ -23,8 +25,10 @@ class AmbientOcclusionEffect {
|
|
|
23
25
|
this.saoPass.params.saoKernelRadius = 40;
|
|
24
26
|
this.saoPass.params.saoBlurRadius = 4;
|
|
25
27
|
this.saoPass.params.saoMinResolution = 0;
|
|
28
|
+
this.outputPass = new output_pass_1.OutputPass();
|
|
26
29
|
this.composer.addPass(this.renderPass);
|
|
27
30
|
this.composer.addPass(this.saoPass);
|
|
31
|
+
this.composer.addPass(this.outputPass);
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ambient-occlusion-effect.js","sourceRoot":"","sources":["../../../src/components/post-processing/ambient-occlusion-effect.ts"],"names":[],"mappings":";;;AAAA,yFAAqF;AACrF,iFAA6E;AAC7E,2EAAuE;AAGvE,MAAa,sBAAsB;
|
|
1
|
+
{"version":3,"file":"ambient-occlusion-effect.js","sourceRoot":"","sources":["../../../src/components/post-processing/ambient-occlusion-effect.ts"],"names":[],"mappings":";;;AAAA,yFAAqF;AACrF,iFAA6E;AAC7E,iFAA6E;AAC7E,2EAAuE;AAGvE,MAAa,sBAAsB;IAOjC,YAAoB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QANlD,aAAQ,GAA0B,IAAI,CAAC;QACvC,QAAQ;QACR,eAAU,GAAsB,IAAI,CAAC;QACrC,YAAO,GAAmB,IAAI,CAAC;QAC/B,eAAU,GAAsB,IAAI,CAAC;QAGnC,IAAI,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;YAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,gCAAc,CAChC,IAAI,CAAC,c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AAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;SACvC;IACH,CAAC;CACF;AA3CD,wDA2CC"}
|
|
@@ -6,20 +6,20 @@ class ViralRenderer {
|
|
|
6
6
|
constructor(viralViewerApi) {
|
|
7
7
|
this.viralViewerApi = viralViewerApi;
|
|
8
8
|
this.renderer = new three_1.WebGLRenderer({
|
|
9
|
-
alpha: true,
|
|
9
|
+
// alpha: true,
|
|
10
10
|
antialias: true,
|
|
11
|
-
logarithmicDepthBuffer: true,
|
|
12
|
-
powerPreference: "high-performance",
|
|
11
|
+
// logarithmicDepthBuffer: true,
|
|
12
|
+
// powerPreference: "high-performance",
|
|
13
13
|
});
|
|
14
14
|
this.setupRenderer();
|
|
15
15
|
}
|
|
16
16
|
setupRenderer() {
|
|
17
17
|
this.renderer.shadowMap.enabled = true;
|
|
18
18
|
this.renderer.shadowMap.type = three_1.PCFSoftShadowMap;
|
|
19
|
-
this.renderer.setClearColor(0xffffff, 0);
|
|
19
|
+
// this.renderer.setClearColor(0xffffff, 0);
|
|
20
20
|
this.renderer.setSize(this.viralViewerApi.targetElement.offsetWidth, this.viralViewerApi.targetElement.offsetHeight);
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
this.renderer.toneMappingExposure = 1;
|
|
22
|
+
this.renderer.toneMapping = three_1.NoToneMapping;
|
|
23
23
|
// this.renderer.gammaOutput = true
|
|
24
24
|
// this.renderer.gammaInput = true
|
|
25
25
|
// this.renderer.gammaFactor = 2.2
|
|
@@ -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","sourceRoot":"","sources":["../../../src/components/renderer/viral-renderer.ts"],"names":[],"mappings":";;;AAAA,iCAA8E;AAG9E,MAAa,aAAa;IAOxB,YAAmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QANjD,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