struct BookshelfLayout3D
Swift
struct BookshelfLayout3D
Two stacks of books around a face-on cover: neighbours stand on the shelf at a steep yaw so a sliver of their front is still readable, and the focused item turns to face the camera.
Index 0 is the left of the list, not of the screen. The focused card sits at x = 0; everything before it packs into the left stack, everything after into the right. An empty stack is just an empty stack.
Sources/LavaUI/Spatial.swift:325
Constructors
init(stackOrigin: Float = 1.05, stackPitch: Float = 0.16, stackRecede: Float = 0.07, bookAngle: Angle3D = .degrees(62), focusDepth: Float = 0.55, focusLift: Float = 0.06, focusScale: Float = 1.06)
Not documented.
Sources/LavaUI/Spatial.swift:339
Properties
var bookAngle: Angle3D
Yaw of a book in the stack. Large enough to read as a spine-on-shelf pose; small enough that the cover is still visible.
Sources/LavaUI/Spatial.swift:334
var focusDepth: Float
Not documented.
Sources/LavaUI/Spatial.swift:335
var focusLift: Float
Not documented.
Sources/LavaUI/Spatial.swift:336
var focusScale: Float
Not documented.
Sources/LavaUI/Spatial.swift:337
var stackOrigin: Float
World x of the first book in a stack, measured from the focused card.
Sources/LavaUI/Spatial.swift:327
var stackPitch: Float
How tightly later books pack along x. Small on purpose: a stack, not a row.
Sources/LavaUI/Spatial.swift:329
var stackRecede: Float
How far each further book steps back.
Sources/LavaUI/Spatial.swift:331
Methods
static func bookStacks(stackOrigin: Float = 1.05, stackPitch: Float = 0.16, bookAngle: Angle3D = .degrees(62)) -> BookshelfLayout3D
Not documented.
Sources/LavaUI/Spatial.swift:357
func pose(at index: Int, itemCount: Int, focusedIndex: Int?, itemHeight: Float = 0) -> CatalogPose3D
Not documented.
Sources/LavaUI/Spatial.swift:367
func recommendedMinimumCameraDistance(itemCount: Int, itemWidth: Float, itemHeight: Float, clearance: Float = 2.2) -> Float
Not documented.
Sources/LavaUI/Spatial.swift:393