Skip to content

Commit

Permalink
examples: Change light intensity from 1 to PI
Browse files Browse the repository at this point in the history
Starting from r155, the light unit is set to physically based one by default.
We need to multiply the directional light intensity by PI because of this change.

See: mrdoob/three.js#26392
  • Loading branch information
0b5vr committed Jan 10, 2024
1 parent d4352ed commit ac686ce
Show file tree
Hide file tree
Showing 32 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion packages/three-vrm-core/examples/expressions.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-core/examples/firstPerson.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-core/examples/humanoid.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-core/examples/humanoidAnimation/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ controls.update();
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-core/examples/lookAt.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-core/examples/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
scene.add( light );

// gltf and vrm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
scene.add( light );

// gltf and vrm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
scene.add( light );

// test objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
scene.add( light );

// gltf and vrm
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-node-constraint/examples/aim.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 2.0, 3.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-node-constraint/examples/importer.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 2.0, 3.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-node-constraint/examples/roll.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 2.0, 3.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-node-constraint/examples/rotation.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 2.0, 3.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-node-constraint/examples/upper-arm.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 2.0, 3.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-springbone/examples/collider.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 2.0, 3.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-springbone/examples/loader-plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-springbone/examples/multiple.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 2.0, 3.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-springbone/examples/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 2.0, 3.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/animations.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/bones.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
scene.add( helperRoot );

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/dnd.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/expressions.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/firstperson.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/humanoidAnimation/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ controls.update();
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/lookat-advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/lookat.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/materials-debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/examples/mouse.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
const scene = new THREE.Scene();

// light
const light = new THREE.DirectionalLight( 0xffffff );
const light = new THREE.DirectionalLight( 0xffffff, Math.PI );
light.position.set( 1.0, 1.0, 1.0 ).normalize();
scene.add( light );

Expand Down

0 comments on commit ac686ce

Please sign in to comment.