|
37 | 37 | camera.position.z = 3.5; |
38 | 38 |
|
39 | 39 | // Lighting |
40 | | - const ambient = new THREE.AmbientLight(0xfff1de, 0.08); |
| 40 | + const ambient = new THREE.AmbientLight(0xfff1de, 0.05); |
41 | 41 | scene.add(ambient); |
42 | 42 |
|
43 | 43 | const keyLight = new THREE.DirectionalLight(0xffe5c8, 6.8); |
44 | | - keyLight.position.set(4.2, 5.8, -1.2); |
| 44 | + keyLight.position.set(4.2, 7.8, -2); |
45 | 45 | keyLight.castShadow = true; |
46 | 46 | keyLight.shadow.mapSize.set(isMobile ? 1024 : 2048, isMobile ? 1024 : 2048); |
47 | 47 | keyLight.shadow.camera.near = 0.5; |
|
54 | 54 | keyLight.shadow.normalBias = 0.03; |
55 | 55 | scene.add(keyLight); |
56 | 56 |
|
57 | | - const rimLight = new THREE.DirectionalLight(0xc8dcff, 1); |
58 | | - rimLight.position.set(-4.5, 2.4, -5.2); |
| 57 | + const rimLight = new THREE.DirectionalLight(0x407ce3, 3); |
| 58 | + rimLight.position.set(-4.5, 2.4, -3.2); |
59 | 59 | scene.add(rimLight); |
60 | 60 |
|
61 | 61 | // Pivot group for rotation |
|
697 | 697 | const screenTop = projectToScreen(dimDef.top, cw, ch); |
698 | 698 | const screenBot = projectToScreen(dimDef.bottom, cw, ch); |
699 | 699 |
|
700 | | - const dimOffset = -56; |
| 700 | + const dimOffset = -86; |
701 | 701 | const dx = Math.min(screenTop.x, screenBot.x) + dimOffset; |
702 | 702 | const tickLen = 8; |
703 | 703 |
|
|
721 | 721 | const midY = (screenTop.y + screenBot.y) / 2; |
722 | 722 | dimLabel.style.opacity = dimFadeIn; |
723 | 723 | dimLabel.textContent = '18.9 cm'; |
724 | | - dimLabel.style.transform = `translate(${dx - 6}px, ${midY}px) translate(-100%, -50%) rotate(-90deg)`; |
| 724 | + dimLabel.style.transform = `translate(${dx }px, ${midY}px) translate(-100%, -50%) rotate(-90deg)`; |
725 | 725 | } |
726 | 726 | } |
727 | 727 |
|
|
0 commit comments