Skip to content

Commit 765290a

Browse files
committed
Fix lights, background color, the camera is closer now
1 parent c0c368b commit 765290a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

NiclaSenseME-dashboard/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@
595595
var container = document.getElementById('3d');
596596
var loader = new THREE.GLTFLoader();
597597
var canvasDigits = document.getElementById('canvasDigits');
598-
scene.background = new THREE.Color(0x111111);
598+
scene.background = new THREE.Color(0x58585A);
599599
renderer.setSize(177, 177);
600600

601601
renderer.setPixelRatio(4);
@@ -613,27 +613,28 @@
613613
var geometry = new THREE.BoxGeometry(1, 1, 1);
614614
ledMaterial = new THREE.MeshBasicMaterial({ color: 0x111111 });
615615
ledObject = new THREE.Mesh(geometry, ledMaterial);
616-
ledObject.position.set(-4.5, 4, 0);
616+
// ledObject.position.set(-4.5, 4, 0);
617+
ledObject.position.set(9, -10, 0);
617618
arduinoModel.add(ledObject);
618619
arduinoModel.rotation.x = 270 * (Math.PI/180); // Show the bottom side of the board by default
619620
ledLight = new THREE.PointLight(0x111111, 3, 100);
620-
ledLight.position.set(-4.5, 4, -1);
621+
ledLight.position.set(8.7, -10, -5);
621622
arduinoModel.add(ledLight);
622623
var sphereSize = 1;
623624

624625
// Light
625626
const color = 0xFFFFFF;
626627
const intensity = 1;
627628
const light = new THREE.DirectionalLight(color, intensity);
628-
light.position.set(-20, 100, 0);
629+
light.position.set(0, 0, -50);
629630
light.target.position.set(0, 0, 0);
630631
scene.add(light);
631632
scene.add(light.target);
632-
var hemiLight = new THREE.HemisphereLight(0xffffff, 0xffffff, 1000);
633+
var hemiLight = new THREE.HemisphereLight(0xffffff, 0xffffff, 1);
633634
scene.add(hemiLight);
634635

635636
// Camera
636-
camera.position.set(0, 40, 0);
637+
camera.position.set(0, 25, 0);
637638
camera.rotation.y = Math.PI; // 180
638639
camera.lookAt(new THREE.Vector3(0, 0, 0));
639640
renderer.render(scene, camera);

0 commit comments

Comments
 (0)