struct Scene3D
Swift
struct Scene3D
A viewport onto 3D content: cards, boxes and lights, drawn with depth, perspective and simple lighting, and optionally orbited with the pointer.
Objects are identified by the ids given to Plane3D and Box3D, so a
rebuild with new transforms moves them rather than replacing them, and
.animation3D(_:) eases the move.
Sources/LavaUI/Spatial.swift:811
Constructors
init(camera: Camera3D = .perspective(), width: Dimension = .auto, height: Dimension = .auto, flexGrow: Float = 0, cameraControls: CameraControls3D? = nil, @View3DBuilder content: () -> [SpatialElement])
Creates a scene. Every parameter matches the property of the same name.
Sources/LavaUI/Spatial.swift:825
Properties
var camera: Camera3D
The camera the scene is seen through. With cameraControls, the pointer moves it.
Sources/LavaUI/Spatial.swift:813
var cameraControls: CameraControls3D?
How the pointer orbits, pans and zooms the camera, or nil for a fixed camera.
Sources/LavaUI/Spatial.swift:815
var dumpDetail: String { get }
Not documented.
Sources/LavaUI/Spatial.swift:836
var flexGrow: Float
Share of the parent's leftover main-axis space the viewport takes.
Sources/LavaUI/Spatial.swift:821
var height: Dimension
Height of the viewport.
Sources/LavaUI/Spatial.swift:819
var width: Dimension
Width of the viewport.
Sources/LavaUI/Spatial.swift:817
Methods
func mountPrimitive() -> any AnyViewNode
Not documented.
Sources/LavaUI/Spatial.swift:838
func reconcilePrimitive(_ node: any AnyViewNode) -> any AnyViewNode
Not documented.
Sources/LavaUI/Spatial.swift:847