-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
141 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// Models.swift | ||
// PrismExample | ||
// | ||
// Created by A. Zheng (github.com/aheze) on 9/26/22. | ||
// Copyright © 2022 A. Zheng. All rights reserved. | ||
// | ||
|
||
import Prism | ||
import SwiftUI | ||
|
||
struct DisplayedPrismConfiguration: Identifiable { | ||
let id = UUID() | ||
var configuration: PrismConfiguration | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// Basic.swift | ||
// PrismExample | ||
// | ||
// Created by A. Zheng (github.com/aheze) on 9/26/22. | ||
// Copyright © 2022 A. Zheng. All rights reserved. | ||
// | ||
|
||
import Prism | ||
import SwiftUI | ||
|
||
struct BasicGalleryView: View { | ||
@ObservedObject var model: ViewModel | ||
@State var configuration = PrismConfiguration(extrusion: 60) | ||
|
||
var body: some View { | ||
GalleryCardView(model: model, kind: .basic) { | ||
PrismView(configuration: configuration) { | ||
Color.blue | ||
} left: { | ||
Color.red | ||
} right: { | ||
Color.green | ||
} | ||
.frame(minHeight: 220) | ||
.offset(y: 20) | ||
} | ||
} | ||
} | ||
|
||
struct BasicDetailView: View { | ||
@State var configuration = PrismConfiguration(extrusion: 60) | ||
|
||
var body: some View { | ||
PrismCanvas(tilt: configuration.tilt) { | ||
PrismView(configuration: configuration) { | ||
Color.blue | ||
} left: { | ||
Color.red | ||
} right: { | ||
Color.green | ||
} | ||
} | ||
.navigationTitle("Basic") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// | ||
// Columns.swift | ||
// PrismExample | ||
// | ||
// Created by A. Zheng (github.com/aheze) on 9/26/22. | ||
// Copyright © 2022 A. Zheng. All rights reserved. | ||
// | ||
|
||
|
||
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
Example/PrismExample/PrismExample/Showcase/Transform.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// | ||
// Transform.swift | ||
// PrismExample | ||
// | ||
// Created by A. Zheng (github.com/aheze) on 9/26/22. | ||
// Copyright © 2022 A. Zheng. All rights reserved. | ||
// | ||
|
||
|
||
import Foundation |