Apple Vision Pro 加载网络3D模型

324 阅读1分钟

截屏2023-07-03 16.30.01.png

截屏2023-07-03 16.28.13.png

截屏2023-07-03 16.37.36.png

截屏2023-07-03 16.37.56.png



struct ContentView: View {

    

    private let url = URL(string: "https://developer.apple.com/augmented-reality/quick-look/models/retrotv/tv_retro.usdz")!

    var body: some View {

        NavigationStack {

            VStack {

                Text("Hello,鱼大爷")

                

                Model3D(url: url) { model **in**

                    model

                        .resizable()

                        .aspectRatio(contentMode: .fit)

                        .frame(width: 500, height: 500)

                } placeholder: {

                    ProgressView()

                }

            }

            .padding()

        }

    }

}