bunnyhero's random dev notes &c

quick tip: visualize volumetric window bounds on visionOS

sometimes you might want to see what the bounds of a window volume are, for debugging reasons. here's a quick and easy tip (assuming your volumetric window is filled with a RealityView):

in visionOS, .background() content is rendered on the far (back) side of views, whereas .border() content is rendered on the front (near) side, so you can do something like this:

RealityView { ...
}
.background {
    Color.clear.border(.yellow, width: 4)
}
.border(.yellow, width: 4)

which results in this: