![]() We can customize the loaded model before displaying it by adding two pieces of code: a content closure for the model that is returned and a placeholder view builder to specify a view that's displayed while the model is loading. ![]() I'll change it to display a 3D globe by importing RealityKit and changing the image to a model 3D view, referencing a USD file in my project called Globe. Here's the SwiftUI view, which displays that globe image. But what if I want to replace that 2D image with a 3D globe? Adding 3D content to a 2D window is easy using the model 3D view in RealityKit. Tapping the Planet Earth button on the left navigates to a detail view, which shows a 2D illustration of the Earth. ![]() For example, the World app uses SwiftUI to display a standard 2D window with a few buttons. SwiftUI is how you define your views and windows, and RealityKit lets you add 3D elements. Let's begin by exploring how RealityKit and SwiftUI work together. Finally, I'll talk about unlocking the potential of RealityKit with custom components and systems. Then I'll explain how you can handle input and bring your app to life with animation and Spatial Audio. You'll learn about the features of RealityView, which is a new SwiftUI view for 3D models and effects. Next, I'll examine the building blocks of RealityKit, entities like the Earth model and the components which implement its behaviors. I'll get started by talking about how you can use RealityKit together with SwiftUI to bring your app into the next dimension. I'm going to show you how to build the 3D elements of this Hello World experience using SwiftUI, RealityKit, and Reality Composer Pro. The third module, the Solar System, contains a fully immersive experience, which you can learn more about in other sessions. The second module, Objects in Orbit, immerses you in a model of the Earth, the Moon, and a satellite, demonstrating animations, Spatial Audio, and custom behaviors, like the trace which follows the satellite. The first module, Planet Earth, presents a 3D globe in its own window that you can interact with from any angle. ![]() But before I get to those concepts, let me take you through the three different modules that are a part of this experience. I'll use the Hello World experience to explain the concepts in this presentation. I'll also mention sessions that cover other concepts or go into more detail. In this presentation, I'll focus on some key features, like entities, components, and RealityView, which will introduce you to RealityKit and show you how to use it. ![]() And especially on xrOS, it offers a lot of features. RealityKit is a core 3D framework on Apple platforms. With RealityKit, you can augment your app's 2D windows with 3D content, bring 3D content front and center in a separate window, or bring yourself and your environment into an immersive experience. If you've already used RealityKit for building apps on other devices, you'll find that there's a lot in common. We introduced RealityKit in 2019 and have added a lot of new features since then. RealityKit is a framework for realistically rendering, animating, and simulating 3D models and effects. Today, I'm delighted to introduce you to the new RealityKit for creating spatial experiences. I'm John, and I'm an engineer on the RealityKit team. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |