Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump : three.js r160 #41

Merged
merged 1 commit into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demoSrc/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class Common {
}

static initLight(scene) {
const ambientLight = new AmbientLight(0xffffff, 1.0);
const ambientLight = new AmbientLight(0xffffff, Math.PI);
scene.add(ambientLight);
return ambientLight;
}
Expand Down Expand Up @@ -45,7 +45,7 @@ export class Common {
id: "webgl-canvas",
antialias: true,
},
option
option,
);
const renderer = new WebGLRenderer({
canvas: document.getElementById(option.id),
Expand Down
6 changes: 4 additions & 2 deletions demoSrc/demoBloom.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class StudyBloom {
const H = 480;

const scene = Common.initScene();
scene.fog = new Fog(0x000000, 80, 160);
Common.initLight(scene);
const camera = Common.initCamera(scene, W, H);
const renderer = Common.initRenderer(W, H);
Expand All @@ -35,6 +34,9 @@ export class StudyBloom {
this.bloom = new BloomEffectComposer(scene, renderer, {
renderPass: renderPass,
});
this.bloom.bloomPass.threshold = 0.385;
this.bloom.bloomPass.strength = 1.25;

const mixPass = new MixShaderPass(this.bloom.result);
const smaaPass = new SMAAPass(size.width, size.height);

Expand All @@ -46,7 +48,7 @@ export class StudyBloom {
}

initObject(scene) {
const spot = new PointLight(0xffffff, 3, 0, 2);
const spot = new PointLight(0xffffff, 6_000);
spot.position.set(0, 0, 0);
scene.add(spot);
const helper = new PointLightHelper(spot, 2, 0);
Expand Down
3 changes: 1 addition & 2 deletions demoSrc/demoChromaticAberration.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export class Study {
const H = 480;

const scene = Common.initScene();
scene.fog = new Fog(0x000000, 80, 160);
Common.initLight(scene);
const camera = Common.initCamera(scene, W, H);
const renderer = Common.initRenderer(W, H);
Expand All @@ -36,7 +35,7 @@ export class Study {
}

initObject(scene) {
const spot = new PointLight(0xffffff, 3, 0, 2);
const spot = new PointLight(0xffffff, 6000);
spot.position.set(0, 0, 0);
scene.add(spot);
const helper = new PointLightHelper(spot, 2, 0);
Expand Down
Loading