This repository was archived by the owner on Jul 11, 2025. It is now read-only.
0.8.1
- Added
readEnvironmentvariants for reading specific key paths from the environment
readEnvironment(\.naturalUpDirection) { naturalUp in
Cylinder(diameter: 1, height: 10)
.rotated(to: naturalUp ?? .up)
}- Added an
@EnvironmentValueproperty wrapper that can be used inShape2D/Shape3Dfor accessing values from the environment.
struct HollowBall: Shape3D {
let diameter: Double
let mountDiameter: Double
@EnvironmentValue(\.tolerance) var tolerance
var body: any Geometry3D {
Sphere(diameter: diameter)
.subtracting {
Cylinder(diameter: mountDiameter + tolerance, height: diameter)
}
}
}