WindowGroup(id: "Volumetic") { GeometryReader3D { geometry in VolumeView() .environment(appState) .volumeBaseplateVisibility(.visible) // 是否显示托盘,默认 .visible .scaleEffect(geometry.size.width / initialVolumeSize.width) } } .windowStyle(.volumetric) .windowResizability(.contentSize) .defaultSize(initialVolumeSize)
I can move it through the drag bar that comes with the UI, and change the size by dragging the edge of the plate. I want to use code to achieve the same effect, how to achieve it