Skip to content

Commit

Permalink
Merge pull request #41 from MasatoMakino/bump-peerdependencies
Browse files Browse the repository at this point in the history
bump : three.js r160
  • Loading branch information
MasatoMakino committed Jan 27, 2024
2 parents dbba029 + a62b861 commit 279a464
Show file tree
Hide file tree
Showing 5 changed files with 1,348 additions and 5,706 deletions.
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

0 comments on commit 279a464

Please sign in to comment.