File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -771,9 +771,21 @@ function BookMesh({
771771 // Tip the book out of the row and yaw it so the cover peeks out.
772772 // This replaces the last-read emphasis too: the book settles back
773773 // onto the board and follows the ordinary hover animation.
774+ //
775+ // The yaw pivots around the trailing back corner instead of the
776+ // book's center: a center pivot sweeps that corner sideways into
777+ // the neighboring book (~0.1 units vs a 0.006 gap — visible
778+ // clipping). With the corner pinned, the rest of the book swings
779+ // forward-out in front of the row, which can't intersect anything.
780+ const theta = - 0.3 ;
781+ const px = width / 2 ;
782+ const pz = - BOOK_DEPTH / 2 ;
783+ const offX = px - ( px * Math . cos ( theta ) + pz * Math . sin ( theta ) ) ;
784+ const offZ = pz - ( - px * Math . sin ( theta ) + pz * Math . cos ( theta ) ) ;
774785 ty = shelfY ;
775- tz = position [ 2 ] + 0.42 ;
776- ry = - 0.3 ;
786+ tx = position [ 0 ] + offX ;
787+ tz = position [ 2 ] + 0.46 + offZ ;
788+ ry = theta ;
777789 }
778790
779791 g . position . x += ( tx - g . position . x ) * k ;
You can’t perform that action at this time.
0 commit comments