close
Skip to content

Commit fcfeba5

Browse files
committed
feat: keep dense book mass through shelf lod
1 parent c74f07e commit fcfeba5

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

‎src/app/surf/DevWebSurf3D.tsx‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2981,10 +2981,10 @@ export default function DevWebSurf3D({
29812981
books.setMatrixAt(bookIndex, placeholderMatrix)
29822982

29832983
const variation =
2984-
.18 + ((seed % 9) / 8) * .18
2984+
.24 + ((seed % 9) / 8) * .24
29852985
books.setColorAt(
29862986
bookIndex,
2987-
new THREE.Color(0x2b3039).lerp(
2987+
new THREE.Color(0x596474).lerp(
29882988
accent,
29892989
variation,
29902990
),
@@ -3151,14 +3151,14 @@ export default function DevWebSurf3D({
31513151
fillerBookCount,
31523152
)
31533153
const fillerPalette = [
3154-
0x1a2230,
3155-
0x222b3c,
3156-
0x182833,
3157-
0x2c2338,
3158-
0x17313a,
3159-
0x252d58,
3160-
0x30365a,
3161-
0x20242c,
3154+
0x354257,
3155+
0x3b4861,
3156+
0x304b59,
3157+
0x493953,
3158+
0x315762,
3159+
0x424b7c,
3160+
0x4d557d,
3161+
0x3a404b,
31623162
]
31633163

31643164
let fillerIndex = 0
@@ -3971,16 +3971,16 @@ export default function DevWebSurf3D({
39713971

39723972
const distantShelfOpacity =
39733973
floorDistance <= 1
3974-
? .46
3974+
? .42
39753975
: floorDistance === 2
3976-
? .26
3977-
: .12
3976+
? .25
3977+
: .14
39783978
const distantBookOpacity =
39793979
floorDistance <= 1
3980-
? .34
3980+
? .62
39813981
: floorDistance === 2
3982-
? .2
3983-
: .09
3982+
? .4
3983+
: .18
39843984

39853985
placeholder.shelfMaterial.opacity =
39863986
isCurrentFloor
@@ -3995,7 +3995,7 @@ export default function DevWebSurf3D({
39953995
: 0
39963996
: distantBookOpacity
39973997
placeholder.bookMaterial.emissiveIntensity =
3998-
isCurrentFloor ? .018 : floorDistance <= 1 ? .035 : .012
3998+
isCurrentFloor ? .018 : floorDistance <= 1 ? .052 : .022
39993999
})
40004000

40014001
shelfCoverAtlasesByFloor.forEach((entries, floorIndex) => {
@@ -4010,10 +4010,10 @@ export default function DevWebSurf3D({
40104010
? .16
40114011
: 0
40124012
: floorDistance <= 1
4013-
? .5
4013+
? .58
40144014
: floorDistance === 2
4015-
? .28
4016-
: .12
4015+
? .34
4016+
: .16
40174017

40184018
entries.forEach(({mesh, material}) => {
40194019
mesh.visible = opacity > .01
@@ -4951,20 +4951,20 @@ export default function DevWebSurf3D({
49514951
? .12
49524952
: 0
49534953
: floorDistance <= 1
4954-
? .46
4954+
? .42
49554955
: floorDistance === 2
4956-
? .26
4957-
: .12
4956+
? .25
4957+
: .14
49584958
const normalBookTarget =
49594959
isCurrentFloor
49604960
? sparseCurrentFloor
49614961
? .12
49624962
: 0
49634963
: floorDistance <= 1
4964-
? .34
4964+
? .62
49654965
: floorDistance === 2
4966-
? .2
4967-
: .09
4966+
? .4
4967+
: .18
49684968

49694969
const shelfTarget = catalogLoadingRef.current
49704970
? Math.max(normalShelfTarget, isCurrentFloor ? .16 + catalogPulse * .035 : normalShelfTarget)
@@ -4987,8 +4987,8 @@ export default function DevWebSurf3D({
49874987
: isCurrentFloor
49884988
? .018
49894989
: floorDistance <= 1
4990-
? .035
4991-
: .012) -
4990+
? .052
4991+
: .022) -
49924992
placeholder.bookMaterial.emissiveIntensity) *
49934993
(1 - Math.exp(-delta * 4))
49944994
})

0 commit comments

Comments
 (0)