Post not yet marked as solved
I had a question while researching the layout of spatial views in visionOS. As I understand it, in a 2D plan layout GeometryReader can take the suggested dimensions provided by the parent view. In 3D spatial Layout, GeometryReader3D can obtain additional depth value. However, in layout's SizeThatFits function, ProposedViewSize passed by parent view to child view does not contain depth information. How does GeometryReader3D access this depth information?
Post not yet marked as solved
The source code for visionOS's WWDC23 session, Take SwiftUI to the next dimension, suddenly makes extensive use of GestureState. However, there is no sample code that shows the full extent of GestureState, nor is there any explanation of its use in the video.
I cannot proceed with understanding unless you share information about this.
https://developer.apple.com/videos/play/wwdc2023/10113/?time=969
URL of the capture of the part of the video where GestureState is used. (An error occurred when uploading the image.)
https://imgur.com/a/ZAeWk2k
Sincerely,
Sadao Tokuyama
https://twitter.com/tokufxug
https://www.linkedin.com/in/sadao-tokuyama/
Post not yet marked as solved
Hi,
The video of "Take SwiftUI to the next dimension" is interesting but the code snippets that are provided are not enough.
Would it be possible to have the complete project associated with this video?
In general, it would be very useful to have the complete projects of all the videos on "Spacial Computing".
Post not yet marked as solved
Hi! I have been playing with Model3D lately. It's great! I had this idea of having a LazyVGrid of product images with some Model3Ds in it as well. Here's what it looks like:
I'm using the satellite from the Hello World sample for my tests. The model is initially sized and centered correctly.
However, when I click on one of the product cards to go to its detail page and then come back to the grid, the model of the satellite is suddenly very small. Here's what it looks like:
I'm not sure why this is happening. This is how I load the model:
Model3D(named: product.modelName, bundle: worldAssetsBundle) { phase in
switch phase {
case .empty:
ProgressView()
case let .failure(error):
Text(error.localizedDescription)
case let .success(model):
Color.clear.overlay {
model
.resizable()
.scaledToFit()
}
}
}
}
Thanks for any help!
Post not yet marked as solved
I downloaded Xcode 15 beta but don't see RealityView or Model3D as being available.
Excited to see SwiftUI not relying on UIKit interfacing for 3D!