diff --git a/Artifact/Model/ArtifactScenesViewModel.swift b/Artifact/Model/ArtifactScenesViewModel.swift new file mode 100644 index 0000000..3873391 --- /dev/null +++ b/Artifact/Model/ArtifactScenesViewModel.swift @@ -0,0 +1,128 @@ +import Foundation +import RealityKit +import ArtifactScenes + +enum SceneLoadingState { + case notLoaded + case loading + case loaded + case failed(Error) +} + +class ArtifactScenesViewModel: ObservableObject { + @Published var selectedSceneName: String + @Published private(set) var sceneLoadingState: SceneLoadingState = .notLoaded + + private var sceneCache: [String: Entity] = [:] + private var preloadTasks: Set> = [] + private let maxCacheSize = 4 + + private let journeyProgressManager = JourneyProgressManager() + + private var currentIndex: Int = 0 + private var artifacts: [Artifact] = [] + private var journeyPrefix: String = "" + + init(initialSceneName: String, artifacts: [Artifact] = [], journeyPrefix: String = "") { + self.selectedSceneName = initialSceneName + self.artifacts = artifacts + self.journeyPrefix = journeyPrefix + + if let initialIndex = artifacts.firstIndex(where: { $0.sceneName == initialSceneName }) { + self.currentIndex = initialIndex + } + } + + func selectScene(named sceneName: String) async { + // Run UI updates on main thread + await MainActor.run { + if let newIndex = artifacts.firstIndex(where: { $0.sceneName == sceneName }) { + currentIndex = newIndex + selectedSceneName = sceneName + } + } + + cancelPreloadTasks() + await loadSelectedAndPreloadNext() + + // if the scene loaded successfully, + // mark it as viewed in UserDefaults + if case .loaded = sceneLoadingState { + journeyProgressManager.markArtifactViewed(journeyPrefix: journeyPrefix, artifactName: sceneName) + } + } + + private func loadSelectedAndPreloadNext() async { + // Load current scene if needed + await loadSceneIfNeeded(named: selectedSceneName, priority: .high) + + // Preload next scenes + await preloadUpcomingScenes() + cleanupCache() + } + + private func loadSceneIfNeeded(named sceneName: String, priority: TaskPriority = .medium) async { + guard sceneCache[sceneName] == nil else { return } + + // Update loading state on main thread + await MainActor.run { + sceneLoadingState = .loading + } + + do { + let scene = try await Entity(named: "\(journeyPrefix)/\(journeyPrefix)_\(sceneName)", + in: artifactScenesBundle) + // Cache and update state on main thread + await MainActor.run { + sceneCache[sceneName] = scene + sceneLoadingState = .loaded + } + } catch { + print("Error loading scene \(sceneName): \(error)") + await MainActor.run { + sceneLoadingState = .failed(error) + } + } + } + + private func cancelPreloadTasks() { + preloadTasks.forEach { $0.cancel() } + preloadTasks.removeAll() + } + + private func preloadUpcomingScenes() async { + // Determine next scenes to preload + let upcomingIndices = getUpcomingIndices() + + // Create preload tasks + for index in upcomingIndices { + let sceneName = artifacts[index].sceneName + let task = Task(priority: .low) { + await loadSceneIfNeeded(named: sceneName) + } + preloadTasks.insert(task) + } + } + + private func getUpcomingIndices() -> [Int] { + let nextIndices = (currentIndex + 1)...(currentIndex + 2) + return nextIndices.filter { $0 < artifacts.count } + } + + private func cleanupCache() { + // Keep only current and adjacent models in cache + let keepIndices = Set((max(0, currentIndex - 1)...min(artifacts.count - 1, currentIndex + 2))) + let keepSceneNames = Set(keepIndices.map { artifacts[$0].sceneName }) + + // Remove scenes that are no longer needed + sceneCache = sceneCache.filter { keepSceneNames.contains($0.key) } + } + + func getCachedScene(named sceneName: String) -> Entity? { + return sceneCache[sceneName] + } + + deinit { + cancelPreloadTasks() + } +} diff --git a/Artifact/Model/DataModels.swift b/Artifact/Model/DataModels.swift index 9fdb5fc..965df5c 100644 --- a/Artifact/Model/DataModels.swift +++ b/Artifact/Model/DataModels.swift @@ -1,19 +1,20 @@ -struct Journey { +struct Journey: Codable, Identifiable { let imageUrl: String let title: String let description: String let artifactPrefix: String let artifacts: [Artifact] + var id: String { title } + static let sampleJourneys = [ Journey(imageUrl: "https://artifact-ios.s3.us-east-2.amazonaws.com/7.jpg", title: "7 wonders", description: "Embark on a journey to explore the legendary New 7 Wonders of the World, marvels that span continents and time. From the ancient walls that stretch across China to the towering statue overlooking Rio, each wonder tells a story of human achievement and cultural legacy. Encounter the architectural splendor of Petra, the timeless beauty of the Taj Mahal, and the majestic terraces of Machu Picchu. Stand before the enduring grandeur of Chichen Itza and the epic arches of the Roman Colosseum. This journey isn’t just about visiting places—it’s a path through history, mystery, and the extraordinary tales behind the world’s most iconic structures. Let each wonder inspire awe, ignite curiosity, and deepen your connection to the world’s shared heritage.", artifactPrefix: "7", artifacts: [Artifact(sceneName: "Colosseum", info: "This ancient amphitheater in Rome hosted gladiator battles and public spectacles, embodying the grandeur of Roman engineering and the era’s complex social life."), Artifact(sceneName: "Great_Wall", info: "A massive architectural feat, the Great Wall stretches thousands of miles across northern China, originally built to protect against invasions and now a symbol of resilience and history."), Artifact(sceneName: "Petra", info: "Known as the “Rose City” for its pink sandstone cliffs, Petra is an ancient city carved into rock, showcasing the Nabatean civilization's architectural and engineering prowess."),Artifact(sceneName: "Christ_the_Redeemer", info: "Towering above Rio de Janeiro, this colossal statue of Jesus Christ stands with open arms, symbolizing peace, protection, and a warm welcome to visitors from all over the world."), Artifact(sceneName: "Machu_Picchu", info: "Nestled high in the Andes, this Inca citadel is a marvel of ancient engineering, blending seamlessly with the rugged mountain landscape and offering insights into a lost civilization."), Artifact(sceneName: "Taj_Mahal", info: "Built as a monument of love, the Taj Mahal is a stunning marble mausoleum with intricate inlay work, gardens, and symmetry, reflecting the beauty and devotion of the Mughal era."), Artifact(sceneName: "Chichen_Itza", info: "Once a thriving Maya city, Chichen Itza is home to the iconic El Castillo pyramid, an architectural masterpiece that reveals the Maya’s advanced understanding of astronomy.")]), Journey(imageUrl: "https://artifact-ios.s3.us-east-2.amazonaws.com/solar-system.jpg", title: "Solar System", description: "Embark on a journey across the vast expanses of our solar system, where each planet holds unique mysteries and characteristics. From the fiery surface of Mercury to the distant, icy reaches of Neptune, explore the wonders orbiting our Sun. Glide past the swirling clouds of Jupiter, marvel at the rings of Saturn, and witness the vibrant landscapes of Mars. This journey invites you to experience the solar system’s scale, diversity, and the celestial beauty that lies beyond Earth, connecting us to the greater cosmos with every orbit.", artifactPrefix: "Solar", artifacts: [Artifact(sceneName: "Mercury", info: "The smallest planet and closest to the Sun, Mercury has extreme temperature shifts and a cratered surface, resembling Earth’s moon in appearance."), Artifact(sceneName: "Venus", info: "Often called Earth’s “sister planet” due to its similar size, Venus has a thick, toxic atmosphere and surface temperatures hot enough to melt lead."), Artifact(sceneName: "Earth", info: "The only planet known to support life, Earth has diverse ecosystems, abundant water, and a dynamic climate, making it uniquely habitable."), Artifact(sceneName: "Mars", info: "Known as the “Red Planet” for its rusty surface, Mars has vast deserts, canyons, and polar ice caps, and continues to intrigue scientists with the possibility of past water."), Artifact(sceneName: "Jupiter", info: "The largest planet, Jupiter is a gas giant with powerful storms, including the iconic Great Red Spot, and dozens of moons, making it a mini solar system."), Artifact(sceneName: "Saturn", info: "Famous for its stunning ring system, Saturn is a gas giant with a unique atmosphere and many moons, including Titan, which has its own weather patterns."), Artifact(sceneName: "Uranus", info: "Known for its unusual tilt, Uranus orbits the Sun on its side, has faint rings, and displays a pale blue color due to its icy atmosphere."), Artifact(sceneName: "Neptune", info: "The windiest planet in the solar system, Neptune is a deep blue gas giant with faint rings and a distant, cold orbit that marks the edge of the known planets.")])] } -struct Artifact: Identifiable { +struct Artifact: Identifiable, Codable { let sceneName: String let info: String - var id: String { - sceneName - } + + var id: String { sceneName } } diff --git a/Artifact/Model/JourneyProgressManager.swift b/Artifact/Model/JourneyProgressManager.swift new file mode 100644 index 0000000..b4b38da --- /dev/null +++ b/Artifact/Model/JourneyProgressManager.swift @@ -0,0 +1,18 @@ +import Foundation + +class JourneyProgressManager { + private let defaults = UserDefaults.standard + private let viewedArtifactsKey = "viewedArtifacts" + + func getViewedArtifacts(for journeyPrefix: String) -> Set { + let key = "\(viewedArtifactsKey)_\(journeyPrefix)" + return Set(defaults.stringArray(forKey: key) ?? []) + } + + func markArtifactViewed(journeyPrefix: String, artifactName: String) { + let key = "\(viewedArtifactsKey)_\(journeyPrefix)" + var viewed = getViewedArtifacts(for: journeyPrefix) + viewed.insert(artifactName) + defaults.set(Array(viewed), forKey: key) + } +} diff --git a/Artifact/Model/JourneyService.swift b/Artifact/Model/JourneyService.swift new file mode 100644 index 0000000..43adac0 --- /dev/null +++ b/Artifact/Model/JourneyService.swift @@ -0,0 +1,13 @@ +import Foundation + +class JourneyService { + private let apiURL = "https://gn4xt2b916.execute-api.us-east-2.amazonaws.com/prod/journeys" + private let apiKey = "tP731AxMWA61ISM5XIaUf3XSdLQf8n3EnC8Jc660" // throttled, so ok to be public + + func fetchJourneys() async throws -> [Journey] { + var request = URLRequest(url: URL(string: apiURL)!) + request.setValue(apiKey, forHTTPHeaderField: "x-api-key") + let (data, _) = try await URLSession.shared.data(for: request) + return try JSONDecoder().decode([Journey].self, from: data) + } +} diff --git a/Artifact/Model/JourneyViewModel.swift b/Artifact/Model/JourneyViewModel.swift deleted file mode 100644 index 12f6c3d..0000000 --- a/Artifact/Model/JourneyViewModel.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Foundation - -class JourneyViewModel: ObservableObject { - @Published var selectedSceneName: String - - init(initialSceneName: String) { - self.selectedSceneName = initialSceneName - } -} diff --git a/Artifact/Model/JourneysViewModel.swift b/Artifact/Model/JourneysViewModel.swift new file mode 100644 index 0000000..36f4d9d --- /dev/null +++ b/Artifact/Model/JourneysViewModel.swift @@ -0,0 +1,24 @@ +import Foundation + +@MainActor +class JourneysViewModel: ObservableObject { + @Published var journeys: [Journey] = [] + @Published var isLoading = false + @Published var error: Error? + + private let service = JourneyService() + + func loadJourneys() { + isLoading = true + + Task { + do { + journeys = try await service.fetchJourneys() + } catch { + self.error = error + } + isLoading = false + } + } +} + diff --git a/Artifact/Views/BottomSheetView.swift b/Artifact/Views/BottomSheetView.swift index e68c42a..89bf6db 100644 --- a/Artifact/Views/BottomSheetView.swift +++ b/Artifact/Views/BottomSheetView.swift @@ -3,12 +3,17 @@ import SwiftUI struct BottomSheetView: View { let sceneName: String let info: String - @ObservedObject var viewModel: JourneyViewModel + + let journeyProgressManager = JourneyProgressManager() + + @ObservedObject var viewModel: ArtifactScenesViewModel @State private var showingDetail = false var body: some View { Button(action: { - viewModel.selectedSceneName = sceneName + Task { + await viewModel.selectScene(named: sceneName) + } }) { VStack { HStack { @@ -48,5 +53,5 @@ struct BottomSheetView: View { } #Preview { - BottomSheetView(sceneName: "Chichen Itza", info: "Once a thriving Maya city, Chichen Itza is home to the iconic El Castillo pyramid, an architectural masterpiece that reveals the Maya’s advanced understanding of astronomy.", viewModel: .init(initialSceneName: "Chichen Itza")) + BottomSheetView(sceneName: "Chichen Itza", info: "Once a thriving Maya city, Chichen Itza is home to the iconic El Castillo pyramid, an architectural masterpiece that reveals the Maya’s advanced understanding of astronomy.", viewModel: .init(initialSceneName: "Chichen Itza", artifacts: [], journeyPrefix: "")) } diff --git a/Artifact/Views/ContentView.swift b/Artifact/Views/ContentView.swift index 54bedc7..56bf2ee 100644 --- a/Artifact/Views/ContentView.swift +++ b/Artifact/Views/ContentView.swift @@ -1,11 +1,13 @@ import SwiftUI struct ContentView: View { + @StateObject private var journeysViewModel = JourneysViewModel() + var body: some View { NavigationView { ScrollView { VStack(alignment: .leading, spacing: 16) { - ForEach(Journey.sampleJourneys, id: \.self.title) { journey in + ForEach(journeysViewModel.journeys, id: \.self.title) { journey in NavigationLink(destination: JourneyDetailView(journey)) { JourneyCardView(journey) } @@ -15,6 +17,9 @@ struct ContentView: View { .padding() } } + .onAppear { + journeysViewModel.loadJourneys() + } } } diff --git a/Artifact/Views/JourneyDetailView.swift b/Artifact/Views/JourneyDetailView.swift index d81d0b1..5caa103 100644 --- a/Artifact/Views/JourneyDetailView.swift +++ b/Artifact/Views/JourneyDetailView.swift @@ -2,35 +2,47 @@ import SwiftUI struct JourneyDetailView: View { let journey: Journey + let journeyProgressManager = JourneyProgressManager() + + @State private var viewedArtifactsCount: Int = 0 init(_ journey: Journey) { self.journey = journey } var body: some View { - ScrollView { - VStack(alignment: .leading, spacing: 16) { - headerContent - - NavigationLink(destination: JourneyRealityView(journey)) { - Text("Start Journey") - .font(.headline) - .frame(maxWidth: .infinity) - .padding() - .background(Color.blue) - .foregroundColor(.white) - .cornerRadius(10) - .padding(.horizontal) - } - .padding(.vertical, 8) - - Text(journey.description) - .font(.body) + ScrollView { + VStack(alignment: .leading, spacing: 16) { + headerContent + + Text("\(viewedArtifactsCount)/\(journey.artifacts.count) Artifacts discovered") + .font(.subheadline) + .foregroundColor(.secondary) + .padding(.horizontal) + + NavigationLink(destination: JourneyRealityView(journey)) { + Text("Start Journey") + .font(.headline) + .frame(maxWidth: .infinity) + .padding() + .background(Color.blue) + .foregroundColor(.white) + .cornerRadius(10) .padding(.horizontal) } - .padding() + .padding(.vertical, 8) + + Text(journey.description) + .font(.body) + .padding(.horizontal) } - .navigationTitle(journey.title) + .padding() + } + .onAppear { + viewedArtifactsCount = journeyProgressManager.getViewedArtifacts(for: journey.artifactPrefix).count + } + .navigationTitle(journey.title) + } @ViewBuilder diff --git a/Artifact/Views/JourneyRealityView.swift b/Artifact/Views/JourneyRealityView.swift index 4b932ad..8c8896a 100644 --- a/Artifact/Views/JourneyRealityView.swift +++ b/Artifact/Views/JourneyRealityView.swift @@ -6,29 +6,32 @@ import ArtifactScenes struct JourneyRealityView: View { let journey: Journey - @StateObject private var viewModel: JourneyViewModel + @StateObject private var artifactScenesViewModel: ArtifactScenesViewModel @State private var scale: Float = 1.0 @State private var rotation: Float = 0.0 @State private var position: SIMD3 = SIMD3(x: 0, y: 0.3, z: 0) + @State private var anchorEntity: AnchorEntity? + init(_ journey: Journey) { self.journey = journey - let initialSceneName: String - if let firstArtifact = journey.artifacts.first { - initialSceneName = firstArtifact.sceneName - } else { - initialSceneName = "" - } - - _viewModel = StateObject(wrappedValue: JourneyViewModel(initialSceneName: initialSceneName)) + let initialSceneName = journey.artifacts.first?.sceneName ?? "" + _artifactScenesViewModel = StateObject(wrappedValue: ArtifactScenesViewModel( + initialSceneName: initialSceneName, + artifacts: journey.artifacts, + journeyPrefix: journey.artifactPrefix + )) } - @State private var currentScene: Entity? - var body: some View { ZStack(alignment: .bottom) { realityView + if case .loading = artifactScenesViewModel.sceneLoadingState { + ProgressView() + .progressViewStyle(CircularProgressViewStyle()) + .scaleEffect(2.0) + } artifactSheets } } @@ -36,23 +39,17 @@ struct JourneyRealityView: View { var realityView: some View { RealityView { content in content.camera = .spatialTracking - if let scene = currentScene { - content.add(scene) - } - } update: { content in - content.entities.removeAll() - if let scene = currentScene { - content.add(scene) - } - } - .onAppear { + let anchor = AnchorEntity(plane: .horizontal, classification: .floor) + anchor.position = position + content.add(anchor) + anchorEntity = anchor + Task { - await loadScene(named: viewModel.selectedSceneName) + await artifactScenesViewModel.selectScene(named: artifactScenesViewModel.selectedSceneName) } - } - .onChange(of: viewModel.selectedSceneName) { + } update: { content in Task { - await loadScene(named: viewModel.selectedSceneName) + await updateScene() } } .gesture(scaleGesture) @@ -70,7 +67,7 @@ struct JourneyRealityView: View { ForEach(journey.artifacts) { artifact in BottomSheetView(sceneName: artifact.sceneName, info: artifact.info, - viewModel: viewModel) + viewModel: artifactScenesViewModel) } } .padding(.horizontal, 20) @@ -84,12 +81,13 @@ struct JourneyRealityView: View { let newScale = scale + delta let constrainedScale = min(max(newScale, 0.1), 3.0) - if let anchor = currentScene { - anchor.children.first?.scale = [constrainedScale, constrainedScale, constrainedScale] + if let anchor = anchorEntity, + let model = anchor.children.first { + model.scale = [constrainedScale, constrainedScale, constrainedScale] } } .onEnded { _ in - if let anchor = currentScene, + if let anchor = anchorEntity, let currentScale = anchor.children.first?.scale.x { scale = currentScale } @@ -100,8 +98,9 @@ struct JourneyRealityView: View { RotationGesture() .onChanged { angle in let newRotation = Float(angle.radians) + rotation - if let anchor = currentScene { - anchor.children.first?.orientation = simd_quatf(angle: newRotation, axis: SIMD3(0, 1, 0)) + if let anchor = anchorEntity, + let model = anchor.children.first { + model.orientation = simd_quatf(angle: newRotation, axis: SIMD3(0, 1, 0)) } } .onEnded { angle in @@ -114,46 +113,50 @@ struct JourneyRealityView: View { DragGesture() .onChanged { value in let translation = value.translation - let newX = position.x + Float(translation.width) * 0.005 - let newZ = position.z + Float(translation.height) * 0.005 + let newX = position.x + Float(translation.width) * 0.003 + let newZ = position.z + Float(translation.height) * 0.003 - if let anchor = currentScene { + if let anchor = anchorEntity { anchor.position = SIMD3(x: newX, y: position.y, z: newZ) } } .onEnded { _ in - if let anchor = currentScene { + if let anchor = anchorEntity { position = anchor.position } } } - @MainActor - private func loadScene(named sceneName: String) async { - do { - let scene = try await Entity(named: "\(journey.artifactPrefix)/\(journey.artifactPrefix)_\(sceneName)", in: artifactScenesBundle) - let anchor = AnchorEntity(plane: .horizontal, classification: .floor) - anchor.position = SIMD3(x: 0, y: 0.4, z: 0) - anchor.addChild(scene) - currentScene = anchor - } catch { - print("Error loading scene \(sceneName): \(error)") - } - } - private func resetScene() { scale = 1.0 rotation = 0.0 position = SIMD3(x: 0, y: 0.3, z: 0) - if let anchor = currentScene { + if let anchor = anchorEntity, + let model = anchor.children.first { anchor.position = position - if let model = anchor.children.first { - model.scale = [scale, scale, scale] - model.orientation = simd_quatf(angle: rotation, axis: SIMD3(0, 1, 0)) - } + model.scale = [scale, scale, scale] + model.orientation = simd_quatf(angle: rotation, axis: SIMD3(0, 1, 0)) + } + } + + @MainActor + private func updateScene() async { + guard let anchor = anchorEntity else { return } + + anchor.children.removeAll() + + // Get scene from cache + if let scene = artifactScenesViewModel.getCachedScene(named: artifactScenesViewModel.selectedSceneName)?.clone(recursive: true) { + configureScene(scene) + anchor.addChild(scene) } } + + private func configureScene(_ scene: Entity) { + scene.scale = [scale, scale, scale] + scene.orientation = simd_quatf(angle: rotation, axis: SIMD3(0, 1, 0)) + } } #Preview { diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/080F1D3A-CD06-4A94-9135-2C594D86ABED/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID b/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/080F1D3A-CD06-4A94-9135-2C594D86ABED/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID deleted file mode 100644 index 30e4dd4..0000000 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/080F1D3A-CD06-4A94-9135-2C594D86ABED/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID +++ /dev/null @@ -1,4 +0,0 @@ -{ - "materialPreviewEnvironmentType" : 2, - "materialPreviewObjectType" : 0 -} \ No newline at end of file diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/1839D52B-8E44-436B-8828-14E990F14525/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID b/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/1839D52B-8E44-436B-8828-14E990F14525/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID deleted file mode 100644 index 30e4dd4..0000000 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/1839D52B-8E44-436B-8828-14E990F14525/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID +++ /dev/null @@ -1,4 +0,0 @@ -{ - "materialPreviewEnvironmentType" : 2, - "materialPreviewObjectType" : 0 -} \ No newline at end of file diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/2DA748A8-592E-47CA-8A33-BDD0E34F13AB/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID b/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/2DA748A8-592E-47CA-8A33-BDD0E34F13AB/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID deleted file mode 100644 index 30e4dd4..0000000 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/2DA748A8-592E-47CA-8A33-BDD0E34F13AB/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID +++ /dev/null @@ -1,4 +0,0 @@ -{ - "materialPreviewEnvironmentType" : 2, - "materialPreviewObjectType" : 0 -} \ No newline at end of file diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/4A0FD71F-DAF4-4683-B49A-E196129C424E/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID b/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/4A0FD71F-DAF4-4683-B49A-E196129C424E/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID deleted file mode 100644 index 30e4dd4..0000000 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/4A0FD71F-DAF4-4683-B49A-E196129C424E/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID +++ /dev/null @@ -1,4 +0,0 @@ -{ - "materialPreviewEnvironmentType" : 2, - "materialPreviewObjectType" : 0 -} \ No newline at end of file diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/4D6F21B0-9DE3-4F39-9176-49F4BFCA0E77/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID b/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/4D6F21B0-9DE3-4F39-9176-49F4BFCA0E77/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID deleted file mode 100644 index 30e4dd4..0000000 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/4D6F21B0-9DE3-4F39-9176-49F4BFCA0E77/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID +++ /dev/null @@ -1,4 +0,0 @@ -{ - "materialPreviewEnvironmentType" : 2, - "materialPreviewObjectType" : 0 -} \ No newline at end of file diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/B136744D-6D64-4E4A-8C29-CCB04715F9CE/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID b/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/B136744D-6D64-4E4A-8C29-CCB04715F9CE/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID deleted file mode 100644 index 30e4dd4..0000000 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/B136744D-6D64-4E4A-8C29-CCB04715F9CE/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID +++ /dev/null @@ -1,4 +0,0 @@ -{ - "materialPreviewEnvironmentType" : 2, - "materialPreviewObjectType" : 0 -} \ No newline at end of file diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/E12B69A7-3D60-43A9-B84C-36943B66CF5D/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID b/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/E12B69A7-3D60-43A9-B84C-36943B66CF5D/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID deleted file mode 100644 index 30e4dd4..0000000 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/E12B69A7-3D60-43A9-B84C-36943B66CF5D/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID +++ /dev/null @@ -1,4 +0,0 @@ -{ - "materialPreviewEnvironmentType" : 2, - "materialPreviewObjectType" : 0 -} \ No newline at end of file diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/E49BF78C-ACA0-4276-BC1C-33DFBFAD9F26/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID b/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/E49BF78C-ACA0-4276-BC1C-33DFBFAD9F26/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID deleted file mode 100644 index 30e4dd4..0000000 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/PluginData/E49BF78C-ACA0-4276-BC1C-33DFBFAD9F26/ShaderGraphEditorPluginID/ShaderGraphEditorPluginID +++ /dev/null @@ -1,4 +0,0 @@ -{ - "materialPreviewEnvironmentType" : 2, - "materialPreviewObjectType" : 0 -} \ No newline at end of file diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/WorkspaceData/SceneMetadataList.json b/Packages/ArtifactScenes/Package.realitycomposerpro/WorkspaceData/SceneMetadataList.json index f35e55c..277f39e 100644 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/WorkspaceData/SceneMetadataList.json +++ b/Packages/ArtifactScenes/Package.realitycomposerpro/WorkspaceData/SceneMetadataList.json @@ -245,6 +245,15 @@ "E2C6AE17-1719-4283-8EA0-553586E5C510", "Root" ], + { + "isExpanded" : true, + "isLocked" : false + }, + [ + "E2C6AE17-1719-4283-8EA0-553586E5C510", + "Root", + "TAJ_MAHAL" + ], { "isExpanded" : true, "isLocked" : false diff --git a/Packages/ArtifactScenes/Package.realitycomposerpro/WorkspaceData/redenza.rcuserdata b/Packages/ArtifactScenes/Package.realitycomposerpro/WorkspaceData/redenza.rcuserdata index 42c2733..dda59f3 100644 --- a/Packages/ArtifactScenes/Package.realitycomposerpro/WorkspaceData/redenza.rcuserdata +++ b/Packages/ArtifactScenes/Package.realitycomposerpro/WorkspaceData/redenza.rcuserdata @@ -8,7 +8,9 @@ "Solar\/Solar_Neptune.usda", "Solar\/Solar_Saturn.usda", "Solar\/Solar_Uranus.usda", - "Solar\/Solar_Venus.usda" + "Solar\/Solar_Venus.usda", + "7\/7_Taj_Mahal.usda", + "7\/7_Machu_Picchu.usda" ], "recentIdentifiers" : { "922A76D1-888A-4F2C-9417-ECB16E34B94F" : [ @@ -23,6 +25,28 @@ }, "sceneCameraHistory" : { "07037D7F-89AB-4FBF-A528-7B7D1013B713" : [ + { + "date" : 753487492.642127, + "title" : "Untitled", + "transform" : [ + 0.2153632, + 3.1464886e-10, + 0.976534, + 0, + 0.7200083, + 0.67555445, + -0.15878949, + 0, + -0.6597019, + 0.7373102, + 0.14548957, + 0, + -2.0546465, + 2.2963576, + 0.45312828, + 1 + ] + }, { "date" : 753032965.041482, "title" : "Untitled", @@ -1014,222 +1038,222 @@ ], "E2C6AE17-1719-4283-8EA0-553586E5C510" : [ { - "date" : 753032929.662565, + "date" : 753487718.911617, "title" : "Untitled", "transform" : [ - 0.28257015, - -5.6793183e-09, - 0.95924664, + 0.26157922, + 1.0262849e-07, + 0.96518207, 0, - 0.42359832, - 0.89721465, - -0.124781474, + 0.48318908, + 0.8656674, + -0.13095178, 0, - -0.8606501, - 0.44159484, - 0.253526, + -0.8355266, + 0.5006197, + 0.22644058, 0, - -0.86852133, - 0.8153843, - -0.15476753, + -1.778872, + 1.4486784, + 0.79955566, 1 ] }, { - "date" : 753032916.01424, + "date" : 753487715.408803, "title" : "Untitled", "transform" : [ - 0.28257015, - -5.6793183e-09, - 0.95924664, + 0.26157922, + 1.0262849e-07, + 0.96518207, 0, - 0.42359832, - 0.89721465, - -0.124781474, + 0.48318908, + 0.8656674, + -0.13095178, 0, - -0.8606501, - 0.44159484, - 0.253526, + -0.8355266, + 0.5006197, + 0.22644058, 0, - -2.675913, - 2.512198, - -0.47683853, + -0.3679426, + 0.4867766, + 0.16538042, 1 ] }, { - "date" : 753032911.583698, + "date" : 753487603.328946, "title" : "Untitled", "transform" : [ - 0.28257015, - -5.6793183e-09, - 0.95924664, + 0.26157922, + 1.0262849e-07, + 0.96518207, 0, - 0.42359832, - 0.89721465, - -0.124781474, + 0.48318908, + 0.8656674, + -0.13095178, 0, - -0.86065, - 0.44159478, - 0.25352597, + -0.8355266, + 0.5006197, + 0.22644058, 0, - -2.1581385, - 3.514155, - -0.4643576, + -0.3621207, + 0.49720687, + 0.16380262, 1 ] }, { - "date" : 753032906.783503, + "date" : 753487500.932991, "title" : "Untitled", "transform" : [ - 0.977881, - -5.907897e-10, - -0.20916212, + 0.2615793, + 3.0798805e-08, + 0.96518195, 0, - -0.01506389, - 0.9974032, - -0.07042726, + 0.48318902, + 0.86566734, + -0.13095178, 0, - 0.20861886, - 0.07202035, - 0.97534156, + -0.8355266, + 0.50061965, + 0.22644071, 0, - -0.557757, - 2.6937237, - 2.4375308, + -0.4993616, + 0.7780553, + 0.4951496, 1 ] }, { - "date" : 753032477.72616, + "date" : 753487466.063612, "title" : "Untitled", "transform" : [ - 0.977881, - -5.907897e-10, - -0.20916212, + 0.2615793, + 3.0798805e-08, + 0.96518195, 0, - -0.01506389, - 0.9974032, - -0.07042726, + 0.48318902, + 0.86566734, + -0.13095178, 0, - 0.20861886, - 0.07202035, - 0.97534156, + -0.8355266, + 0.50061965, + 0.22644071, 0, - -8.529446, - 8.846262, - 37.275707, + -2.0106728, + 1.6835811, + 0.9047381, 1 ] }, { - "date" : 753032468.116731, + "date" : 753487438.715863, "title" : "Untitled", "transform" : [ - 0.977881, - -5.907897e-10, - -0.20916212, + 0.26157945, + -1.6036553e-08, + 0.96518195, 0, - -0.01506389, - 0.9974032, - -0.07042726, + 0.48318896, + 0.8656674, + -0.13095172, 0, - 0.20861886, - 0.07202035, - 0.97534156, + -0.8355266, + 0.5006197, + 0.22644068, 0, - -2.5761538, - 4.0010166, - 9.981548, + -0.6033592, + 0.67113376, + 0.1431145, 1 ] }, { - "date" : 753032462.411936, + "date" : 753487427.556956, "title" : "Untitled", "transform" : [ - 0.9778809, - -5.9078964e-10, - -0.20916209, + 0.26157945, + -1.6036553e-08, + 0.96518195, 0, - -0.01506389, - 0.9974032, - -0.07042726, + 0.48318896, + 0.8656674, + -0.13095172, 0, - 0.20861886, - 0.07202035, - 0.97534156, + -0.8355266, + 0.5006197, + 0.22644068, 0, - -2.0111713, - 5.078784, - 9.781117, + -0.6751507, + 0.5425141, + 0.1625711, 1 ] }, { - "date" : 753032459.491656, + "date" : 753487422.26754, "title" : "Untitled", "transform" : [ - 0.73360723, - -5.2842477e-09, - 0.67957366, + 0.26157945, + -1.6036553e-08, + 0.96518195, 0, - 0.4639801, - 0.73065054, - -0.5008716, + 0.48318896, + 0.8656674, + -0.13095172, 0, - -0.49653086, - 0.6827517, - 0.53601044, + -0.8355266, + 0.5006197, + 0.22644068, 0, - -5.653422, - 9.636428, - 0.6085546, + -1.3780994, + 0.8617197, + 0.33183575, 1 ] }, { - "date" : 753032452.788111, + "date" : 753487402.977336, "title" : "Untitled", "transform" : [ - 0.73360723, - -5.2842477e-09, - 0.67957366, + 0.26157945, + -1.6036553e-08, + 0.96518195, 0, - 0.4639801, - 0.73065054, - -0.5008716, + 0.48318896, + 0.8656674, + -0.13095172, 0, - -0.49653092, - 0.6827518, - 0.5360105, + -0.8355266, + 0.5006197, + 0.22644068, 0, - -16.015913, - 28.793936, - 1.4359293, + -1.2049747, + 1.1154478, + 0.40968686, 1 ] }, { - "date" : 753032438.799585, + "date" : 753487401.95552, "title" : "Untitled", "transform" : [ - 0.975045, - 6.1047505e-09, - -0.22200707, + 0.26157945, + -1.6036553e-08, + 0.96518195, 0, - -0.01199133, - 0.9985402, - -0.05266535, + 0.48318896, + 0.8656674, + -0.13095172, 0, - 0.22168297, - 0.05401324, - 0.9736217, + -0.8355266, + 0.5006197, + 0.22644068, 0, - 12.582969, - 40.116165, - 55.263817, + -1.2049747, + 1.1154478, + 0.40968686, 1 ] } @@ -1238,5 +1262,5 @@ "sceneViewportBackgroundColors" : { }, - "selectedSceneRelativePath" : "Solar\/Solar_Venus.usda" + "selectedSceneRelativePath" : "7\/7_Taj_Mahal.usda" } \ No newline at end of file diff --git a/Packages/ArtifactScenes/Sources/ArtifactScenes/ArtifactScenes.rkassets/7/7_Taj_Mahal.usda b/Packages/ArtifactScenes/Sources/ArtifactScenes/ArtifactScenes.rkassets/7/7_Taj_Mahal.usda index c5442eb..49da35c 100644 --- a/Packages/ArtifactScenes/Sources/ArtifactScenes/ArtifactScenes.rkassets/7/7_Taj_Mahal.usda +++ b/Packages/ArtifactScenes/Sources/ArtifactScenes/ArtifactScenes.rkassets/7/7_Taj_Mahal.usda @@ -15,8 +15,9 @@ def Xform "Root" prepend references = @TAJ_MAHAL.usdz@ ) { - float3 xformOp:scale = (0.00001, 0.00001, 0.00001) - float3 xformOp:translate = (0, 0.23593155, 0) + quatf xformOp:orient = (0.99999994, 0, 0, 0) + float3 xformOp:scale = (0.0000060015773, 0.0000060015773, 0.0000060015773) + float3 xformOp:translate = (0, 0.23593156, 0) uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] } } diff --git a/Packages/ArtifactScenes/Sources/ArtifactScenes/ArtifactScenes.rkassets/Solar/Solar_Mercury.usda b/Packages/ArtifactScenes/Sources/ArtifactScenes/ArtifactScenes.rkassets/Solar/Solar_Mercury.usda index aaa99bc..93202d6 100644 --- a/Packages/ArtifactScenes/Sources/ArtifactScenes/ArtifactScenes.rkassets/Solar/Solar_Mercury.usda +++ b/Packages/ArtifactScenes/Sources/ArtifactScenes/ArtifactScenes.rkassets/Solar/Solar_Mercury.usda @@ -15,7 +15,7 @@ def Xform "Root" prepend references = @Mercury.usdz@ ) { - float3 xformOp:scale = (0.003, 0.003, 0.003) + float3 xformOp:scale = (0.001, 0.001, 0.001) float3 xformOp:translate = (0, 0.25, 0) uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] }