Skip to content

Commit

Permalink
Add animation toggle to the sample project
Browse files Browse the repository at this point in the history
  • Loading branch information
rudrankriyam committed Oct 19, 2024
1 parent 3436d7d commit b6bbcc9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
44 changes: 22 additions & 22 deletions Sources/Meshin/Meshin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
0ACF11DF2CC3CA11008D8E5C /* Inject in Frameworks */ = {isa = PBXBuildFile; productRef = 0ACF11DE2CC3CA11008D8E5C /* Inject */; };
0ACF11E22CC3CA30008D8E5C /* MeshingKit in Frameworks */ = {isa = PBXBuildFile; productRef = 0ACF11E12CC3CA30008D8E5C /* MeshingKit */; };
0A2DF7D82CC3D03400920005 /* MeshingKit in Frameworks */ = {isa = PBXBuildFile; productRef = 0A2DF7D72CC3D03400920005 /* MeshingKit */; };
0A2DF7DB2CC3D07D00920005 /* Inject in Frameworks */ = {isa = PBXBuildFile; productRef = 0A2DF7DA2CC3D07D00920005 /* Inject */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -28,8 +28,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0ACF11DF2CC3CA11008D8E5C /* Inject in Frameworks */,
0ACF11E22CC3CA30008D8E5C /* MeshingKit in Frameworks */,
0A2DF7D82CC3D03400920005 /* MeshingKit in Frameworks */,
0A2DF7DB2CC3D07D00920005 /* Inject in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -72,8 +72,8 @@
);
name = Meshin;
packageProductDependencies = (
0ACF11DE2CC3CA11008D8E5C /* Inject */,
0ACF11E12CC3CA30008D8E5C /* MeshingKit */,
0A2DF7D72CC3D03400920005 /* MeshingKit */,
0A2DF7DA2CC3D07D00920005 /* Inject */,
);
productName = Meshin;
productReference = 0ACF11BF2CC3C99F008D8E5C /* Meshin.app */;
Expand Down Expand Up @@ -104,8 +104,8 @@
mainGroup = 0ACF11B62CC3C99F008D8E5C;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0ACF11DD2CC3CA11008D8E5C /* XCRemoteSwiftPackageReference "Inject" */,
0ACF11E02CC3CA30008D8E5C /* XCRemoteSwiftPackageReference "MeshingKit" */,
0A2DF7D62CC3D03400920005 /* XCRemoteSwiftPackageReference "MeshingKit" */,
0A2DF7D92CC3D07D00920005 /* XCRemoteSwiftPackageReference "Inject" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 0ACF11C02CC3C99F008D8E5C /* Products */;
Expand Down Expand Up @@ -354,34 +354,34 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0ACF11DD2CC3CA11008D8E5C /* XCRemoteSwiftPackageReference "Inject" */ = {
0A2DF7D62CC3D03400920005 /* XCRemoteSwiftPackageReference "MeshingKit" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/krzysztofzablocki/Inject";
repositoryURL = "https://github.com/rryam/MeshingKit";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.5.2;
branch = main;
kind = branch;
};
};
0ACF11E02CC3CA30008D8E5C /* XCRemoteSwiftPackageReference "MeshingKit" */ = {
0A2DF7D92CC3D07D00920005 /* XCRemoteSwiftPackageReference "Inject" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/rryam/MeshingKit";
repositoryURL = "https://github.com/krzysztofzablocki/Inject";
requirement = {
branch = main;
kind = branch;
kind = upToNextMajorVersion;
minimumVersion = 1.5.2;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
0ACF11DE2CC3CA11008D8E5C /* Inject */ = {
0A2DF7D72CC3D03400920005 /* MeshingKit */ = {
isa = XCSwiftPackageProductDependency;
package = 0ACF11DD2CC3CA11008D8E5C /* XCRemoteSwiftPackageReference "Inject" */;
productName = Inject;
package = 0A2DF7D62CC3D03400920005 /* XCRemoteSwiftPackageReference "MeshingKit" */;
productName = MeshingKit;
};
0ACF11E12CC3CA30008D8E5C /* MeshingKit */ = {
0A2DF7DA2CC3D07D00920005 /* Inject */ = {
isa = XCSwiftPackageProductDependency;
package = 0ACF11E02CC3CA30008D8E5C /* XCRemoteSwiftPackageReference "MeshingKit" */;
productName = MeshingKit;
package = 0A2DF7D92CC3D07D00920005 /* XCRemoteSwiftPackageReference "Inject" */;
productName = Inject;
};
/* End XCSwiftPackageProductDependency section */
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "a3b6befc9c60b97e2d9e9df58d9f700739f562662b7b6cf700c9dde7a7b18e3f",
"originHash" : "a7e1058f960e76d7439d316f8d2baee5b4fec89d6b8fa43279215bc4f594d263",
"pins" : [
{
"identity" : "inject",
Expand All @@ -16,7 +16,7 @@
"location" : "https://github.com/rryam/MeshingKit",
"state" : {
"branch" : "main",
"revision" : "bbcac98d173daa9a21beb6d19e9ab25f2acb0cfa"
"revision" : "3436d7d5652803103519897c5914e5a37007575a"
}
}
],
Expand Down
14 changes: 7 additions & 7 deletions Sources/Meshin/Meshin/GradientSamplesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ struct FullScreenGradientView: View {
var body: some View {
ZStack {
gradientView

VStack {
Spacer()

Toggle("Animate", isOn: $showAnimation)
.padding()
.background(Color.white.opacity(0.7))
.cornerRadius(8)
.background(.ultraThinMaterial, in: .rect)

Button("Close") {
presentationMode.wrappedValue.dismiss()
}
Expand All @@ -91,23 +91,23 @@ struct FullScreenGradientView: View {
AnimatedMeshGradientView(
gridSize: 2,
showAnimation: $showAnimation,
positions: size2Template.positions,
positions: size2Template.points,
colors: size2Template.colors,
background: size2Template.background
)
case .size3(let size3Template):
AnimatedMeshGradientView(
gridSize: 3,
showAnimation: $showAnimation,
positions: size3Template.positions,
positions: size3Template.points,
colors: size3Template.colors,
background: size3Template.background
)
case .size4(let size4Template):
AnimatedMeshGradientView(
gridSize: 4,
showAnimation: $showAnimation,
positions: size4Template.positions,
positions: size4Template.points,
colors: size4Template.colors,
background: size4Template.background
)
Expand All @@ -119,4 +119,4 @@ struct GradientSamplesView_Previews: PreviewProvider {
static var previews: some View {
GradientSamplesView()
}
}
}

0 comments on commit b6bbcc9

Please sign in to comment.