Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions Sources/UntoldEditor/Editor/AssetPacks/AssetPackCatalog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,9 @@ struct AssetPackInstallResult: Equatable {
}

func defaultAssetPackCatalog() -> AssetPackCatalog {
AssetPackCatalog(
version: "1.0.0",
assets: [
AssetPackCatalogItem(
id: "starter",
name: "StarterPack",
description: "Soccer field, goals, ball, and a sample scene.",
version: "1.0.0",
downloadURL: "https://d8pyi1c08k1w.cloudfront.net/StarterPack.zip",
size: "5.3 MB",
thumbnailName: "starterpack",
replacePaths: ["Models/starterpack"]
),
]
)
// No asset packs are hosted; the Explore panel (hidden via PanelID.available)
// has nothing to list.
AssetPackCatalog(version: "1.0.0", assets: [])
}

func configuredAssetPackCatalogURL(
Expand Down
1 change: 1 addition & 0 deletions Sources/UntoldEditor/Editor/Docking/PanelID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,6 @@ enum PanelID: String, Codable, CaseIterable, Identifiable {
/// The panels this build of the editor offers.
static var available: [PanelID] {
allCases.filter { $0 != .plugins || EditorFeatureFlags.enableCodeComponents }
.filter { $0 != .explore }
}
}
30 changes: 3 additions & 27 deletions Sources/UntoldEditor/Editor/Explore/StarterStreamModels.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,9 @@ struct StreamModelCameraFrame {
let usesOriginOrbit: Bool
}

let starterStreamModels: [StreamModelCatalogItem] = [
.init(
id: "dungeon",
title: "Game Dungeon",
manifestURL: URL(string: "https://d8pyi1c08k1w.cloudfront.net/Dungeon/dungeon.json")!
),
.init(
id: "city",
title: "Cartoon City",
manifestURL: URL(string: "https://d8pyi1c08k1w.cloudfront.net/city/city.json")!
),
.init(
id: "f1car",
title: "Formula 1",
manifestURL: URL(string: "https://d8pyi1c08k1w.cloudfront.net/F1Car/F1Car.json")!
),
.init(
id: "airplane",
title: "Skyhawk",
manifestURL: URL(string: "https://d8pyi1c08k1w.cloudfront.net/Shyhawk_stream/Skyhawks.json")!
),
.init(
id: "porsche964",
title: "Porsche 964",
manifestURL: URL(string: "https://d8pyi1c08k1w.cloudfront.net/Porsche964-stream/Porsche964-stream.json")!
),
]
/// No streamed demo scenes are hosted; the Explore gallery (unreachable since
/// the editor now launches straight into the full editor) has nothing to list.
let starterStreamModels: [StreamModelCatalogItem] = []

extension StreamModelCatalogItem {
var cameraFrame: StreamModelCameraFrame {
Expand Down
6 changes: 3 additions & 3 deletions Sources/UntoldEditor/Editor/Window/EditorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public struct EditorView: View {
@State var panelSearchText: [PanelID: String] = [:]
@State var renderPauseGeneration = 0
let panelAnimationDuration = 0.28
@State var showWelcomeStart = true
@State var showWelcomeStart = false
@State var showCameraControlHints = false
@State var showQuickPreviewWarning = false
@State var quickPreviewEntities: [(EntityID, String)] = []
Expand All @@ -72,8 +72,8 @@ public struct EditorView: View {
@State var quickPreviewCompressGeometry = false
@State var quickPreviewCompressTextures = false
@State var quickPreviewAstcencBinPath = ""
@State var experienceMode: EditorExperienceMode = .explore
@State var showDemoGallery = true
@State var experienceMode: EditorExperienceMode = .edit
@State var showDemoGallery = false
@State var showPreviewImportGallery = false
@State var activeDemoScene: DemoSceneCatalogItem?
@State var activeDemoCameraFrame: StreamModelCameraFrame?
Expand Down
7 changes: 2 additions & 5 deletions Tests/UntoldEditorTests/AssetBrowserViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -967,12 +967,9 @@ final class AssetBrowserViewTests: XCTestCase {
XCTAssertTrue(item.replacePaths.isEmpty)
}

func test_defaultAssetPackCatalog_onlyShowsStarterPackWithThumbnail() {
func test_defaultAssetPackCatalog_isEmpty() {
let catalog = defaultAssetPackCatalog()
XCTAssertEqual(catalog.assets.map(\.id), ["starter"])
XCTAssertEqual(catalog.assets.first?.name, "StarterPack")
XCTAssertEqual(catalog.assets.first?.thumbnailName, "starterpack")
XCTAssertEqual(catalog.assets.first?.replacePaths, ["Models/starterpack"])
XCTAssertTrue(catalog.assets.isEmpty)
}

func test_assetPackCategoryNames_sortsUniqueCategories() {
Expand Down
16 changes: 13 additions & 3 deletions Tests/UntoldEditorTests/DemoGalleryViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,26 @@ import XCTest
}
}

func test_demoGalleryView_wiresCallbacks() {
let firstDemo = demoSceneCatalog[0]
func test_demoGalleryView_wiresCallbacks() throws {
let firstDemo = try DemoSceneCatalogItem(
id: "sample",
title: "Sample",
subtitle: "A sample demo scene.",
thumbnailName: "sample",
systemImageName: "cube",
tags: ["Demo"],
source: .remoteManifest(XCTUnwrap(URL(string: "https://example.com/sample.json"))),
cameraFrame: nil,
loadsSceneAuthoredPayload: false
)
var selectedDemoId: String?
var didTryOwnScene = false
var didCreateProject = false
var didOpenProject = false
var didOpenFullEditor = false

let sut = DemoGalleryView(
demos: demoSceneCatalog,
demos: [firstDemo],
onDemoSelected: { selectedDemoId = $0.id },
onTryOwnScene: { didTryOwnScene = true },
onCreateProject: { didCreateProject = true },
Expand Down
Loading