From c923c889faf0b55234638908176d412924be66e1 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 17:34:21 +0900 Subject: [PATCH 001/108] Update minimum development target to 17.0 --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 21a063e..54e73f7 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -664,6 +664,7 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -696,6 +697,7 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", From 4ff625a6af0d05c89564cdc25c09c81d47fc9b8f Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:04:01 +0900 Subject: [PATCH 002/108] Add ArtGalleryView --- .../project.pbxproj | 12 ++++++++++ .../ArtGalleryView.swift | 22 +++++++++++++++++++ .../SFSymbolsArtCollectionApp.swift | 6 +++-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 54e73f7..dba4b08 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -47,6 +47,7 @@ 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3928C82DBB004E1720 /* CharacterAppearance.swift */; }; 97624C3C28C935F0004E1720 /* FiveCharactersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */; }; 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3D28C93693004E1720 /* CharactersType.swift */; }; + 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -108,6 +109,7 @@ 97624C3928C82DBB004E1720 /* CharacterAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharacterAppearance.swift; sourceTree = ""; }; 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FiveCharactersView.swift; sourceTree = ""; }; 97624C3D28C93693004E1720 /* CharactersType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharactersType.swift; sourceTree = ""; }; + 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -326,6 +328,14 @@ path = Animals; sourceTree = ""; }; + 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */ = { + isa = PBXGroup; + children = ( + 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */, + ); + path = ArtisticWorldOfSFSymbols; + sourceTree = ""; + }; 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */ = { isa = PBXGroup; children = ( @@ -357,6 +367,7 @@ children = ( 9748BE62289F4BFB006DF0BE /* Info.plist */, 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */, + 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */, 97E11D512817381100B2AB32 /* ContentView.swift */, 97624C3628C74AA0004E1720 /* ArtWorks */, 971D9DE628C93EB500136A36 /* Common */, @@ -500,6 +511,7 @@ 97E11E3C281971ED00B2AB32 /* CrayonEye.swift in Sources */, 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, 9748BE1D289399CF006DF0BE /* SFAlphabet.swift in Sources */, + 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */, 9748BE3F2897AE68006DF0BE /* ArmHair.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift new file mode 100644 index 0000000..526d140 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -0,0 +1,22 @@ +// +// ArtGalleryView.swift +// SFSymbolsArtCollection +// +// + +import SwiftUI + +struct ArtGalleryView: View { + + let baseLength: CGFloat + + var body: some View { + NavigationStack { + + } + } +} + +#Preview { + ArtGalleryView(baseLength: 1024) +} diff --git a/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift b/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift index e70804e..da544ed 100644 --- a/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift +++ b/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift @@ -2,7 +2,7 @@ // SFSymbolsArtCollectionApp.swift // SFSymbolsArtCollection // -// Created by 平岡修 on 2022/04/26. +// Created by Lil Ossa // import SwiftUI @@ -11,7 +11,9 @@ import SwiftUI struct SFSymbolsArtCollectionApp: App { var body: some Scene { WindowGroup { - ContentView() + GeometryReader { geometry in + ArtGalleryView(baseLength: geometry.baseLength) + } } } } From 1f72d7dd7e6d83c5199271612e406a8f44fd76d6 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:04:48 +0900 Subject: [PATCH 003/108] Update Setting by Xcode 15 --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index dba4b08..0fddbe9 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -437,7 +437,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1330; - LastUpgradeCheck = 1330; + LastUpgradeCheck = 1520; TargetAttributes = { 97E11D4B2817381100B2AB32 = { CreatedOnToolsVersion = 13.3; @@ -547,6 +547,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -579,6 +580,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -607,6 +609,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -639,6 +642,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; From 72d2cf47c2513a570ae00108643d8ca0687ff84a Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:06:05 +0900 Subject: [PATCH 004/108] Remove unused Color+Extension --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 4 ---- .../ArtWorks/Fireworks/Fireworks.swift | 4 ++-- .../ArtWorks/Fireworks/MediumFirework.swift | 2 +- .../Common/Extensions/Color+Extensions.swift | 16 ---------------- 4 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 SFSymbolsArtCollection/Common/Extensions/Color+Extensions.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 0fddbe9..747a4a6 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -63,7 +63,6 @@ 97E11E3D281971ED00B2AB32 /* CrayonEyelid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E38281971ED00B2AB32 /* CrayonEyelid.swift */; }; 97E11E3E281971ED00B2AB32 /* CrayonEyebrow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E39281971ED00B2AB32 /* CrayonEyebrow.swift */; }; 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E3A281971ED00B2AB32 /* CrayonEyeBall.swift */; }; - 97E11E442819729B00B2AB32 /* Color+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E432819729B00B2AB32 /* Color+Extensions.swift */; }; 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E452819734700B2AB32 /* CrayonBoy.swift */; }; /* End PBXBuildFile section */ @@ -125,7 +124,6 @@ 97E11E38281971ED00B2AB32 /* CrayonEyelid.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyelid.swift; sourceTree = ""; }; 97E11E39281971ED00B2AB32 /* CrayonEyebrow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyebrow.swift; sourceTree = ""; }; 97E11E3A281971ED00B2AB32 /* CrayonEyeBall.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyeBall.swift; sourceTree = ""; }; - 97E11E432819729B00B2AB32 /* Color+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Extensions.swift"; sourceTree = ""; }; 97E11E452819734700B2AB32 /* CrayonBoy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoy.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -400,7 +398,6 @@ 97E11E412819727A00B2AB32 /* Extensions */ = { isa = PBXGroup; children = ( - 97E11E432819729B00B2AB32 /* Color+Extensions.swift */, 97624C3228C4F43F004E1720 /* GeometryProxy+Extensions.swift */, ); path = Extensions; @@ -529,7 +526,6 @@ 9748BE352893CB67006DF0BE /* Lion.swift in Sources */, 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, - 97E11E442819729B00B2AB32 /* Color+Extensions.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, 97E11E34281971E200B2AB32 /* CrayonFace.swift in Sources */, 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift index 5ba017a..6ff42b1 100644 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift +++ b/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift @@ -33,7 +33,7 @@ struct Fireworks: View { offsetX: baseLength * -0.225, offsetY: baseLength * 0.125) - SmallFirework(color: .lemonYellow, + SmallFirework(color: .init(.yellow), fontSize: baseLength * 0.125, offsetX: baseLength * -0.075, offsetY: baseLength * 0.25) @@ -73,7 +73,7 @@ struct Fireworks: View { } MediumFirework(baseLength: baseLength, - color: .lemonYellow, + color: .init(uiColor: .yellow), dotColor: .red) .offset(x: baseLength * 0.225, y: baseLength * 0.075) diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift index 0349d97..4cd75cd 100644 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift +++ b/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift @@ -35,6 +35,6 @@ struct FMediumFirework_Previews: PreviewProvider { static var previews: some View { MediumFirework(baseLength: 400, color: .red, - dotColor: .lemonYellow) + dotColor: .init(uiColor: .yellow)) } } diff --git a/SFSymbolsArtCollection/Common/Extensions/Color+Extensions.swift b/SFSymbolsArtCollection/Common/Extensions/Color+Extensions.swift deleted file mode 100644 index ba11e2e..0000000 --- a/SFSymbolsArtCollection/Common/Extensions/Color+Extensions.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// Color+Extensions.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/04/27. -// - -import SwiftUI - -extension Color { - static let paleOrange = Color("PaleOrange") - static let palePink = Color("PalePink") - static let darkBrown = Color("DarkBrown") - static let midnightNavy = Color("MidnightNavy") - static let lemonYellow = Color(uiColor: .yellow) -} From 64031c91daf743684d1dbd82acad6177afd9b29f Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:11:16 +0900 Subject: [PATCH 005/108] Update GeometryProxy+ --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 10 +++++----- .../ArtisticWorldOfSFSymbols/ArtGalleryView.swift | 1 + .../Extensions/GeometryProxy+.swift} | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) rename SFSymbolsArtCollection/{Common/Extensions/GeometryProxy+Extensions.swift => ArtisticWorldOfSFSymbols/Extensions/GeometryProxy+.swift} (72%) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 747a4a6..7adaa3a 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -43,7 +43,7 @@ 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2928C2BC9A004E1720 /* MediumFirework.swift */; }; 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2B28C2DDAA004E1720 /* Buildings.swift */; }; 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2E28C2E608004E1720 /* SmallFirework.swift */; }; - 97624C3328C4F43F004E1720 /* GeometryProxy+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3228C4F43F004E1720 /* GeometryProxy+Extensions.swift */; }; + 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */; }; 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3928C82DBB004E1720 /* CharacterAppearance.swift */; }; 97624C3C28C935F0004E1720 /* FiveCharactersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */; }; 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3D28C93693004E1720 /* CharactersType.swift */; }; @@ -104,7 +104,7 @@ 97624C2928C2BC9A004E1720 /* MediumFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediumFirework.swift; sourceTree = ""; }; 97624C2B28C2DDAA004E1720 /* Buildings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Buildings.swift; sourceTree = ""; }; 97624C2E28C2E608004E1720 /* SmallFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallFirework.swift; sourceTree = ""; }; - 97624C3228C4F43F004E1720 /* GeometryProxy+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GeometryProxy+Extensions.swift"; sourceTree = ""; }; + 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GeometryProxy+.swift"; sourceTree = ""; }; 97624C3928C82DBB004E1720 /* CharacterAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharacterAppearance.swift; sourceTree = ""; }; 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FiveCharactersView.swift; sourceTree = ""; }; 97624C3D28C93693004E1720 /* CharactersType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharactersType.swift; sourceTree = ""; }; @@ -153,7 +153,6 @@ children = ( 973B2CA228C2584F006ED5F0 /* ViewModifiers */, 9748BE1E28939AE5006DF0BE /* Enum */, - 97E11E412819727A00B2AB32 /* Extensions */, ); path = Common; sourceTree = ""; @@ -330,6 +329,7 @@ isa = PBXGroup; children = ( 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */, + 97E11E412819727A00B2AB32 /* Extensions */, ); path = ArtisticWorldOfSFSymbols; sourceTree = ""; @@ -398,7 +398,7 @@ 97E11E412819727A00B2AB32 /* Extensions */ = { isa = PBXGroup; children = ( - 97624C3228C4F43F004E1720 /* GeometryProxy+Extensions.swift */, + 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */, ); path = Extensions; sourceTree = ""; @@ -515,7 +515,7 @@ 97E11D522817381100B2AB32 /* ContentView.swift in Sources */, 9748BE412897CD6C006DF0BE /* Arm.swift in Sources */, 9748BE4328980C4D006DF0BE /* Hair.swift in Sources */, - 97624C3328C4F43F004E1720 /* GeometryProxy+Extensions.swift in Sources */, + 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, 9748BE1828933E40006DF0BE /* MagicianHat.swift in Sources */, 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 526d140..015d4e9 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -2,6 +2,7 @@ // ArtGalleryView.swift // SFSymbolsArtCollection // +// Created by Lil Ossa // import SwiftUI diff --git a/SFSymbolsArtCollection/Common/Extensions/GeometryProxy+Extensions.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/GeometryProxy+.swift similarity index 72% rename from SFSymbolsArtCollection/Common/Extensions/GeometryProxy+Extensions.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/GeometryProxy+.swift index 8bb582f..fb921f3 100644 --- a/SFSymbolsArtCollection/Common/Extensions/GeometryProxy+Extensions.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/GeometryProxy+.swift @@ -2,7 +2,7 @@ // GeometryProxy+Extensions.swift // SFSymbolsArtCollection // -// Created by 平岡修 on 2022/09/04. +// Created by Lil Ossa // import SwiftUI @@ -12,9 +12,9 @@ extension GeometryProxy { var baseLength: CGFloat { let width = self.size.width - let halfHeight = self.size.height / 2 + let height = self.size.height - let baseLength = width < halfHeight ? width : halfHeight + let baseLength = width < height ? width : height return baseLength } From cd9837f0dc48057dbb07e8426dd8d2560bc87360 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:14:48 +0900 Subject: [PATCH 006/108] Add SymbolNameFrameView --- .../project.pbxproj | 12 +++ .../Common/SymbolNameFrameView.swift | 88 +++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/SymbolNameFrameView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 7adaa3a..aff9ff5 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -48,6 +48,7 @@ 97624C3C28C935F0004E1720 /* FiveCharactersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */; }; 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3D28C93693004E1720 /* CharactersType.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; + 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -109,6 +110,7 @@ 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FiveCharactersView.swift; sourceTree = ""; }; 97624C3D28C93693004E1720 /* CharactersType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharactersType.swift; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; + 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -329,11 +331,20 @@ isa = PBXGroup; children = ( 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */, + 97AD530E2B70DDD10034FB5D /* Common */, 97E11E412819727A00B2AB32 /* Extensions */, ); path = ArtisticWorldOfSFSymbols; sourceTree = ""; }; + 97AD530E2B70DDD10034FB5D /* Common */ = { + isa = PBXGroup; + children = ( + 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, + ); + path = Common; + sourceTree = ""; + }; 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */ = { isa = PBXGroup; children = ( @@ -531,6 +542,7 @@ 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, 9748BE1A289341BE006DF0BE /* MagicianFace.swift in Sources */, + 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */, 9748BE4628981011006DF0BE /* DemonWrestler.swift in Sources */, 9748BE302893C706006DF0BE /* AnimalNose.swift in Sources */, ); diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/SymbolNameFrameView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/SymbolNameFrameView.swift new file mode 100644 index 0000000..ddf2277 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/SymbolNameFrameView.swift @@ -0,0 +1,88 @@ +// +// SymbolNameFrameView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct SymbolNameFrameView: View { + + init(name: String, + length: CGFloat, + frameOpacity: CGFloat, + @ViewBuilder content: () -> Content){ + self.name = name + self.length = length + self.frameOpacity = frameOpacity + self.content = content() + } + + let name: String + let length: CGFloat + let frameOpacity: CGFloat + let content: Content + + var isFrameVisible: Bool { + frameOpacity != 0 + } + + var body: some View { + ZStack { + if isFrameVisible { + RoundedRectangle(cornerRadius: 12) + .stroke(lineWidth: 2) + .frame(width: length * 2, + height: length * 2.2) + .opacity(frameOpacity) + .offset(y: UIDevice.current.isPad ? length * 0.35 : 0) + } + + content + + VStack(spacing: 32) { + + content + .opacity(0) + + if isFrameVisible, + UIDevice.current.isPad { + Text(name) + .font(.system(size: length * 0.25)) + .opacity(frameOpacity) + .frame(width: length * 1.8) + .fixedSize(horizontal: false, vertical: true) + .multilineTextAlignment(.center) + .offset(y: length * 0.2) + } + } + } + } +} + +#Preview { + HStack { + SymbolNameFrameView( + name: "circle.fill", + length: 61.44, + frameOpacity: 1 + ) { + Image(systemName: "circle.fill") + .resizable() + .frame(width: 61.4, + height: 61.4) + } + + SymbolNameFrameView( + name: "doc.plaintext.fill", + length: 61.44, + frameOpacity: 1 + ) { + Image(systemName: "doc.plaintext.fill") + .resizable() + .frame(width: 61.4, + height: 61.4) + } + } +} From 29362e43a1839cc575ef0713b31544dcaa5c42b9 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:16:08 +0900 Subject: [PATCH 007/108] Add UIDevice+Extension --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 4 ++++ .../Extensions/UIDevice+.swift | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/UIDevice+.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index aff9ff5..47f5dc5 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -49,6 +49,7 @@ 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3D28C93693004E1720 /* CharactersType.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; + 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -111,6 +112,7 @@ 97624C3D28C93693004E1720 /* CharactersType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharactersType.swift; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; + 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -410,6 +412,7 @@ isa = PBXGroup; children = ( 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */, + 97AD53112B70DEB60034FB5D /* UIDevice+.swift */, ); path = Extensions; sourceTree = ""; @@ -509,6 +512,7 @@ 97E11E35281971E200B2AB32 /* CrayonMouth.swift in Sources */, 9748BE6428A3936E006DF0BE /* ArtWorkView.swift in Sources */, 97E11E3D281971ED00B2AB32 /* CrayonEyelid.swift in Sources */, + 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */, 97624C3C28C935F0004E1720 /* FiveCharactersView.swift in Sources */, 9748BE292893BFE3006DF0BE /* Earth.swift in Sources */, 97E11E3E281971ED00B2AB32 /* CrayonEyebrow.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/UIDevice+.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/UIDevice+.swift new file mode 100644 index 0000000..52fde53 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/UIDevice+.swift @@ -0,0 +1,15 @@ +// +// UIDevice+.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension UIDevice { + + var isPad: Bool { + return userInterfaceIdiom == .pad + } +} From 94c94f18070e34679c560e0b271ebad214547171 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:18:52 +0900 Subject: [PATCH 008/108] Add new folder group --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 10 +++++++++- .../Common/{ => Views}/SymbolNameFrameView.swift | 0 2 files changed, 9 insertions(+), 1 deletion(-) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/{ => Views}/SymbolNameFrameView.swift (100%) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 47f5dc5..7491bee 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -342,11 +342,19 @@ 97AD530E2B70DDD10034FB5D /* Common */ = { isa = PBXGroup; children = ( - 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, + 97AD53132B70DF5A0034FB5D /* Views */, ); path = Common; sourceTree = ""; }; + 97AD53132B70DF5A0034FB5D /* Views */ = { + isa = PBXGroup; + children = ( + 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, + ); + path = Views; + sourceTree = ""; + }; 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */ = { isa = PBXGroup; children = ( diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/SymbolNameFrameView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/SymbolNameFrameView.swift similarity index 100% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/SymbolNameFrameView.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/SymbolNameFrameView.swift From b8f15fd0dac16041a75dfcef423b363aced68025 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:20:19 +0900 Subject: [PATCH 009/108] Add AnimationDuration --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 12 ++++++++++++ .../Common/Models/AnimationDuration.swift | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationDuration.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 7491bee..7b6363a 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -50,6 +50,7 @@ 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; + 97AD53162B70DFB40034FB5D /* AnimationDuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -113,6 +114,7 @@ 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; + 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationDuration.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -342,6 +344,7 @@ 97AD530E2B70DDD10034FB5D /* Common */ = { isa = PBXGroup; children = ( + 97AD53142B70DF8A0034FB5D /* Models */, 97AD53132B70DF5A0034FB5D /* Views */, ); path = Common; @@ -355,6 +358,14 @@ path = Views; sourceTree = ""; }; + 97AD53142B70DF8A0034FB5D /* Models */ = { + isa = PBXGroup; + children = ( + 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */, + ); + path = Models; + sourceTree = ""; + }; 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */ = { isa = PBXGroup; children = ( @@ -510,6 +521,7 @@ 971D9DE828C9497D00136A36 /* MagicianSunGlasses.swift in Sources */, 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, + 97AD53162B70DFB40034FB5D /* AnimationDuration.swift in Sources */, 97E11E33281971E200B2AB32 /* CrayonHair.swift in Sources */, 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */, 9748BE3A2893D0E3006DF0BE /* Frog.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationDuration.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationDuration.swift new file mode 100644 index 0000000..eb22ecf --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationDuration.swift @@ -0,0 +1,14 @@ +// +// AnimationDuration.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +struct AnimationDuration { + static let perSymbol: Double = 1.5 + + static func waitingTime(forCount count: Int) -> Double { + return perSymbol * Double(count) + } +} From fe85343a7b11f4563253013f9e86e7bd2af7f7c3 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:21:45 +0900 Subject: [PATCH 010/108] Add AnimationValues --- .../project.pbxproj | 4 ++ .../Common/Models/AnimationValues.swift | 48 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 7b6363a..bc236e5 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -51,6 +51,7 @@ 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; 97AD53162B70DFB40034FB5D /* AnimationDuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */; }; + 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53172B70DFF30034FB5D /* AnimationValues.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -115,6 +116,7 @@ 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationDuration.swift; sourceTree = ""; }; + 97AD53172B70DFF30034FB5D /* AnimationValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationValues.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -362,6 +364,7 @@ isa = PBXGroup; children = ( 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */, + 97AD53172B70DFF30034FB5D /* AnimationValues.swift */, ); path = Models; sourceTree = ""; @@ -518,6 +521,7 @@ 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, 9748BE372893D064006DF0BE /* PartyAnimals.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, + 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, 971D9DE828C9497D00136A36 /* MagicianSunGlasses.swift in Sources */, 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift new file mode 100644 index 0000000..701ec78 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift @@ -0,0 +1,48 @@ +// +// AnimationValues.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct AnimationValues { + + init( + primaryColor: Color = .black, + secondaryColor: Color = .black, + fontWeight: Font.Weight = .regular, + width: CGFloat, + height: CGFloat, + symbolNameVisibleValue: CGFloat = 1, + rotationDegrees: CGFloat = 0, + rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) = (x: 0, y: 0, z: 1), + offsetX: CGFloat = 0, + offsetY: CGFloat = 0 + ) { + self.primaryColor = primaryColor.resolve(in: .init()) + self.secondaryColor = secondaryColor.resolve(in: .init()) + self.fontWeightValue = fontWeight.animatableValue + self.width = width + self.height = height + self.symbolNameVisibleValue = symbolNameVisibleValue + self.rotationDegrees = rotationDegrees + self.rotationAxis = rotationAxis + self.offset = .init(width: offsetX, height: offsetY) + } + + var primaryColor: Color.Resolved + var secondaryColor: Color.Resolved + var fontWeightValue: CGFloat + var width: CGFloat + var height: CGFloat + var symbolNameVisibleValue: CGFloat + var rotationDegrees: CGFloat + var rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) + var offset: CGSize + + var fontWeight: Font.Weight { + return .init(animatableValue: fontWeightValue) + } +} From d2793931f47ab738703e0c0411c5cca7d8a10673 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:23:04 +0900 Subject: [PATCH 011/108] Add Font.Weight+Extension --- .../project.pbxproj | 4 ++ .../Extensions/Font.Weight+.swift | 62 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Font.Weight+.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index bc236e5..6e4b673 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -52,6 +52,7 @@ 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; 97AD53162B70DFB40034FB5D /* AnimationDuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */; }; 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53172B70DFF30034FB5D /* AnimationValues.swift */; }; + 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53192B70E0530034FB5D /* Font.Weight+.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -117,6 +118,7 @@ 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationDuration.swift; sourceTree = ""; }; 97AD53172B70DFF30034FB5D /* AnimationValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationValues.swift; sourceTree = ""; }; + 97AD53192B70E0530034FB5D /* Font.Weight+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font.Weight+.swift"; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -435,6 +437,7 @@ children = ( 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */, 97AD53112B70DEB60034FB5D /* UIDevice+.swift */, + 97AD53192B70E0530034FB5D /* Font.Weight+.swift */, ); path = Extensions; sourceTree = ""; @@ -534,6 +537,7 @@ 9748BE15289338A3006DF0BE /* Magician.swift in Sources */, 9748BE3C2897AA28006DF0BE /* AnimalWhiskers.swift in Sources */, 97E11E35281971E200B2AB32 /* CrayonMouth.swift in Sources */, + 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, 9748BE6428A3936E006DF0BE /* ArtWorkView.swift in Sources */, 97E11E3D281971ED00B2AB32 /* CrayonEyelid.swift in Sources */, 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Font.Weight+.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Font.Weight+.swift new file mode 100644 index 0000000..06fa785 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Font.Weight+.swift @@ -0,0 +1,62 @@ +// +// Font.Weight+.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension Font.Weight { + + var animatableValue: CGFloat { + switch self { + case .ultraLight: + return 0 + case .thin: + return 1 + case .light: + return 2 + case .regular: + return 3 + case .medium: + return 4 + case .semibold: + return 5 + case .bold: + return 6 + case .heavy: + return 7 + case .black: + return 8 + default: + fatalError("\(self) is not defined") + } + } + + init(animatableValue value: CGFloat) { + switch value { + case 0..<1: + self = .ultraLight + case 1..<2: + self = .thin + case 2..<3: + self = .light + case 3..<4: + self = .regular + case 4..<5: + self = .medium + case 5..<6: + self = .semibold + case 6..<7: + self = .bold + case 7..<8: + self = .heavy + case 8: + self = .black + default: + print("💣: \(value) is not defined") + self = .regular + } + } +} From 5079ae14bb3dbf3c94fe064a39b00f56f1c2600d Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:35:07 +0900 Subject: [PATCH 012/108] Add ArtWorks group folder --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 6e4b673..e0b14ba 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -339,6 +339,7 @@ isa = PBXGroup; children = ( 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */, + 97AD531B2B70E0A10034FB5D /* ArtWorks */, 97AD530E2B70DDD10034FB5D /* Common */, 97E11E412819727A00B2AB32 /* Extensions */, ); @@ -371,6 +372,21 @@ path = Models; sourceTree = ""; }; + 97AD531B2B70E0A10034FB5D /* ArtWorks */ = { + isa = PBXGroup; + children = ( + 97AD531E2B70E2770034FB5D /* AfroBoy */, + ); + path = ArtWorks; + sourceTree = ""; + }; + 97AD531E2B70E2770034FB5D /* AfroBoy */ = { + isa = PBXGroup; + children = ( + ); + path = AfroBoy; + sourceTree = ""; + }; 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */ = { isa = PBXGroup; children = ( From 8905ae0fad51aa50f2b6f6a6c389e59d4cca546f Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:39:29 +0900 Subject: [PATCH 013/108] Add ArtComponentView --- .../project.pbxproj | 4 + .../Common/Views/ArtComponentView.swift | 135 ++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index e0b14ba..fd4568c 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -53,6 +53,7 @@ 97AD53162B70DFB40034FB5D /* AnimationDuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */; }; 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53172B70DFF30034FB5D /* AnimationValues.swift */; }; 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53192B70E0530034FB5D /* Font.Weight+.swift */; }; + 97AD53222B70E3FA0034FB5D /* ArtComponentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -119,6 +120,7 @@ 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationDuration.swift; sourceTree = ""; }; 97AD53172B70DFF30034FB5D /* AnimationValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationValues.swift; sourceTree = ""; }; 97AD53192B70E0530034FB5D /* Font.Weight+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font.Weight+.swift"; sourceTree = ""; }; + 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtComponentView.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -358,6 +360,7 @@ 97AD53132B70DF5A0034FB5D /* Views */ = { isa = PBXGroup; children = ( + 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */, 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, ); path = Views; @@ -584,6 +587,7 @@ 97E11E3B281971ED00B2AB32 /* CrayonEyes.swift in Sources */, 9748BE352893CB67006DF0BE /* Lion.swift in Sources */, 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, + 97AD53222B70E3FA0034FB5D /* ArtComponentView.swift in Sources */, 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, 97E11E34281971E200B2AB32 /* CrayonFace.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView.swift new file mode 100644 index 0000000..267bdde --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView.swift @@ -0,0 +1,135 @@ +// +// ArtComponentView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct ArtComponentView: View { + + let name: String + let initialValue: AnimationValues + let finalValue: AnimationValues + let isAnimating: Bool + let animationDuration: Double + let waitingTime: Double + + var body: some View { + Image(systemName: name) + .resizable() + .keyframeAnimator( + initialValue: initialValue, + trigger: isAnimating + ) { content, value in + + SymbolNameFrameView( + name: name, + length: initialValue.width, + frameOpacity: value.symbolNameVisibleValue + ) { + + Group { + if value.symbolNameVisibleValue == 1 { + content + .scaledToFit() + } else { + content + } + } + .foregroundStyle( + value.primaryColor, + value.secondaryColor + ) + .fontWeight(value.fontWeight) + .frame( + width: value.width, + height: value.height + ) + } + .rotation3DEffect( + .degrees(value.rotationDegrees), + axis: value.rotationAxis + ) + .offset(value.offset) + + } keyframes: { value in + + KeyframeTrack(\.primaryColor) { + LinearKeyframe(value.primaryColor, duration: waitingTime) + CubicKeyframe(finalValue.primaryColor, duration: animationDuration) + } + + KeyframeTrack(\.secondaryColor) { + LinearKeyframe(value.secondaryColor, duration: waitingTime) + CubicKeyframe(finalValue.secondaryColor, duration: animationDuration) + } + + KeyframeTrack(\.fontWeightValue) { + LinearKeyframe(value.fontWeightValue, duration: waitingTime) + CubicKeyframe(finalValue.fontWeightValue, duration: animationDuration) + } + + KeyframeTrack(\.width) { + LinearKeyframe(value.width, duration: waitingTime) + CubicKeyframe(finalValue.width, duration: animationDuration) + } + + KeyframeTrack(\.height) { + LinearKeyframe(value.height, duration: waitingTime) + CubicKeyframe(finalValue.height, duration: animationDuration) + } + + KeyframeTrack(\.rotationDegrees) { + LinearKeyframe(value.rotationDegrees, duration: waitingTime) + CubicKeyframe(finalValue.rotationDegrees, duration: animationDuration) + } + + KeyframeTrack(\.rotationAxis.x) { + LinearKeyframe(value.rotationAxis.x, duration: waitingTime) + CubicKeyframe(finalValue.rotationAxis.x, duration: animationDuration) + } + + KeyframeTrack(\.rotationAxis.y) { + LinearKeyframe(value.rotationAxis.y, duration: waitingTime) + CubicKeyframe(finalValue.rotationAxis.y, duration: animationDuration) + } + + KeyframeTrack(\.rotationAxis.z) { + LinearKeyframe(value.rotationAxis.z, duration: waitingTime) + CubicKeyframe(finalValue.rotationAxis.z, duration: animationDuration) + } + + KeyframeTrack(\.offset) { + LinearKeyframe(value.offset, duration: waitingTime) + CubicKeyframe(finalValue.offset, duration: animationDuration) + } + + KeyframeTrack(\.symbolNameVisibleValue) { + LinearKeyframe(1, duration: waitingTime) + CubicKeyframe(0, duration: animationDuration * 0.2) + } + } + } +} + +#Preview { + ArtComponentView( + name: "circle.fill", + initialValue: .init( + width: 100, + height: 100, + offsetX: 0, + offsetY: 0 + ), finalValue: .init( + width: 200, + height: 200, + offsetX: 0, + offsetY: 0 + ), + isAnimating: true, + animationDuration: 20, + waitingTime: 0 + ) +} From 13cd24649690808b94ddff8eaffb6ba27b0c6e06 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:41:35 +0900 Subject: [PATCH 014/108] Add PlayButton --- .../project.pbxproj | 4 +++ .../Common/Views/PlayButton.swift | 28 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/PlayButton.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index fd4568c..5e107df 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -54,6 +54,7 @@ 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53172B70DFF30034FB5D /* AnimationValues.swift */; }; 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53192B70E0530034FB5D /* Font.Weight+.swift */; }; 97AD53222B70E3FA0034FB5D /* ArtComponentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */; }; + 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53232B70E48F0034FB5D /* PlayButton.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -121,6 +122,7 @@ 97AD53172B70DFF30034FB5D /* AnimationValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationValues.swift; sourceTree = ""; }; 97AD53192B70E0530034FB5D /* Font.Weight+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font.Weight+.swift"; sourceTree = ""; }; 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtComponentView.swift; sourceTree = ""; }; + 97AD53232B70E48F0034FB5D /* PlayButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayButton.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -361,6 +363,7 @@ isa = PBXGroup; children = ( 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */, + 97AD53232B70E48F0034FB5D /* PlayButton.swift */, 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, ); path = Views; @@ -552,6 +555,7 @@ 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */, 9748BE3A2893D0E3006DF0BE /* Frog.swift in Sources */, 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */, + 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */, 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */, 9748BE15289338A3006DF0BE /* Magician.swift in Sources */, 9748BE3C2897AA28006DF0BE /* AnimalWhiskers.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/PlayButton.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/PlayButton.swift new file mode 100644 index 0000000..72a63e1 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/PlayButton.swift @@ -0,0 +1,28 @@ +// +// PlayButton.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct PlayButton: View { + + let action: () -> Void + + var body: some View { + Button { + action() + } label: { + HStack { + Image(systemName: "play.circle.fill") + Text("Play") + } + } + } +} + +#Preview { + PlayButton {} +} From 04a101601a1bb063c4a1d8cdf96aa1444211daac Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 18:42:23 +0900 Subject: [PATCH 015/108] Create ArtComponentView group folder --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 12 ++++++++++-- .../{ => ArtComponentView}/ArtComponentView.swift | 0 .../{ => ArtComponentView}/SymbolNameFrameView.swift | 0 3 files changed, 10 insertions(+), 2 deletions(-) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/{ => ArtComponentView}/ArtComponentView.swift (100%) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/{ => ArtComponentView}/SymbolNameFrameView.swift (100%) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 5e107df..108b9e6 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -362,9 +362,8 @@ 97AD53132B70DF5A0034FB5D /* Views */ = { isa = PBXGroup; children = ( - 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */, + 97AD53252B70E4DA0034FB5D /* ArtComponentView */, 97AD53232B70E48F0034FB5D /* PlayButton.swift */, - 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, ); path = Views; sourceTree = ""; @@ -393,6 +392,15 @@ path = AfroBoy; sourceTree = ""; }; + 97AD53252B70E4DA0034FB5D /* ArtComponentView */ = { + isa = PBXGroup; + children = ( + 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */, + 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, + ); + path = ArtComponentView; + sourceTree = ""; + }; 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */ = { isa = PBXGroup; children = ( diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift similarity index 100% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/SymbolNameFrameView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/SymbolNameFrameView.swift similarity index 100% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/SymbolNameFrameView.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/SymbolNameFrameView.swift From 9d593baa835a3b2eaad622cc1aeedeade956e1bd Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 21:45:17 +0900 Subject: [PATCH 016/108] Update Art gallery --- .../project.pbxproj | 16 +-- .../ArtGalleryView.swift | 22 +++- .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 124 ++++++++++++++++++ .../Common/Models/AnimationDuration.swift | 14 -- .../Common/Models/ArtWorkModel.swift | 35 +++++ .../SFSymbolsArtCollectionApp.swift | 3 +- 6 files changed, 188 insertions(+), 26 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationDuration.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 108b9e6..7e6ab35 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -50,11 +50,12 @@ 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; - 97AD53162B70DFB40034FB5D /* AnimationDuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */; }; 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53172B70DFF30034FB5D /* AnimationValues.swift */; }; 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53192B70E0530034FB5D /* Font.Weight+.swift */; }; 97AD53222B70E3FA0034FB5D /* ArtComponentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */; }; 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53232B70E48F0034FB5D /* PlayButton.swift */; }; + 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53282B7100670034FB5D /* ArtWorkModel.swift */; }; + 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -118,11 +119,12 @@ 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; - 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationDuration.swift; sourceTree = ""; }; 97AD53172B70DFF30034FB5D /* AnimationValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationValues.swift; sourceTree = ""; }; 97AD53192B70E0530034FB5D /* Font.Weight+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font.Weight+.swift"; sourceTree = ""; }; 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtComponentView.swift; sourceTree = ""; }; 97AD53232B70E48F0034FB5D /* PlayButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayButton.swift; sourceTree = ""; }; + 97AD53282B7100670034FB5D /* ArtWorkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtWorkModel.swift; sourceTree = ""; }; + 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AfroBoyArtView.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -371,7 +373,7 @@ 97AD53142B70DF8A0034FB5D /* Models */ = { isa = PBXGroup; children = ( - 97AD53152B70DFB40034FB5D /* AnimationDuration.swift */, + 97AD53282B7100670034FB5D /* ArtWorkModel.swift */, 97AD53172B70DFF30034FB5D /* AnimationValues.swift */, ); path = Models; @@ -388,6 +390,7 @@ 97AD531E2B70E2770034FB5D /* AfroBoy */ = { isa = PBXGroup; children = ( + 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */, ); path = AfroBoy; sourceTree = ""; @@ -558,7 +561,6 @@ 971D9DE828C9497D00136A36 /* MagicianSunGlasses.swift in Sources */, 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, - 97AD53162B70DFB40034FB5D /* AnimationDuration.swift in Sources */, 97E11E33281971E200B2AB32 /* CrayonHair.swift in Sources */, 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */, 9748BE3A2893D0E3006DF0BE /* Frog.swift in Sources */, @@ -584,6 +586,7 @@ 9748BE1D289399CF006DF0BE /* SFAlphabet.swift in Sources */, 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, + 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */, 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */, 9748BE3F2897AE68006DF0BE /* ArmHair.swift in Sources */, 97E11D522817381100B2AB32 /* ContentView.swift in Sources */, @@ -594,6 +597,7 @@ 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */, 9748BE2C2893C428006DF0BE /* Bear.swift in Sources */, + 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */, 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */, 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */, 97E11E3B281971ED00B2AB32 /* CrayonEyes.swift in Sources */, @@ -750,8 +754,6 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UIStatusBarHidden = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait; IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -783,8 +785,6 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UIStatusBarHidden = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait; IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 015d4e9..9356ed8 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -7,17 +7,33 @@ import SwiftUI +extension ArtGalleryView { + + init(screenSize: CGSize) { + self._model = State(wrappedValue: ArtWorkModel(screenSize: screenSize)) + } +} + struct ArtGalleryView: View { - let baseLength: CGFloat + @State private var model: ArtWorkModel var body: some View { NavigationStack { - + List { + NavigationLink { + AfroBoyArtView() + } label: { + Text("Afro boy") + } + } + .navigationTitle("Gallery") } + .environment(model) } } #Preview { - ArtGalleryView(baseLength: 1024) + ArtGalleryView(screenSize: .init(width: 1024, + height: 1024)) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift new file mode 100644 index 0000000..00e58ea --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -0,0 +1,124 @@ +// +// AfroBoyArtView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct AfroBoyArtView: View { + + @Environment(ArtWorkModel.self) var model + @State private var isAnimating = false + + var body: some View { + ZStack { + + // MARK: - 􁝰 Hair + ArtComponentView( + name: "tree.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingProportionalValue(withRatio: -0.42), + offsetY: model.calculatingProportionalValue(withRatio: 0.5) + ), + finalValue: .init( + width: model.calculatingProportionalValue(withRatio: 0.9), + height: model.calculatingProportionalValue(withRatio: 0.9) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: 0.001 + ) + + // MARK: - 􀙧 Contour + ArtComponentView( + name: "shield.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingProportionalValue(withRatio: -0.28), + offsetY: model.calculatingProportionalValue(withRatio: 0.5) + ), + finalValue: .init( + primaryColor: .paleOrange, + width: model.calculatingProportionalValue(withRatio: 0.5), + height: model.calculatingProportionalValue(withRatio: 0.6), + offsetY: model.calculatingProportionalValue(withRatio: 0.17) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 1) + ) + + // MARK: - 􀎽 Face + ArtComponentView( + name: "faceid", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingProportionalValue(withRatio: -0.14), + offsetY: model.calculatingProportionalValue(withRatio: 0.5) + ), + finalValue: .init( + secondaryColor: .paleOrange, + width: model.calculatingProportionalValue(withRatio: 0.3), + height: model.calculatingProportionalValue(withRatio: 0.3), + offsetY: model.calculatingProportionalValue(withRatio: 0.16) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 2) + ) + + // MARK: - 􀦉 Comb + ArtComponentView( + name: "comb.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetY: model.calculatingProportionalValue(withRatio: 0.5) + ), + finalValue: .init( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.2), + offsetX: model.calculatingProportionalValue(withRatio: -0.2), + offsetY: model.calculatingProportionalValue(withRatio: -0.2) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 3) + ) + } + .navigationTitle("Afro boy") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + } +} + +#Preview { + NavigationStack { + AfroBoyArtView() + .environment( + ArtWorkModel( + screenSize: .init( + width: 1024, + height: 1024 + ) + ) + ) + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationDuration.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationDuration.swift deleted file mode 100644 index eb22ecf..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationDuration.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// AnimationDuration.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -struct AnimationDuration { - static let perSymbol: Double = 1.5 - - static func waitingTime(forCount count: Int) -> Double { - return perSymbol * Double(count) - } -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift new file mode 100644 index 0000000..c76e978 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift @@ -0,0 +1,35 @@ +// +// ArtWorkModel.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +@Observable +class ArtWorkModel { + + init(screenSize: CGSize) { + let width = screenSize.width + let height = screenSize.height + self.baseLength = width < height ? width : height + } + + private let baseLength: CGFloat + + let animationDurationPerSymbol: Double = 1.5 + + var initialSymbolLength: CGFloat { + baseLength * 0.06 + } + + /// The value calculated from baseLength using the given ratio. + func calculatingProportionalValue(withRatio ratio: CGFloat) -> CGFloat { + return baseLength * ratio + } + + func waitingTime(forCount count: Int) -> Double { + return animationDurationPerSymbol * Double(count) + } +} diff --git a/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift b/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift index da544ed..a0bb100 100644 --- a/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift +++ b/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift @@ -9,10 +9,11 @@ import SwiftUI @main struct SFSymbolsArtCollectionApp: App { + var body: some Scene { WindowGroup { GeometryReader { geometry in - ArtGalleryView(baseLength: geometry.baseLength) + ArtGalleryView(screenSize: geometry.size) } } } From c0f0bb57968814702a8e95be93f8890fa6c9b60e Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 22:19:43 +0900 Subject: [PATCH 017/108] Update ArtWorkModel with BottomColumnSymbol --- .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 14 +++--- .../Common/Models/ArtWorkModel.swift | 45 ++++++++++++++++++- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift index 00e58ea..8407651 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -21,8 +21,8 @@ struct AfroBoyArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetX: model.calculatingProportionalValue(withRatio: -0.42), - offsetY: model.calculatingProportionalValue(withRatio: 0.5) + offsetX: model.calculatingOffsetX(forBottomColumn: .first), + offsetY: model.offsetYForBottomColumn ), finalValue: .init( width: model.calculatingProportionalValue(withRatio: 0.9), @@ -39,8 +39,8 @@ struct AfroBoyArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetX: model.calculatingProportionalValue(withRatio: -0.28), - offsetY: model.calculatingProportionalValue(withRatio: 0.5) + offsetX: model.calculatingOffsetX(forBottomColumn: .second), + offsetY: model.offsetYForBottomColumn ), finalValue: .init( primaryColor: .paleOrange, @@ -59,8 +59,8 @@ struct AfroBoyArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetX: model.calculatingProportionalValue(withRatio: -0.14), - offsetY: model.calculatingProportionalValue(withRatio: 0.5) + offsetX: model.calculatingOffsetX(forBottomColumn: .third), + offsetY: model.offsetYForBottomColumn ), finalValue: .init( secondaryColor: .paleOrange, @@ -79,7 +79,7 @@ struct AfroBoyArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetY: model.calculatingProportionalValue(withRatio: 0.5) + offsetY: model.offsetYForBottomColumn ), finalValue: .init( primaryColor: .red, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift index c76e978..9865b2c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift @@ -20,8 +20,16 @@ class ArtWorkModel { let animationDurationPerSymbol: Double = 1.5 - var initialSymbolLength: CGFloat { - baseLength * 0.06 + var initialSymbolLength: Double { + return baseLength * 0.06 + } + + var offsetYForBottomColumn: CGFloat { + return calculatingProportionalValue(withRatio: 0.5) + } + + func calculatingOffsetX(forBottomColumn bottomColumn: BottomColumnSymbol) -> CGFloat { + return calculatingProportionalValue(withRatio: bottomColumn.offsetXRatio) } /// The value calculated from baseLength using the given ratio. @@ -33,3 +41,36 @@ class ArtWorkModel { return animationDurationPerSymbol * Double(count) } } + +// MARK: - BottomColumnSymbol +extension ArtWorkModel { + + enum BottomColumnSymbol { + case first + case second + case third + case forth + case fifth + case sixth + case seventh + + var offsetXRatio: CGFloat { + switch self { + case .first: + -0.42 + case .second: + -0.28 + case .third: + -0.14 + case .forth: + 0 + case .fifth: + 0.14 + case .sixth: + 0.28 + case .seventh: + 0.42 + } + } + } +} From e96574ef2be9275f2a6cafd61afe45ebf351a12b Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 5 Feb 2024 22:23:38 +0900 Subject: [PATCH 018/108] Add ArtWorkModel for preview --- .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 9 +-------- .../Common/Models/ArtWorkModel.swift | 2 ++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift index 8407651..5b629e7 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -112,13 +112,6 @@ struct AfroBoyArtView: View { #Preview { NavigationStack { AfroBoyArtView() - .environment( - ArtWorkModel( - screenSize: .init( - width: 1024, - height: 1024 - ) - ) - ) + .environment(ArtWorkModel.preview) } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift index 9865b2c..102a127 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift @@ -9,6 +9,8 @@ import SwiftUI @Observable class ArtWorkModel { + + static let preview = ArtWorkModel(screenSize: CGSize(width: 1024, height: 1024)) init(screenSize: CGSize) { let width = screenSize.width From 5a8c379ce04057e0e7b99bb845b87e824bae4efb Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 05:04:44 +0900 Subject: [PATCH 019/108] Modify forced interface orientation --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 4 ++-- .../ArtisticWorldOfSFSymbols/ArtGalleryView.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 7e6ab35..7c1726a 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -753,7 +753,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UIStatusBarHidden = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -784,7 +784,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UIStatusBarHidden = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 9356ed8..2ea15b5 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -10,13 +10,13 @@ import SwiftUI extension ArtGalleryView { init(screenSize: CGSize) { - self._model = State(wrappedValue: ArtWorkModel(screenSize: screenSize)) + self.model = ArtWorkModel(screenSize: screenSize) } } struct ArtGalleryView: View { - @State private var model: ArtWorkModel + private let model: ArtWorkModel var body: some View { NavigationStack { From d0bd16925908a6173c1843da70e6f21b4d8ae9d6 Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 07:21:16 +0900 Subject: [PATCH 020/108] Update ArtWorkModel --- .../Common/Models/ArtWorkModel.swift | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift index 102a127..f07820e 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift @@ -21,6 +21,15 @@ class ArtWorkModel { private let baseLength: CGFloat let animationDurationPerSymbol: Double = 1.5 + let galleryColumnSpacing: CGFloat = 32 + + /// Art works column count in gallery + var galleryColumnCount: Int { + if UIDevice.current.isPad { + return 4 + } + return 2 + } var initialSymbolLength: Double { return baseLength * 0.06 @@ -35,7 +44,13 @@ class ArtWorkModel { } /// The value calculated from baseLength using the given ratio. - func calculatingProportionalValue(withRatio ratio: CGFloat) -> CGFloat { + func calculatingProportionalValue(withRatio ratio: CGFloat, forPreview isForPreview: Bool = false) -> CGFloat { + + if isForPreview { + let columnCount = CGFloat(galleryColumnCount) + let padding = galleryColumnSpacing * 2 + galleryColumnSpacing / 2 + return (baseLength / columnCount - padding) * ratio + } return baseLength * ratio } From 1bb00101a43f5f63dcfcc7c7f0620c2c9b340a6b Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 07:21:41 +0900 Subject: [PATCH 021/108] Add AfroBoyPreviewView --- .../project.pbxproj | 4 ++ .../ArtWorks/AfroBoy/AfroBoyPreviewView.swift | 56 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 7c1726a..bb37c30 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -56,6 +56,7 @@ 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53232B70E48F0034FB5D /* PlayButton.swift */; }; 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53282B7100670034FB5D /* ArtWorkModel.swift */; }; 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */; }; + 97AD532D2B717C950034FB5D /* AfroBoyPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532C2B717C950034FB5D /* AfroBoyPreviewView.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -125,6 +126,7 @@ 97AD53232B70E48F0034FB5D /* PlayButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayButton.swift; sourceTree = ""; }; 97AD53282B7100670034FB5D /* ArtWorkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtWorkModel.swift; sourceTree = ""; }; 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AfroBoyArtView.swift; sourceTree = ""; }; + 97AD532C2B717C950034FB5D /* AfroBoyPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AfroBoyPreviewView.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -391,6 +393,7 @@ isa = PBXGroup; children = ( 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */, + 97AD532C2B717C950034FB5D /* AfroBoyPreviewView.swift */, ); path = AfroBoy; sourceTree = ""; @@ -555,6 +558,7 @@ 9748BE232893B35A006DF0BE /* WorldPeace.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, + 97AD532D2B717C950034FB5D /* AfroBoyPreviewView.swift in Sources */, 9748BE372893D064006DF0BE /* PartyAnimals.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift new file mode 100644 index 0000000..db475ec --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift @@ -0,0 +1,56 @@ +// +// AfroBoyPreviewView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct AfroBoyPreviewView: View { + + @Environment(ArtWorkModel.self) var model + @State private var isAnimating = false + + var body: some View { + ZStack { + + // MARK: - 􁝰 Hair + Image(systemName: "tree.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.9, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.9, forPreview: true)) + + // MARK: - 􀙧 Contour + Image(systemName: "shield.fill") + .resizable() + .foregroundStyle(.paleOrange) + .frame(width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.6, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true)) + + // MARK: - 􀎽 Face + Image(systemName: "faceid") + .resizable() + .foregroundStyle(.black, .paleOrange) + .frame(width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true)) + + // MARK: - 􀦉 Comb + Image(systemName: "comb.fill") + .resizable() + .foregroundStyle(.red) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true)) + } + } +} + +#Preview { + AfroBoyPreviewView() + .environment(ArtWorkModel.preview) +} From 3871c7ed47b558b982ea4d5b8447fd5d280a5296 Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 07:21:56 +0900 Subject: [PATCH 022/108] Update ArtGallery layout --- .../ArtGalleryView.swift | 48 ++++++++++++++++--- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 2ea15b5..5cf311d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -11,23 +11,59 @@ extension ArtGalleryView { init(screenSize: CGSize) { self.model = ArtWorkModel(screenSize: screenSize) + self.columns = Array(repeating: GridItem(spacing: model.galleryColumnSpacing), + count: model.galleryColumnCount) } } struct ArtGalleryView: View { private let model: ArtWorkModel + private let columns: [GridItem] var body: some View { NavigationStack { - List { - NavigationLink { - AfroBoyArtView() - } label: { - Text("Afro boy") + ScrollView { + LazyVGrid(columns: columns) { + + Group { + NavigationLink { + AfroBoyArtView() + } label: { + AfroBoyPreviewView() + } + + NavigationLink { + AfroBoyArtView() + } label: { + AfroBoyPreviewView() + } + + NavigationLink { + AfroBoyArtView() + } label: { + AfroBoyPreviewView() + } + + NavigationLink { + AfroBoyArtView() + } label: { + AfroBoyPreviewView() + } + + NavigationLink { + AfroBoyArtView() + } label: { + AfroBoyPreviewView() + } + } + .padding(model.galleryColumnSpacing) + .background(RoundedRectangle(cornerRadius: 12).stroke(lineWidth: 4)) + .padding(.top, 24) } + .padding(.horizontal, 24) } - .navigationTitle("Gallery") + .navigationTitle("Art Gallery") } .environment(model) } From c3311975bbf82865bf76d579b8d2396ceae9db3a Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 08:38:47 +0900 Subject: [PATCH 023/108] Add GalleryGridItemView --- .../project.pbxproj | 4 ++ .../ArtGalleryView.swift | 7 +-- .../Common/Models/ArtWorkModel.swift | 10 +++- .../Common/Views/GalleryGridView.swift | 57 +++++++++++++++++++ 4 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index bb37c30..cd99529 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -57,6 +57,7 @@ 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53282B7100670034FB5D /* ArtWorkModel.swift */; }; 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */; }; 97AD532D2B717C950034FB5D /* AfroBoyPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532C2B717C950034FB5D /* AfroBoyPreviewView.swift */; }; + 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53302B71A5130034FB5D /* GalleryGridView.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; @@ -127,6 +128,7 @@ 97AD53282B7100670034FB5D /* ArtWorkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtWorkModel.swift; sourceTree = ""; }; 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AfroBoyArtView.swift; sourceTree = ""; }; 97AD532C2B717C950034FB5D /* AfroBoyPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AfroBoyPreviewView.swift; sourceTree = ""; }; + 97AD53302B71A5130034FB5D /* GalleryGridView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GalleryGridView.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -368,6 +370,7 @@ children = ( 97AD53252B70E4DA0034FB5D /* ArtComponentView */, 97AD53232B70E48F0034FB5D /* PlayButton.swift */, + 97AD53302B71A5130034FB5D /* GalleryGridView.swift */, ); path = Views; sourceTree = ""; @@ -587,6 +590,7 @@ 9748BE59289DCE17006DF0BE /* Fireworks.swift in Sources */, 97E11E3C281971ED00B2AB32 /* CrayonEye.swift in Sources */, 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, + 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, 9748BE1D289399CF006DF0BE /* SFAlphabet.swift in Sources */, 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 5cf311d..069be23 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -11,7 +11,7 @@ extension ArtGalleryView { init(screenSize: CGSize) { self.model = ArtWorkModel(screenSize: screenSize) - self.columns = Array(repeating: GridItem(spacing: model.galleryColumnSpacing), + self.columns = Array(repeating: GridItem(.fixed(model.galleryColumnLength), spacing: model.galleryColumnSpacing), count: model.galleryColumnCount) } } @@ -31,6 +31,7 @@ struct ArtGalleryView: View { AfroBoyArtView() } label: { AfroBoyPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) } NavigationLink { @@ -55,11 +56,9 @@ struct ArtGalleryView: View { AfroBoyArtView() } label: { AfroBoyPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) } } - .padding(model.galleryColumnSpacing) - .background(RoundedRectangle(cornerRadius: 12).stroke(lineWidth: 4)) - .padding(.top, 24) } .padding(.horizontal, 24) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift index f07820e..d418b33 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift @@ -31,6 +31,12 @@ class ArtWorkModel { return 2 } + var galleryColumnLength: CGFloat { + let columnCount = CGFloat(galleryColumnCount) + let padding = galleryColumnSpacing + return (baseLength / columnCount - padding) + } + var initialSymbolLength: Double { return baseLength * 0.06 } @@ -47,9 +53,7 @@ class ArtWorkModel { func calculatingProportionalValue(withRatio ratio: CGFloat, forPreview isForPreview: Bool = false) -> CGFloat { if isForPreview { - let columnCount = CGFloat(galleryColumnCount) - let padding = galleryColumnSpacing * 2 + galleryColumnSpacing / 2 - return (baseLength / columnCount - padding) * ratio + return (galleryColumnLength - galleryColumnSpacing) * ratio } return baseLength * ratio } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift new file mode 100644 index 0000000..1666e89 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift @@ -0,0 +1,57 @@ +// +// GalleryGridView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension View { + + func galleryGridItemView(length: CGFloat) -> some View { + GalleryGridItemView(length: length) { + self + } + } +} + +struct GalleryGridItemView: View { + + init(length: CGFloat, @ViewBuilder content: () -> Content) { + self.length = length + self.content = content() + } + + let length: CGFloat + let content: Content + + var body: some View { + + ZStack { + content + + VStack(alignment: .trailing) { + Spacer() + + Image(systemName: "chevron.right") + .foregroundStyle(.gray) + .imageScale(.large) + .padding() + } + .frame(width: length, + height: length, + alignment: .bottomTrailing) + } + .frame(width: length, + height: length) + .background(RoundedRectangle(cornerRadius: 12).stroke(lineWidth: 4).foregroundStyle(Color(uiColor: .label))) + .padding(.top, 16) + } +} + +#Preview { + AfroBoyPreviewView() + .environment(ArtWorkModel.preview) + .galleryGridItemView(length: 1024 / 4) +} From bf116f03aee606c0e837714e5c00977f0eb95c18 Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 08:59:39 +0900 Subject: [PATCH 024/108] Add preferredColorScheme to light --- SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift b/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift index a0bb100..d3c7eca 100644 --- a/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift +++ b/SFSymbolsArtCollection/SFSymbolsArtCollectionApp.swift @@ -14,6 +14,7 @@ struct SFSymbolsArtCollectionApp: App { WindowGroup { GeometryReader { geometry in ArtGalleryView(screenSize: geometry.size) + .preferredColorScheme(.light) } } } From 6bba517fd06887d676cb4a97e29f3dd68e9384e7 Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 09:00:01 +0900 Subject: [PATCH 025/108] Refactor GalleryGridView --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 2 +- .../ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index cd99529..3c40d98 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -369,8 +369,8 @@ isa = PBXGroup; children = ( 97AD53252B70E4DA0034FB5D /* ArtComponentView */, - 97AD53232B70E48F0034FB5D /* PlayButton.swift */, 97AD53302B71A5130034FB5D /* GalleryGridView.swift */, + 97AD53232B70E48F0034FB5D /* PlayButton.swift */, ); path = Views; sourceTree = ""; diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift index 1666e89..bb9c663 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift @@ -45,7 +45,7 @@ struct GalleryGridItemView: View { } .frame(width: length, height: length) - .background(RoundedRectangle(cornerRadius: 12).stroke(lineWidth: 4).foregroundStyle(Color(uiColor: .label))) + .background(RoundedRectangle(cornerRadius: 12).stroke(lineWidth: 4).foregroundStyle(.black)) .padding(.top, 16) } } From 5d1000f5b916ff949f38ee685e736d9f9da1c41d Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 09:03:32 +0900 Subject: [PATCH 026/108] Modify GalleryGridItemView background --- .../ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift index bb9c663..818970a 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift @@ -45,7 +45,7 @@ struct GalleryGridItemView: View { } .frame(width: length, height: length) - .background(RoundedRectangle(cornerRadius: 12).stroke(lineWidth: 4).foregroundStyle(.black)) + .background(RoundedRectangle(cornerRadius: 12).fill(.white).shadow(radius: 4)) .padding(.top, 16) } } From f37f7113731910a4de6b2bc06d9f3d0194008670 Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 22:32:47 +0900 Subject: [PATCH 027/108] Add awesomeYellow --- .../AwesomeYellow.colorset/Contents.json | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 SFSymbolsArtCollection/Assets.xcassets/AwesomeYellow.colorset/Contents.json diff --git a/SFSymbolsArtCollection/Assets.xcassets/AwesomeYellow.colorset/Contents.json b/SFSymbolsArtCollection/Assets.xcassets/AwesomeYellow.colorset/Contents.json new file mode 100644 index 0000000..9647112 --- /dev/null +++ b/SFSymbolsArtCollection/Assets.xcassets/AwesomeYellow.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0.306", + "green" : "0.918", + "red" : "0.984" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} From e0b0d54d95ce2a96aa7e118e8b6ca4da5578db3c Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 22:33:23 +0900 Subject: [PATCH 028/108] Modify calculatingInitialOffset methods --- .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 14 ++--- .../Common/Models/ArtWorkModel.swift | 63 +++++++++++++++++-- 2 files changed, 66 insertions(+), 11 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift index 5b629e7..2e4934b 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -21,8 +21,8 @@ struct AfroBoyArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetX: model.calculatingOffsetX(forBottomColumn: .first), - offsetY: model.offsetYForBottomColumn + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) ), finalValue: .init( width: model.calculatingProportionalValue(withRatio: 0.9), @@ -39,8 +39,8 @@ struct AfroBoyArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetX: model.calculatingOffsetX(forBottomColumn: .second), - offsetY: model.offsetYForBottomColumn + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) ), finalValue: .init( primaryColor: .paleOrange, @@ -59,8 +59,8 @@ struct AfroBoyArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetX: model.calculatingOffsetX(forBottomColumn: .third), - offsetY: model.offsetYForBottomColumn + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) ), finalValue: .init( secondaryColor: .paleOrange, @@ -79,7 +79,7 @@ struct AfroBoyArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetY: model.offsetYForBottomColumn + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.forth)) ), finalValue: .init( primaryColor: .red, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift index d418b33..2b5a71d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift @@ -41,12 +41,21 @@ class ArtWorkModel { return baseLength * 0.06 } - var offsetYForBottomColumn: CGFloat { - return calculatingProportionalValue(withRatio: 0.5) + func calculatingInitialOffsetX(forPosition symbolRow: InitialSymbolRow) -> CGFloat { + let ratio: CGFloat + switch symbolRow { + case let .first(symbolColumn): + ratio = symbolColumn.offsetXRatio + case let .second(symbolColumn): + ratio = symbolColumn.offsetXRatio + case let .third(symbolColumn): + ratio = symbolColumn.offsetXRatio + } + return calculatingProportionalValue(withRatio: ratio) } - func calculatingOffsetX(forBottomColumn bottomColumn: BottomColumnSymbol) -> CGFloat { - return calculatingProportionalValue(withRatio: bottomColumn.offsetXRatio) + func calculatingInitialOffsetY(forPosition symbolRow: InitialSymbolRow) -> CGFloat { + return calculatingProportionalValue(withRatio: symbolRow.offsetYRatio) } /// The value calculated from baseLength using the given ratio. @@ -66,6 +75,52 @@ class ArtWorkModel { // MARK: - BottomColumnSymbol extension ArtWorkModel { + enum InitialSymbolRow { + case first(InitialSymbolColumn) + case second(InitialSymbolColumn) + case third(InitialSymbolColumn) + + enum InitialSymbolColumn { + case first + case second + case third + case forth + case fifth + case sixth + case seventh + + var offsetXRatio: CGFloat { + switch self { + case .first: + -0.42 + case .second: + -0.28 + case .third: + -0.14 + case .forth: + 0 + case .fifth: + 0.14 + case .sixth: + 0.28 + case .seventh: + 0.42 + } + } + } + + var offsetYRatio: CGFloat { + switch self { + case .first: + 0.63 + case .second: + 0.34 + case .third: + 0.5 + } + } + } + enum BottomColumnSymbol { case first case second From e532f5a1b0220fc14720564135bf635a06ea9593 Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 22:33:36 +0900 Subject: [PATCH 029/108] Add NosebleedArtView --- .../project.pbxproj | 12 + .../ArtWorks/Nosebleed/NosebleedArtView.swift | 508 ++++++++++++++++++ 2 files changed, 520 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 3c40d98..c15a294 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -74,6 +74,7 @@ 97E11E3E281971ED00B2AB32 /* CrayonEyebrow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E39281971ED00B2AB32 /* CrayonEyebrow.swift */; }; 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E3A281971ED00B2AB32 /* CrayonEyeBall.swift */; }; 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E452819734700B2AB32 /* CrayonBoy.swift */; }; + 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -145,6 +146,7 @@ 97E11E39281971ED00B2AB32 /* CrayonEyebrow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyebrow.swift; sourceTree = ""; }; 97E11E3A281971ED00B2AB32 /* CrayonEyeBall.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyeBall.swift; sourceTree = ""; }; 97E11E452819734700B2AB32 /* CrayonBoy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoy.swift; sourceTree = ""; }; + 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedArtView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -387,6 +389,7 @@ 97AD531B2B70E0A10034FB5D /* ArtWorks */ = { isa = PBXGroup; children = ( + 97EF43892B725DE7003648F5 /* Nosebleed */, 97AD531E2B70E2770034FB5D /* AfroBoy */, ); path = ArtWorks; @@ -481,6 +484,14 @@ path = Extensions; sourceTree = ""; }; + 97EF43892B725DE7003648F5 /* Nosebleed */ = { + isa = PBXGroup; + children = ( + 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */, + ); + path = Nosebleed; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -562,6 +573,7 @@ 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, 97AD532D2B717C950034FB5D /* AfroBoyPreviewView.swift in Sources */, + 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, 9748BE372893D064006DF0BE /* PartyAnimals.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift new file mode 100644 index 0000000..57b9ec8 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -0,0 +1,508 @@ +// +// NosebleedArtView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct NosebleedArtView: View { + + @Environment(ArtWorkModel.self) var model + @State private var isAnimating = false + @State private var isEffectActivated = false + + var body: some View { + + ZStack { + + // 🟡 Contour + ArtComponentView( + name: "circle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) + ), + finalValue: .init( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.65), + height: model.calculatingProportionalValue(withRatio: 0.65) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: 0.001 + ) + + // 👃🩸 Nosebleed bottom + ArtComponentView( + name: "cellularbars", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) + ), + finalValue: .init( + primaryColor: .red, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.5), + rotationDegrees: 180, + offsetX: model.calculatingProportionalValue(withRatio: 0.09), + offsetY: model.calculatingProportionalValue(withRatio: 0.074) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 1) + ) + .symbolEffect(.variableColor.hideInactiveLayers, + options: .speed(0.6).repeating, + isActive: isEffectActivated) + + // 🟨 Nosebleed bottom hide + ArtComponentView( + name: "rectangle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.1), + height: model.calculatingProportionalValue(withRatio: 0.14), + offsetX: model.calculatingProportionalValue(withRatio: 0.09), + offsetY: model.calculatingProportionalValue(withRatio: 0.15) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 2) + ) + + // 👄 Mouth + ArtComponentView( + name: "lasso", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.forth)) + ), + finalValue: .init( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.4), + height: model.calculatingProportionalValue(withRatio: 0.3), + rotationDegrees: 170, + offsetX: model.calculatingProportionalValue(withRatio: 0.01), + offsetY: model.calculatingProportionalValue(withRatio: 0.05) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 3) + ) + + // 🟨 Mouth hide + ArtComponentView( + name: "rectangle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.5), + height: model.calculatingProportionalValue(withRatio: 0.3), + rotationDegrees: 176, + offsetY: model.calculatingProportionalValue(withRatio: -0.03) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 4) + ) + + // 👃🩸 Nosebleed top + ArtComponentView( + name: "cellularbars", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) + ), + finalValue: .init( + primaryColor: .red, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.12), + rotationDegrees: 180, + offsetX: model.calculatingProportionalValue(withRatio: 0.033), + offsetY: model.calculatingProportionalValue(withRatio: 0.096) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 5) + ) + .symbolEffect(.variableColor.hideInactiveLayers, + options: .speed(0.6).repeating, + isActive: isEffectActivated) + + // 🟨 Nosebleed top hide right + ArtComponentView( + name: "rectangle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.1), + height: model.calculatingProportionalValue(withRatio: 0.1), + offsetX: model.calculatingProportionalValue(withRatio: 0.09), + offsetY: model.calculatingProportionalValue(withRatio: 0.06) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 6) + ) + + // 🟨 Nosebleed top hide left + ArtComponentView( + name: "rectangle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.03), + height: model.calculatingProportionalValue(withRatio: 0.14), + offsetX: model.calculatingProportionalValue(withRatio: -0.053), + offsetY: model.calculatingProportionalValue(withRatio: 0.09) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 6) + ) + + // 👁️ Right eye + ArtComponentView( + name: "circle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) + ), + finalValue: .init( + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.06), + offsetX: model.calculatingProportionalValue(withRatio: 0.117), + offsetY: model.calculatingProportionalValue(withRatio: -0.176) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 7) + ) + + // 👁️ Left eye + ArtComponentView( + name: "circle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) + ), + finalValue: .init( + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.06), + offsetX: model.calculatingProportionalValue(withRatio: -0.113), + offsetY: model.calculatingProportionalValue(withRatio: -0.17) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 7) + ) + + // 🧻 Tissue + ArtComponentView( + name: "doc.plaintext.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fifth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fifth)) + ), + finalValue: .init( + primaryColor: .white, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.08), + rotationDegrees: 188, + offsetX: model.calculatingProportionalValue(withRatio: -0.052), + offsetY: model.calculatingProportionalValue(withRatio: 0.083) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 8) + ) + + // 🧻 Tissue frame + ArtComponentView( + name: "doc.plaintext", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.sixth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.sixth)) + ), + finalValue: .init( + fontWeight: .light, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.08), + rotationDegrees: 188, + offsetX: model.calculatingProportionalValue(withRatio: -0.052), + offsetY: model.calculatingProportionalValue(withRatio: 0.083) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 8) + ) + + // 👃 Nose + ArtComponentView( + name: "triangleshape", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.seventh)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.seventh)) + ), + finalValue: .init( + fontWeight: .light, + width: model.calculatingProportionalValue(withRatio: 0.15), + height: model.calculatingProportionalValue(withRatio: 0.14), + rotationDegrees: -4, + offsetX: model.calculatingProportionalValue(withRatio: -0.013), + offsetY: model.calculatingProportionalValue(withRatio: -0.02) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 9) + ) + + // 🟨 Nose hide + ArtComponentView( + name: "rectangle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.02), + height: model.calculatingProportionalValue(withRatio: 0.13), + rotationDegrees: 148, + offsetX: model.calculatingProportionalValue(withRatio: 0.007), + offsetY: model.calculatingProportionalValue(withRatio: -0.046) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 10) + ) + } + .navigationTitle("Nosebleed") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + .onChange(of: isAnimating) { _, newValue in + if newValue { + Timer.scheduledTimer( + withTimeInterval: model.waitingTime(forCount: 13), + repeats: false + ) { _ in + isEffectActivated = true + } + } + } + } +} + +struct NosebleedArtPreviewView: View { + + @Environment(ArtWorkModel.self) var model + + var body: some View { + + ZStack { + + // MARK: - 􀀁 Contour + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true)) + + // MARK: - 􀭧 Nosebleed bottom + Image(systemName: "cellularbars") + .resizable() + .foregroundStyle(.red) + .fontWeight(.ultraLight) + .rotationEffect(.degrees(180)) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.074, forPreview: true)) + + // MARK: - 􀏄 Nosebleed bottom hide + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) + + // MARK: - 􀓩 Mouth + Image(systemName: "lasso") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) + .rotationEffect(.degrees(170)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true)) + + // MARK: - 􀏄 Mouth hide + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) + .rotationEffect(.degrees(176)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true)) + + // MARK: - 􀭧 Nosebleed top + Image(systemName: "cellularbars") + .resizable() + .foregroundStyle(.red) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + .rotationEffect(.degrees(180)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.033, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.096, forPreview: true)) + + // MARK: - 􀏄 Nosebleed top right hide + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + + // MARK: - 􀏄 Nosebleed top left hide + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.053, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true)) + + // MARK: - 􀀁 Right eye + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.117, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.176, forPreview: true)) + + // MARK: - 􀀁 Left eye + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.113, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.17, forPreview: true)) + + // MARK: - 􀥨 Tissue + Image(systemName: "doc.plaintext.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true)) + .rotationEffect(.degrees(188)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true)) + + // MARK: - 􀉆 Tissue frame + Image(systemName: "doc.plaintext") + .resizable() + .foregroundStyle(.black) + .fontWeight(.light) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true)) + .rotationEffect(.degrees(188)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true)) + + // MARK: - 􀥰 Nose + Image(systemName: "triangleshape") + .resizable() + .foregroundStyle(.black) + .fontWeight(.light) + .frame(width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) + .rotationEffect(.degrees(-4)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.013, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.02, forPreview: true)) + + // MARK: - 􀏄 Nose hide + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true)) + .rotationEffect(.degrees(148)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.007, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.046, forPreview: true)) + } + } +} + +#Preview { + NavigationStack { + NosebleedArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + NosebleedArtPreviewView() + .environment(ArtWorkModel.preview) +} From 74e244e827625f5f9a10439625bc8b9c275a6439 Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 22:36:14 +0900 Subject: [PATCH 030/108] Move InitialSymbolRow to decrate folder --- .../project.pbxproj | 4 + .../Common/Models/ArtWorkModel.swift | 79 ----------------- .../ArtWorkModel+InitialSymbolRow.swift | 87 +++++++++++++++++++ 3 files changed, 91 insertions(+), 79 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/ArtWorkModel+InitialSymbolRow.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index c15a294..2ebecfd 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -75,6 +75,7 @@ 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E3A281971ED00B2AB32 /* CrayonEyeBall.swift */; }; 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E452819734700B2AB32 /* CrayonBoy.swift */; }; 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */; }; + 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -147,6 +148,7 @@ 97E11E3A281971ED00B2AB32 /* CrayonEyeBall.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyeBall.swift; sourceTree = ""; }; 97E11E452819734700B2AB32 /* CrayonBoy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoy.swift; sourceTree = ""; }; 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedArtView.swift; sourceTree = ""; }; + 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArtWorkModel+InitialSymbolRow.swift"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -477,6 +479,7 @@ 97E11E412819727A00B2AB32 /* Extensions */ = { isa = PBXGroup; children = ( + 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */, 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */, 97AD53112B70DEB60034FB5D /* UIDevice+.swift */, 97AD53192B70E0530034FB5D /* Font.Weight+.swift */, @@ -621,6 +624,7 @@ 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */, 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */, 97E11E3B281971ED00B2AB32 /* CrayonEyes.swift in Sources */, + 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */, 9748BE352893CB67006DF0BE /* Lion.swift in Sources */, 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, 97AD53222B70E3FA0034FB5D /* ArtComponentView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift index 2b5a71d..426dce1 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift @@ -71,82 +71,3 @@ class ArtWorkModel { return animationDurationPerSymbol * Double(count) } } - -// MARK: - BottomColumnSymbol -extension ArtWorkModel { - - enum InitialSymbolRow { - case first(InitialSymbolColumn) - case second(InitialSymbolColumn) - case third(InitialSymbolColumn) - - enum InitialSymbolColumn { - case first - case second - case third - case forth - case fifth - case sixth - case seventh - - var offsetXRatio: CGFloat { - switch self { - case .first: - -0.42 - case .second: - -0.28 - case .third: - -0.14 - case .forth: - 0 - case .fifth: - 0.14 - case .sixth: - 0.28 - case .seventh: - 0.42 - } - } - } - - var offsetYRatio: CGFloat { - switch self { - case .first: - 0.63 - case .second: - 0.34 - case .third: - 0.5 - } - } - } - - enum BottomColumnSymbol { - case first - case second - case third - case forth - case fifth - case sixth - case seventh - - var offsetXRatio: CGFloat { - switch self { - case .first: - -0.42 - case .second: - -0.28 - case .third: - -0.14 - case .forth: - 0 - case .fifth: - 0.14 - case .sixth: - 0.28 - case .seventh: - 0.42 - } - } - } -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/ArtWorkModel+InitialSymbolRow.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/ArtWorkModel+InitialSymbolRow.swift new file mode 100644 index 0000000..2456bad --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/ArtWorkModel+InitialSymbolRow.swift @@ -0,0 +1,87 @@ +// +// ArtWorkModel+InitialSymbolRow.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +// MARK: - BottomColumnSymbol +extension ArtWorkModel { + + enum InitialSymbolRow { + case first(InitialSymbolColumn) + case second(InitialSymbolColumn) + case third(InitialSymbolColumn) + + enum InitialSymbolColumn { + case first + case second + case third + case forth + case fifth + case sixth + case seventh + + var offsetXRatio: CGFloat { + switch self { + case .first: + -0.42 + case .second: + -0.28 + case .third: + -0.14 + case .forth: + 0 + case .fifth: + 0.14 + case .sixth: + 0.28 + case .seventh: + 0.42 + } + } + } + + var offsetYRatio: CGFloat { + switch self { + case .first: + 0.63 + case .second: + 0.34 + case .third: + 0.5 + } + } + } + + enum BottomColumnSymbol { + case first + case second + case third + case forth + case fifth + case sixth + case seventh + + var offsetXRatio: CGFloat { + switch self { + case .first: + -0.42 + case .second: + -0.28 + case .third: + -0.14 + case .forth: + 0 + case .fifth: + 0.14 + case .sixth: + 0.28 + case .seventh: + 0.42 + } + } + } +} From f6614565a53db8939847ec9858df3e35a0532393 Mon Sep 17 00:00:00 2001 From: littleossa Date: Tue, 6 Feb 2024 22:37:05 +0900 Subject: [PATCH 031/108] Refactor ArtWorkModel --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 12 ++++++++++-- .../ArtWorkModel+InitialSymbolRow.swift | 0 .../Models/{ => ArtWorkModel}/ArtWorkModel.swift | 0 3 files changed, 10 insertions(+), 2 deletions(-) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/{Extensions => Common/Models/ArtWorkModel}/ArtWorkModel+InitialSymbolRow.swift (100%) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/{ => ArtWorkModel}/ArtWorkModel.swift (100%) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 2ebecfd..3c0a4ff 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -382,7 +382,7 @@ 97AD53142B70DF8A0034FB5D /* Models */ = { isa = PBXGroup; children = ( - 97AD53282B7100670034FB5D /* ArtWorkModel.swift */, + 97EF438E2B726D66003648F5 /* ArtWorkModel */, 97AD53172B70DFF30034FB5D /* AnimationValues.swift */, ); path = Models; @@ -479,7 +479,6 @@ 97E11E412819727A00B2AB32 /* Extensions */ = { isa = PBXGroup; children = ( - 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */, 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */, 97AD53112B70DEB60034FB5D /* UIDevice+.swift */, 97AD53192B70E0530034FB5D /* Font.Weight+.swift */, @@ -495,6 +494,15 @@ path = Nosebleed; sourceTree = ""; }; + 97EF438E2B726D66003648F5 /* ArtWorkModel */ = { + isa = PBXGroup; + children = ( + 97AD53282B7100670034FB5D /* ArtWorkModel.swift */, + 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */, + ); + path = ArtWorkModel; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/ArtWorkModel+InitialSymbolRow.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift similarity index 100% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/ArtWorkModel+InitialSymbolRow.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift similarity index 100% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift From f4a4e876dc23d9768f8138d4f816c16c1036ee40 Mon Sep 17 00:00:00 2001 From: littleossa Date: Wed, 7 Feb 2024 05:48:23 +0900 Subject: [PATCH 032/108] Update comment of Nosebleed --- .../ArtWorks/Nosebleed/NosebleedArtView.swift | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift index 57b9ec8..28c6a34 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -17,7 +17,7 @@ struct NosebleedArtView: View { ZStack { - // 🟡 Contour + // MARK: - 􀀁 Contour ArtComponentView( name: "circle.fill", initialValue: .init( @@ -36,7 +36,7 @@ struct NosebleedArtView: View { waitingTime: 0.001 ) - // 👃🩸 Nosebleed bottom + // MARK: - 􀭧 Nosebleed bottom ArtComponentView( name: "cellularbars", initialValue: .init( @@ -62,7 +62,7 @@ struct NosebleedArtView: View { options: .speed(0.6).repeating, isActive: isEffectActivated) - // 🟨 Nosebleed bottom hide + // MARK: - 􀏄 Concealing part for nosebleed bottom ArtComponentView( name: "rectangle.fill", initialValue: .init( @@ -83,7 +83,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 2) ) - // 👄 Mouth + // MARK: - 􀓩 Mouth ArtComponentView( name: "lasso", initialValue: .init( @@ -104,7 +104,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 3) ) - // 🟨 Mouth hide + // MARK: - 􀏄 Concealing part for Mouth ArtComponentView( name: "rectangle.fill", initialValue: .init( @@ -125,7 +125,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 4) ) - // 👃🩸 Nosebleed top + // MARK: - 􀭧 Nosebleed top ArtComponentView( name: "cellularbars", initialValue: .init( @@ -151,7 +151,7 @@ struct NosebleedArtView: View { options: .speed(0.6).repeating, isActive: isEffectActivated) - // 🟨 Nosebleed top hide right + // MARK: - 􀏄 Concealing part for nosebleed top right ArtComponentView( name: "rectangle.fill", initialValue: .init( @@ -172,7 +172,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 6) ) - // 🟨 Nosebleed top hide left + // MARK: - 􀏄 Concealing part for nosebleed top left ArtComponentView( name: "rectangle.fill", initialValue: .init( @@ -193,7 +193,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 6) ) - // 👁️ Right eye + // MARK: - 􀀁 Right eye ArtComponentView( name: "circle.fill", initialValue: .init( @@ -213,7 +213,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 7) ) - // 👁️ Left eye + // MARK: - 􀀁 Left eye ArtComponentView( name: "circle.fill", initialValue: .init( @@ -233,7 +233,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 7) ) - // 🧻 Tissue + // MARK: - 􀥨 Tissue ArtComponentView( name: "doc.plaintext.fill", initialValue: .init( @@ -256,7 +256,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 8) ) - // 🧻 Tissue frame + // MARK: - 􀉆 Tissue frame ArtComponentView( name: "doc.plaintext", initialValue: .init( @@ -278,7 +278,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 8) ) - // 👃 Nose + // MARK: - 􀥰 Nose ArtComponentView( name: "triangleshape", initialValue: .init( @@ -300,7 +300,7 @@ struct NosebleedArtView: View { waitingTime: model.waitingTime(forCount: 9) ) - // 🟨 Nose hide + // MARK: - 􀏄 Concealing part for nose ArtComponentView( name: "rectangle.fill", initialValue: .init( @@ -374,7 +374,7 @@ struct NosebleedArtPreviewView: View { .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), y: model.calculatingProportionalValue(withRatio: 0.074, forPreview: true)) - // MARK: - 􀏄 Nosebleed bottom hide + // MARK: - 􀏄 Concealing part for nosebleed bottom Image(systemName: "rectangle.fill") .resizable() .foregroundStyle(.awesomeYellow) @@ -394,7 +394,7 @@ struct NosebleedArtPreviewView: View { .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), y: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true)) - // MARK: - 􀏄 Mouth hide + // MARK: - 􀏄 Concealing part for Mouth Image(systemName: "rectangle.fill") .resizable() .foregroundStyle(.awesomeYellow) From bed2a18fc6b094db197245eb2046a77dfd7c5a81 Mon Sep 17 00:00:00 2001 From: littleossa Date: Wed, 7 Feb 2024 05:49:02 +0900 Subject: [PATCH 033/108] Update ArtGalleryView with NosebleedArtWork --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 2 +- .../ArtisticWorldOfSFSymbols/ArtGalleryView.swift | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 3c0a4ff..cf54c82 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -391,8 +391,8 @@ 97AD531B2B70E0A10034FB5D /* ArtWorks */ = { isa = PBXGroup; children = ( - 97EF43892B725DE7003648F5 /* Nosebleed */, 97AD531E2B70E2770034FB5D /* AfroBoy */, + 97EF43892B725DE7003648F5 /* Nosebleed */, ); path = ArtWorks; sourceTree = ""; diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 069be23..2d8fd0b 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -35,9 +35,10 @@ struct ArtGalleryView: View { } NavigationLink { - AfroBoyArtView() + NosebleedArtView() } label: { - AfroBoyPreviewView() + NosebleedArtPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) } NavigationLink { From 5be81be9d5deefd24462195e877e48a13e779d5a Mon Sep 17 00:00:00 2001 From: littleossa Date: Wed, 7 Feb 2024 05:50:56 +0900 Subject: [PATCH 034/108] Create discrete file for NosebleedArtPreviewView --- .../project.pbxproj | 4 + .../ArtWorks/Nosebleed/NosebleedArtView.swift | 152 ----------------- .../Nosebleed/NosebleedPreviewView.swift | 160 ++++++++++++++++++ 3 files changed, 164 insertions(+), 152 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index cf54c82..798f1c6 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -76,6 +76,7 @@ 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E452819734700B2AB32 /* CrayonBoy.swift */; }; 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */; }; 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */; }; + 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -149,6 +150,7 @@ 97E11E452819734700B2AB32 /* CrayonBoy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoy.swift; sourceTree = ""; }; 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedArtView.swift; sourceTree = ""; }; 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArtWorkModel+InitialSymbolRow.swift"; sourceTree = ""; }; + 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedPreviewView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -490,6 +492,7 @@ isa = PBXGroup; children = ( 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */, + 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */, ); path = Nosebleed; sourceTree = ""; @@ -638,6 +641,7 @@ 97AD53222B70E3FA0034FB5D /* ArtComponentView.swift in Sources */, 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, + 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */, 97E11E34281971E200B2AB32 /* CrayonFace.swift in Sources */, 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift index 28c6a34..b0bf0a8 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -348,161 +348,9 @@ struct NosebleedArtView: View { } } -struct NosebleedArtPreviewView: View { - - @Environment(ArtWorkModel.self) var model - - var body: some View { - - ZStack { - - // MARK: - 􀀁 Contour - Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true)) - - // MARK: - 􀭧 Nosebleed bottom - Image(systemName: "cellularbars") - .resizable() - .foregroundStyle(.red) - .fontWeight(.ultraLight) - .rotationEffect(.degrees(180)) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.074, forPreview: true)) - - // MARK: - 􀏄 Concealing part for nosebleed bottom - Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) - - // MARK: - 􀓩 Mouth - Image(systemName: "lasso") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) - .rotationEffect(.degrees(170)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true)) - - // MARK: - 􀏄 Concealing part for Mouth - Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) - .rotationEffect(.degrees(176)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true)) - - // MARK: - 􀭧 Nosebleed top - Image(systemName: "cellularbars") - .resizable() - .foregroundStyle(.red) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) - .rotationEffect(.degrees(180)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.033, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.096, forPreview: true)) - - // MARK: - 􀏄 Nosebleed top right hide - Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) - - // MARK: - 􀏄 Nosebleed top left hide - Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.053, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true)) - - // MARK: - 􀀁 Right eye - Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.117, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.176, forPreview: true)) - - // MARK: - 􀀁 Left eye - Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.113, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.17, forPreview: true)) - - // MARK: - 􀥨 Tissue - Image(systemName: "doc.plaintext.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true)) - .rotationEffect(.degrees(188)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true)) - - // MARK: - 􀉆 Tissue frame - Image(systemName: "doc.plaintext") - .resizable() - .foregroundStyle(.black) - .fontWeight(.light) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true)) - .rotationEffect(.degrees(188)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true)) - - // MARK: - 􀥰 Nose - Image(systemName: "triangleshape") - .resizable() - .foregroundStyle(.black) - .fontWeight(.light) - .frame(width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) - .rotationEffect(.degrees(-4)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.013, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.02, forPreview: true)) - - // MARK: - 􀏄 Nose hide - Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true)) - .rotationEffect(.degrees(148)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.007, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.046, forPreview: true)) - } - } -} - #Preview { NavigationStack { NosebleedArtView() .environment(ArtWorkModel.preview) } } - -#Preview { - NosebleedArtPreviewView() - .environment(ArtWorkModel.preview) -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift new file mode 100644 index 0000000..448020e --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift @@ -0,0 +1,160 @@ +// +// NosebleedPreviewView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct NosebleedArtPreviewView: View { + + @Environment(ArtWorkModel.self) var model + + var body: some View { + + ZStack { + + // MARK: - 􀀁 Contour + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true)) + + // MARK: - 􀭧 Nosebleed bottom + Image(systemName: "cellularbars") + .resizable() + .foregroundStyle(.red) + .fontWeight(.ultraLight) + .rotationEffect(.degrees(180)) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.074, forPreview: true)) + + // MARK: - 􀏄 Concealing part for nosebleed bottom + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) + + // MARK: - 􀓩 Mouth + Image(systemName: "lasso") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) + .rotationEffect(.degrees(170)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true)) + + // MARK: - 􀏄 Concealing part for Mouth + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) + .rotationEffect(.degrees(176)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true)) + + // MARK: - 􀭧 Nosebleed top + Image(systemName: "cellularbars") + .resizable() + .foregroundStyle(.red) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + .rotationEffect(.degrees(180)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.033, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.096, forPreview: true)) + + // MARK: - 􀏄 Nosebleed top right hide + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + + // MARK: - 􀏄 Nosebleed top left hide + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.053, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true)) + + // MARK: - 􀀁 Right eye + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.117, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.176, forPreview: true)) + + // MARK: - 􀀁 Left eye + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.113, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.17, forPreview: true)) + + // MARK: - 􀥨 Tissue + Image(systemName: "doc.plaintext.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true)) + .rotationEffect(.degrees(188)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true)) + + // MARK: - 􀉆 Tissue frame + Image(systemName: "doc.plaintext") + .resizable() + .foregroundStyle(.black) + .fontWeight(.light) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true)) + .rotationEffect(.degrees(188)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true)) + + // MARK: - 􀥰 Nose + Image(systemName: "triangleshape") + .resizable() + .foregroundStyle(.black) + .fontWeight(.light) + .frame(width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) + .rotationEffect(.degrees(-4)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.013, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.02, forPreview: true)) + + // MARK: - 􀏄 Nose hide + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.awesomeYellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true)) + .rotationEffect(.degrees(148)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.007, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.046, forPreview: true)) + } + } +} + +#Preview { + NosebleedArtPreviewView() + .environment(ArtWorkModel.preview) +} From d53f846ec23a936313eeed8b8d20a9669fbf1c7b Mon Sep 17 00:00:00 2001 From: littleossa Date: Wed, 7 Feb 2024 09:04:37 +0900 Subject: [PATCH 035/108] Add IamWearingPantsArt --- .../project.pbxproj | 16 + .../IamWearingPantsArtView.swift | 794 ++++++++++++++++++ .../IamWearingPantsPreviewView.swift | 422 ++++++++++ 3 files changed, 1232 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 798f1c6..1e5cce0 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -77,6 +77,8 @@ 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */; }; 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */; }; 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */; }; + 97EF43932B72D3E2003648F5 /* IamWearingPantsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43922B72D3E2003648F5 /* IamWearingPantsPreviewView.swift */; }; + 97EF43952B72DA69003648F5 /* IamWearingPantsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43942B72DA69003648F5 /* IamWearingPantsArtView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -151,6 +153,8 @@ 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedArtView.swift; sourceTree = ""; }; 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArtWorkModel+InitialSymbolRow.swift"; sourceTree = ""; }; 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedPreviewView.swift; sourceTree = ""; }; + 97EF43922B72D3E2003648F5 /* IamWearingPantsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IamWearingPantsPreviewView.swift; sourceTree = ""; }; + 97EF43942B72DA69003648F5 /* IamWearingPantsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IamWearingPantsArtView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -395,6 +399,7 @@ children = ( 97AD531E2B70E2770034FB5D /* AfroBoy */, 97EF43892B725DE7003648F5 /* Nosebleed */, + 97EF43912B72D3AF003648F5 /* IamWearingPants */, ); path = ArtWorks; sourceTree = ""; @@ -506,6 +511,15 @@ path = ArtWorkModel; sourceTree = ""; }; + 97EF43912B72D3AF003648F5 /* IamWearingPants */ = { + isa = PBXGroup; + children = ( + 97EF43942B72DA69003648F5 /* IamWearingPantsArtView.swift */, + 97EF43922B72D3E2003648F5 /* IamWearingPantsPreviewView.swift */, + ); + path = IamWearingPants; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -582,6 +596,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 97EF43932B72D3E2003648F5 /* IamWearingPantsPreviewView.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, 9748BE232893B35A006DF0BE /* WorldPeace.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, @@ -627,6 +642,7 @@ 9748BE412897CD6C006DF0BE /* Arm.swift in Sources */, 9748BE4328980C4D006DF0BE /* Hair.swift in Sources */, 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, + 97EF43952B72DA69003648F5 /* IamWearingPantsArtView.swift in Sources */, 9748BE1828933E40006DF0BE /* MagicianHat.swift in Sources */, 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift new file mode 100644 index 0000000..cbc5e34 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift @@ -0,0 +1,794 @@ +// +// IamWearingPantsArtView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct ImWearingPantsArtView: View { + + enum Pose: String { + case walk = "figure.walk" + case discSport = "figure.disc.sports" + case martialArts = "figure.martial.arts" + case strengthTraining = "figure.strengthtraining.traditional" + case football = "figure.australian.football" + case intervalTraining = "figure.highintensity.intervaltraining" + case finish = "" + + var next: Pose { + switch self { + case .walk: + .discSport + case .discSport: + .martialArts + case .martialArts: + .strengthTraining + case .strengthTraining: + .football + case .football: + .intervalTraining + case .intervalTraining: + .finish + case .finish: + .finish + } + } + + var offsetXRatio: CGFloat { + switch self { + case .walk, .discSport, .strengthTraining, .finish: + 0 + case .martialArts: + 0.04 + case .football: + -0.1 + case .intervalTraining: + -0.01 + } + } + } + + @Environment(ArtWorkModel.self) var model + @State private var isAnimating = false + @State private var isChangingPose = false + @State private var musicCount = 0 + @State private var musicTimer: Timer? + @State private var currentPose: Pose = .walk + @State private var poseTimer: Timer? + + var body: some View { + + ZStack { + + // MARK: - Current pose + ArtComponentView( + name: currentPose.rawValue, + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) + ), + finalValue: .init( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.6), + height: model.calculatingProportionalValue(withRatio: 1) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 10) + ) + .contentTransition(isChangingPose ? .symbolEffect(.replace) : .identity) + .offset(x: model.calculatingProportionalValue(withRatio: currentPose.offsetXRatio)) + + // MARK: - 􁉨 Pants + ArtComponentView( + name: "parkingsign.steeringwheel", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) + ), + finalValue: .init( + primaryColor: .palePink, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.35), + height: model.calculatingProportionalValue(withRatio: 0.2), + offsetX: model.calculatingProportionalValue(withRatio: -0.07), + offsetY: model.calculatingProportionalValue(withRatio: 0.03) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 16) + ) + .zIndex(0.1) + + if currentPose == .finish { + + Group { + + // MARK: - 􁗅 Pose + Image(systemName: "figure.arms.open") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.6), + height: model.calculatingProportionalValue(withRatio: 1)) + + // MARK: - 􀆹 Chest shadow + Image(systemName: "moon") + .resizable() + .foregroundStyle(.black.opacity(0.6)) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.015)) + .rotationEffect(.degrees(-10)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.09), + y: model.calculatingProportionalValue(withRatio: -0.125)) + + Image(systemName: "moon") + .resizable() + .foregroundStyle(.black.opacity(0.6)) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.015)) + .rotation3DEffect( + .degrees(160), + axis: (x: 0, y: 1, z: 0) + ) + .offset(x: model.calculatingProportionalValue(withRatio: 0.085), + y: model.calculatingProportionalValue(withRatio: -0.125)) + + // MARK: - 􀏄 Parts for shaping + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(Color(uiColor: .systemBackground)) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.3), + height: model.calculatingProportionalValue(withRatio: 0.4)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.25), + y: model.calculatingProportionalValue(withRatio: -0.1)) + + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(Color(uiColor: .systemBackground)) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.3), + height: model.calculatingProportionalValue(withRatio: 0.4)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.25), + y: model.calculatingProportionalValue(withRatio: -0.1)) + + // MARK: - 􀊡 Neck + Image(systemName: "speaker.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.38)) + .rotationEffect(.degrees(90)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.005), + y: model.calculatingProportionalValue(withRatio: -0.27)) + + // MARK: - 􀂓 Parts for shaping + Image(systemName: "square.fill") + .resizable() + .foregroundStyle(Color(uiColor: .systemBackground)) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.2)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.14), + y: model.calculatingProportionalValue(withRatio: -0.385)) + + Image(systemName: "square.fill") + .resizable() + .foregroundStyle(Color(uiColor: .systemBackground)) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.2)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.14), + y: model.calculatingProportionalValue(withRatio: -0.385)) + + // MARK: - 􀆺 Chest + Image(systemName: "moon.fill") + .resizable() + .foregroundStyle(.yellow) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.04)) + .rotationEffect(.degrees(-10)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.09), + y: model.calculatingProportionalValue(withRatio: -0.138)) + + Image(systemName: "moon.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.04)) + .rotation3DEffect( + .degrees(160), + axis: (x: 0, y: 1, z: 0) + ) + .offset(x: model.calculatingProportionalValue(withRatio: 0.085), + y: model.calculatingProportionalValue(withRatio: -0.138)) + + // MARK: - 􀆉 Left arm + Image(systemName: "chevron.left") + .resizable() + .foregroundStyle(.yellow) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.3)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.2), + y: model.calculatingProportionalValue(withRatio: -0.08)) + + // MARK: - 􀆊 Right artm + Image(systemName: "chevron.right") + .resizable() + .foregroundStyle(.yellow) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.3)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.2), + y: model.calculatingProportionalValue(withRatio: -0.08)) + } + .transition(.symbolEffect(.appear)) + + Group { + // MARK: - 􀀁 Pant center hole cover + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.palePink) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.06)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.01), + y: model.calculatingProportionalValue(withRatio: 0.04)) + + // MARK: - 􁁌 Patterns on pants + Image(systemName: "fan.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.04)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.01), + y: model.calculatingProportionalValue(withRatio: 0.04)) + + Image(systemName: "fan.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.04)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.08), + y: model.calculatingProportionalValue(withRatio: 0.02)) + + Image(systemName: "fan.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.04)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.08), + y: model.calculatingProportionalValue(withRatio: 0.02)) + + Image(systemName: "fan.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.04)) + .offset(y: model.calculatingProportionalValue(withRatio: 0.099)) + + // MARK: - 􀲟 Concealing part for pants + Image(systemName: "oval.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.11), + height: model.calculatingProportionalValue(withRatio: 0.03)) + .rotationEffect(.degrees(45)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.07), + y: model.calculatingProportionalValue(withRatio: 0.09)) + + Image(systemName: "oval.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.11), + height: model.calculatingProportionalValue(withRatio: 0.03)) + .rotationEffect(.degrees(-47)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.06), + y: model.calculatingProportionalValue(withRatio: 0.089)) + + // MARK: - 􁎘 Abdomen + Image(systemName: "visionpro.fill") + .resizable() + .foregroundStyle(.yellow) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.25), + height: model.calculatingProportionalValue(withRatio: 0.15)) + .rotationEffect(.degrees(180)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.045)) + + // MARK: - 􀥤 Belly button + Image(systemName: "poweron") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.02), + height: model.calculatingProportionalValue(withRatio: 0.002)) + .rotationEffect(.degrees(180)) + + // MARK: - 􀕩 Niple + Image(systemName: "smallcircle.filled.circle.fill") + .resizable() + .foregroundStyle(.brown) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.02), + height: model.calculatingProportionalValue(withRatio: 0.01)) + .rotationEffect(.degrees(15)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.09), + y: model.calculatingProportionalValue(withRatio: -0.138)) + + Image(systemName: "smallcircle.filled.circle.fill") + .resizable() + .foregroundStyle(.brown) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.02), + height: model.calculatingProportionalValue(withRatio: 0.01)) + .rotationEffect(.degrees(-15)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.09), + y: model.calculatingProportionalValue(withRatio: -0.14)) + } + .zIndex(0.2) + .transition(.symbolEffect(.appear)) + } + + // MARK: - 􀑪 Music + ArtComponentView( + name: "music.note", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.first)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.first)) + ), + finalValue: .init( + width: model.calculatingProportionalValue(withRatio: 0.1), + height: model.calculatingProportionalValue(withRatio: 0.15), + offsetX: model.calculatingProportionalValue(withRatio: 0.35), + offsetY: model.calculatingProportionalValue(withRatio: -0.5) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: 0.001 + ) + .symbolEffect(.bounce, value: musicCount) + + // MARK: - 􀫀 Music 3 + ArtComponentView( + name: "music.quarternote.3", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.second)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.second)) + ), + finalValue: .init( + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.15), + offsetX: model.calculatingProportionalValue(withRatio: -0.34), + offsetY: model.calculatingProportionalValue(withRatio: -0.38) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 1) + ) + .symbolEffect(.bounce, value: musicCount) + + // MARK: - 􀀁 Face background + ArtComponentView( + name: "circle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.third)) + ), + finalValue: .init( + primaryColor: Color(uiColor: .systemBackground), + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.2), + offsetY: model.calculatingProportionalValue(withRatio: -0.4) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 2) + ) + + // MARK: - 􀧷 Contour + ArtComponentView( + name: "capsule.portrait.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.forth)) + ), + finalValue: .init( + primaryColor: .yellow, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.16), + height: model.calculatingProportionalValue(withRatio: 0.22), + offsetY: model.calculatingProportionalValue(withRatio: -0.4) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 2) + ) + + // MARK: - 􀧷 Contour bottom + ArtComponentView( + name: "capsule.portrait.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.forth)) + ), + finalValue: .init( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.1), + height: model.calculatingProportionalValue(withRatio: 0.16), + offsetY: model.calculatingProportionalValue(withRatio: -0.35) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 3) + ) + + // MARK: - 􀨯 nose + ArtComponentView( + name: "nose", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.fifth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fifth)) + ), + finalValue: .init( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.045), + height: model.calculatingProportionalValue(withRatio: 0.06), + offsetY: model.calculatingProportionalValue(withRatio: -0.38) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 4) + ) + + // MARK: - 􀦭 Right eyebrow + ArtComponentView( + name: "eyebrow", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.sixth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.sixth)) + ), + finalValue: .init( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.04), + rotationDegrees: 10, + offsetX: model.calculatingProportionalValue(withRatio: 0.03), + offsetY: model.calculatingProportionalValue(withRatio: -0.41) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 5) + ) + + // MARK: - 􀦭 Left eyebrow + ArtComponentView( + name: "eyebrow", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.sixth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.sixth)) + ), + finalValue: .init( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.045), + height: model.calculatingProportionalValue(withRatio: 0.04), + rotationDegrees: 180, + rotationAxis: (x: 0, y: 1, z: 0), + offsetX: model.calculatingProportionalValue(withRatio: -0.03), + offsetY: model.calculatingProportionalValue(withRatio: -0.408) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 5) + ) + + // MARK: - 􀋭 Right eye + ArtComponentView( + name: "eye", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.seventh)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.seventh)) + ), + finalValue: .init( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.02), + offsetX: model.calculatingProportionalValue(withRatio: 0.03), + offsetY: model.calculatingProportionalValue(withRatio: -0.4) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 6) + ) + + // MARK: - 􀋭 Left eye + ArtComponentView( + name: "eye", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.seventh)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.seventh)) + ), + finalValue: .init( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.02), + offsetX: model.calculatingProportionalValue(withRatio: -0.03), + offsetY: model.calculatingProportionalValue(withRatio: -0.4) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 6) + ) + + // MARK: - 􀋮 Right eye.fill + ArtComponentView( + name: "eye.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.seventh)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.seventh)) + ), + finalValue: .init( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.02), + offsetX: model.calculatingProportionalValue(withRatio: 0.03), + offsetY: model.calculatingProportionalValue(withRatio: -0.4) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 6) + ) + + // MARK: - 􀋮 Left eye.fill + ArtComponentView( + name: "eye.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.seventh)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.seventh)) + ), + finalValue: .init( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.02), + offsetX: model.calculatingProportionalValue(withRatio: -0.03), + offsetY: model.calculatingProportionalValue(withRatio: -0.4) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 6) + ) + + // MARK: - 􀦪 Mouth + ArtComponentView( + name: "mouth.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.02), + offsetY: model.calculatingProportionalValue(withRatio: -0.32) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 7) + ) + + ArtComponentView( + name: "mouth.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.02), + offsetY: model.calculatingProportionalValue(withRatio: -0.33) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 7) + ) + + // MARK: - 􁒀 Teeth + ArtComponentView( + name: "window.casement.closed", + initialValue: .init( + secondaryColor: .clear, + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.forth)) + ), + finalValue: .init( + primaryColor: .black, + secondaryColor: .white, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.015), + height: model.calculatingProportionalValue(withRatio: 0.029), + rotationDegrees: 90, + offsetX: model.calculatingProportionalValue(withRatio: 0.013), + offsetY: model.calculatingProportionalValue(withRatio: -0.328) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 8) + ) + + ArtComponentView( + name: "window.casement.closed", + initialValue: .init( + secondaryColor: .clear, + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.forth)) + ), + finalValue: .init( + primaryColor: .black, + secondaryColor: .white, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.015), + height: model.calculatingProportionalValue(withRatio: 0.029), + rotationDegrees: 90, + offsetX: model.calculatingProportionalValue(withRatio: -0.014), + offsetY: model.calculatingProportionalValue(withRatio: -0.328) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 8) + ) + + // MARK: - 􀲟 Hair + ArtComponentView( + name: "oval.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fifth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fifth)) + ), + finalValue: .init( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.14), + height: model.calculatingProportionalValue(withRatio: 0.057), + offsetX: model.calculatingProportionalValue(withRatio: -0.001), + offsetY: model.calculatingProportionalValue(withRatio: -0.49) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 9) + ) + + // MARK: - 􀠒 Hair + ArtComponentView( + name: "drop.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.sixth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.sixth)) + ), + finalValue: .init( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.05), + height: model.calculatingProportionalValue(withRatio: 0.06), + rotationDegrees: -65, + offsetX: model.calculatingProportionalValue(withRatio: 0.04), + offsetY: model.calculatingProportionalValue(withRatio: -0.48) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 9) + ) + + ArtComponentView( + name: "drop.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.sixth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.sixth)) + ), + finalValue: .init( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.05), + height: model.calculatingProportionalValue(withRatio: 0.1), + rotationDegrees: 95, + offsetX: model.calculatingProportionalValue(withRatio: -0.03), + offsetY: model.calculatingProportionalValue(withRatio: -0.47) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 9) + ) + } + .navigationTitle("I'm wearing pants") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + .onChange(of: isAnimating) { _, newValue in + if newValue { + Timer.scheduledTimer( + withTimeInterval: model.waitingTime(forCount: 11), + repeats: false + ) { _ in + isChangingPose = true + } + } + } + .onChange(of: isChangingPose) { _, newValue in + if newValue { + poseTimer = Timer.scheduledTimer( + withTimeInterval: model.waitingTime(forCount: 1), + repeats: true + ) { _ in + currentPose = currentPose.next + + if currentPose == .finish { + poseTimer?.invalidate() + musicTimer?.invalidate() + } + } + + musicTimer = Timer.scheduledTimer( + withTimeInterval: 0.4, + repeats: true + ) { _ in + musicCount += 1 + } + } + } + } +} + +#Preview { + NavigationStack { + ImWearingPantsArtView() + .environment(ArtWorkModel.preview) + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift new file mode 100644 index 0000000..8e01efa --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift @@ -0,0 +1,422 @@ +// +// IamWearingPantsPreviewView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct ImWearingPantsPreviewView: View { + + @Environment(ArtWorkModel.self) var model + + var body: some View { + + ZStack { + + // MARK: - 􀑪 Music + Image(systemName: "music.note") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.35, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.5, forPreview: true)) + + // MARK: - 􀫀 Music 3 + Image(systemName: "music.quarternote.3") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.34, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.38, forPreview: true)) + + // MARK: - 􁗅 Pose + Image(systemName: "figure.arms.open") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.6, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 1, forPreview: true)) + + // MARK: - 􀆹 Chest shadow + Image(systemName: "moon") + .resizable() + .foregroundStyle(.black.opacity(0.6)) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true)) + .rotationEffect(.degrees(-10)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true)) + + Image(systemName: "moon") + .resizable() + .foregroundStyle(.black.opacity(0.6)) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true)) + .rotation3DEffect( + .degrees(160), + axis: (x: 0, y: 1, z: 0) + ) + .offset(x: model.calculatingProportionalValue(withRatio: 0.085, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true)) + + // MARK: - 􀏄 Parts for shaping + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(Color(uiColor: .systemBackground)) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.25, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true)) + + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(Color(uiColor: .systemBackground)) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true)) + + // MARK: - 􀊡 Neck + Image(systemName: "speaker.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.38, forPreview: true)) + .rotationEffect(.degrees(90)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.005, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.27, forPreview: true)) + + // MARK: - 􀂓 Parts for shaping + Image(systemName: "square.fill") + .resizable() + .foregroundStyle(Color(uiColor: .systemBackground)) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.385, forPreview: true)) + + Image(systemName: "square.fill") + .resizable() + .foregroundStyle(Color(uiColor: .systemBackground)) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.14, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.385, forPreview: true)) + + // MARK: - 􀆺 Chest + Image(systemName: "moon.fill") + .resizable() + .foregroundStyle(.yellow) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .rotationEffect(.degrees(-10)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true)) + + Image(systemName: "moon.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .rotation3DEffect( + .degrees(160), + axis: (x: 0, y: 1, z: 0) + ) + .offset(x: model.calculatingProportionalValue(withRatio: 0.085, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true)) + + // MARK: - 􀆉 Left arm + Image(systemName: "chevron.left") + .resizable() + .foregroundStyle(.yellow) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true)) + + // MARK: - 􀆊 Right artm + Image(systemName: "chevron.right") + .resizable() + .foregroundStyle(.yellow) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true)) + + // MARK: - 􁉨 Pants + Image(systemName: "parkingsign.steeringwheel") + .resizable() + .foregroundStyle(.palePink) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.35, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) + + // MARK: - 􀀁 Pant center hole cover + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.palePink) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + + // MARK: - 􁁌 Patterns on pants + Image(systemName: "fan.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + + Image(systemName: "fan.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + + Image(systemName: "fan.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + + Image(systemName: "fan.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: 0.099, forPreview: true)) + + // MARK: - 􀲟 Concealing part for pants + Image(systemName: "oval.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) + .rotationEffect(.degrees(45)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true)) + + Image(systemName: "oval.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) + .rotationEffect(.degrees(-47)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.089, forPreview: true)) + + // MARK: - 􁎘 Abdomen + Image(systemName: "visionpro.fill") + .resizable() + .foregroundStyle(.yellow) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) + .rotationEffect(.degrees(180)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.045, forPreview: true)) + + // MARK: - 􀥤 Belly button + Image(systemName: "poweron") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.002, forPreview: true)) + .rotationEffect(.degrees(180)) + + // MARK: - 􀕩 Niple + Image(systemName: "smallcircle.filled.circle.fill") + .resizable() + .foregroundStyle(.brown) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true)) + .rotationEffect(.degrees(15)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true)) + + Image(systemName: "smallcircle.filled.circle.fill") + .resizable() + .foregroundStyle(.brown) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true)) + .rotationEffect(.degrees(-15)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.14, forPreview: true)) + + // MARK: - 􀧷 Contour + Image(systemName: "capsule.portrait.fill") + .resizable() + .foregroundStyle(.yellow) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.22, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) + + Image(systemName: "capsule.portrait.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.35, forPreview: true)) + + // MARK: - 􀨯 Nose + Image(systemName: "nose") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.045, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.38, forPreview: true)) + + // MARK: - 􀦭 Eyebrow + Image(systemName: "eyebrow") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .rotationEffect(.degrees(10)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.41, forPreview: true)) + + Image(systemName: "eyebrow") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.045, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .rotation3DEffect(.degrees(180), + axis: (x: 0, y: 1, z: 0)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.408, forPreview: true)) + + // MARK: - 􀋭 Eye frame + Image(systemName: "eye") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) + + Image(systemName: "eye") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) + + // MARK: - 􀋮 Eye + Image(systemName: "eye.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) + + Image(systemName: "eye.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) + + // MARK: - 􀦪 Mouth + Image(systemName: "mouth.fill") + .resizable() + .foregroundStyle(.red) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true)) + + Image(systemName: "mouth.fill") + .resizable() + .foregroundStyle(.red) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.33, forPreview: true)) + + // MARK: - 􁒀 Teeth + Image(systemName: "window.casement.closed") + .resizable() + .foregroundStyle(.black, .white) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.029, forPreview: true)) + .rotationEffect(.degrees(90)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.013, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.328, forPreview: true)) + + Image(systemName: "window.casement.closed") + .resizable() + .foregroundStyle(.black, .white) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.029, forPreview: true)) + .rotationEffect(.degrees(90)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.014, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.328, forPreview: true)) + + // MARK: - 􀲟 Hair + Image(systemName: "oval.fill") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.057, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.001, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.49, forPreview: true)) + + // MARK: - 􀠒 Off-center part hair style + Image(systemName: "drop.fill") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + .rotationEffect(.degrees(-65)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.48, forPreview: true)) + + Image(systemName: "drop.fill") + .resizable() + .foregroundStyle(.black) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true)) + .rotationEffect(.degrees(95)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.47, forPreview: true)) + } + } +} + +#Preview { + ImWearingPantsPreviewView() + .environment(ArtWorkModel.preview) +} From a4850b6c9d8b95079dfc2e7f25e9f9c0eef74450 Mon Sep 17 00:00:00 2001 From: littleossa Date: Wed, 7 Feb 2024 09:05:31 +0900 Subject: [PATCH 036/108] Rename fourth --- .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 2 +- .../ArtWorks/IamWearingPants/IamWearingPantsArtView.swift | 8 ++++---- .../ArtWorks/Nosebleed/NosebleedArtView.swift | 2 +- .../ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift index 2e4934b..f08c3c2 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -79,7 +79,7 @@ struct AfroBoyArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.forth)) + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) ), finalValue: .init( primaryColor: .red, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift index cbc5e34..31bdd68 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift @@ -406,7 +406,7 @@ struct ImWearingPantsArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.forth)) + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fourth)) ), finalValue: .init( primaryColor: .yellow, @@ -426,7 +426,7 @@ struct ImWearingPantsArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.forth)) + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fourth)) ), finalValue: .init( primaryColor: .yellow, @@ -634,7 +634,7 @@ struct ImWearingPantsArtView: View { secondaryColor: .clear, width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.forth)) + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) ), finalValue: .init( primaryColor: .black, @@ -657,7 +657,7 @@ struct ImWearingPantsArtView: View { secondaryColor: .clear, width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.forth)) + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) ), finalValue: .init( primaryColor: .black, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift index b0bf0a8..0a0dc9d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -89,7 +89,7 @@ struct NosebleedArtView: View { initialValue: .init( width: model.initialSymbolLength, height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.forth)) + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) ), finalValue: .init( fontWeight: .ultraLight, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift index 2456bad..020da5e 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift @@ -19,7 +19,7 @@ extension ArtWorkModel { case first case second case third - case forth + case fourth case fifth case sixth case seventh @@ -32,7 +32,7 @@ extension ArtWorkModel { -0.28 case .third: -0.14 - case .forth: + case .fourth: 0 case .fifth: 0.14 From 20aab50a84e1a6703afd7a27f51bfac8b0a921cf Mon Sep 17 00:00:00 2001 From: littleossa Date: Wed, 7 Feb 2024 09:15:58 +0900 Subject: [PATCH 037/108] Update IamWearingPants --- .../IamWearingPantsArtView.swift | 43 +++++++++++++++++++ .../IamWearingPantsPreviewView.swift | 19 ++++++++ 2 files changed, 62 insertions(+) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift index 31bdd68..28e0491 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift @@ -504,6 +504,49 @@ struct ImWearingPantsArtView: View { waitingTime: model.waitingTime(forCount: 5) ) + // MARK: - 􀧷 Concealing part for eyebrow + ArtComponentView( + name: "capsule.portrait.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.fourth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fourth)) + ), + finalValue: .init( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.05), + height: model.calculatingProportionalValue(withRatio: 0.02), + rotationDegrees: -10, + offsetX: model.calculatingProportionalValue(withRatio: -0.035), + offsetY: model.calculatingProportionalValue(withRatio: -0.396) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 5) + ) + + ArtComponentView( + name: "capsule.portrait.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.fourth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fourth)) + ), + finalValue: .init( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.05), + height: model.calculatingProportionalValue(withRatio: 0.02), + rotationDegrees: 10, + offsetX: model.calculatingProportionalValue(withRatio: 0.035), + offsetY: model.calculatingProportionalValue(withRatio: -0.396) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 5) + ) + // MARK: - 􀋭 Right eye ArtComponentView( name: "eye", diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift index 8e01efa..308c724 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift @@ -310,6 +310,25 @@ struct ImWearingPantsPreviewView: View { .offset(x: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), y: model.calculatingProportionalValue(withRatio: -0.408, forPreview: true)) + // MARK: - 􀧷 Concealing part for eyebrow + Image(systemName: "capsule.portrait.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .rotationEffect(.degrees(-10)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.035, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.396, forPreview: true)) + + Image(systemName: "capsule.portrait.fill") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .rotationEffect(.degrees(10)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.035, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.396, forPreview: true)) + // MARK: - 􀋭 Eye frame Image(systemName: "eye") .resizable() From 779cb010a31536602d51aa2067467344ce1762fa Mon Sep 17 00:00:00 2001 From: littleossa Date: Wed, 7 Feb 2024 09:20:50 +0900 Subject: [PATCH 038/108] Update I'm wearing pants art --- .../project.pbxproj | 22 +++++++++---------- .../ArtGalleryView.swift | 5 +++-- .../ImWearingPantsArtView.swift} | 2 +- .../ImWearingPantsPreviewView.swift} | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/{IamWearingPants/IamWearingPantsArtView.swift => ImWearingPants/ImWearingPantsArtView.swift} (99%) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/{IamWearingPants/IamWearingPantsPreviewView.swift => ImWearingPants/ImWearingPantsPreviewView.swift} (99%) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 1e5cce0..aa7e455 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -77,8 +77,8 @@ 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */; }; 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */; }; 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */; }; - 97EF43932B72D3E2003648F5 /* IamWearingPantsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43922B72D3E2003648F5 /* IamWearingPantsPreviewView.swift */; }; - 97EF43952B72DA69003648F5 /* IamWearingPantsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43942B72DA69003648F5 /* IamWearingPantsArtView.swift */; }; + 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43922B72D3E2003648F5 /* ImWearingPantsPreviewView.swift */; }; + 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -153,8 +153,8 @@ 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedArtView.swift; sourceTree = ""; }; 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArtWorkModel+InitialSymbolRow.swift"; sourceTree = ""; }; 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedPreviewView.swift; sourceTree = ""; }; - 97EF43922B72D3E2003648F5 /* IamWearingPantsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IamWearingPantsPreviewView.swift; sourceTree = ""; }; - 97EF43942B72DA69003648F5 /* IamWearingPantsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IamWearingPantsArtView.swift; sourceTree = ""; }; + 97EF43922B72D3E2003648F5 /* ImWearingPantsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImWearingPantsPreviewView.swift; sourceTree = ""; }; + 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImWearingPantsArtView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -399,7 +399,7 @@ children = ( 97AD531E2B70E2770034FB5D /* AfroBoy */, 97EF43892B725DE7003648F5 /* Nosebleed */, - 97EF43912B72D3AF003648F5 /* IamWearingPants */, + 97EF43912B72D3AF003648F5 /* ImWearingPants */, ); path = ArtWorks; sourceTree = ""; @@ -511,13 +511,13 @@ path = ArtWorkModel; sourceTree = ""; }; - 97EF43912B72D3AF003648F5 /* IamWearingPants */ = { + 97EF43912B72D3AF003648F5 /* ImWearingPants */ = { isa = PBXGroup; children = ( - 97EF43942B72DA69003648F5 /* IamWearingPantsArtView.swift */, - 97EF43922B72D3E2003648F5 /* IamWearingPantsPreviewView.swift */, + 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */, + 97EF43922B72D3E2003648F5 /* ImWearingPantsPreviewView.swift */, ); - path = IamWearingPants; + path = ImWearingPants; sourceTree = ""; }; /* End PBXGroup section */ @@ -596,7 +596,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 97EF43932B72D3E2003648F5 /* IamWearingPantsPreviewView.swift in Sources */, + 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, 9748BE232893B35A006DF0BE /* WorldPeace.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, @@ -642,7 +642,7 @@ 9748BE412897CD6C006DF0BE /* Arm.swift in Sources */, 9748BE4328980C4D006DF0BE /* Hair.swift in Sources */, 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, - 97EF43952B72DA69003648F5 /* IamWearingPantsArtView.swift in Sources */, + 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */, 9748BE1828933E40006DF0BE /* MagicianHat.swift in Sources */, 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 2d8fd0b..6f5291d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -42,9 +42,10 @@ struct ArtGalleryView: View { } NavigationLink { - AfroBoyArtView() + ImWearingPantsArtView() } label: { - AfroBoyPreviewView() + ImWearingPantsPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) } NavigationLink { diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift similarity index 99% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index 28e0491..74298d9 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -1,5 +1,5 @@ // -// IamWearingPantsArtView.swift +// ImWearingPantsArtView.swift // SFSymbolsArtCollection // // Created by Lil Ossa diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift similarity index 99% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift index 308c724..03b3c9f 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/IamWearingPants/IamWearingPantsPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift @@ -1,5 +1,5 @@ // -// IamWearingPantsPreviewView.swift +// ImWearingPantsPreviewView.swift // SFSymbolsArtCollection // // Created by Lil Ossa From 7b9118f2261173a3d076db41e3186ec8a0f795be Mon Sep 17 00:00:00 2001 From: littleossa Date: Wed, 7 Feb 2024 09:26:33 +0900 Subject: [PATCH 039/108] Add title on ArtGalleryView --- .../ArtGalleryView.swift | 89 +++++++++++-------- 1 file changed, 51 insertions(+), 38 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 6f5291d..dc48755 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -22,49 +22,62 @@ struct ArtGalleryView: View { private let columns: [GridItem] var body: some View { - NavigationStack { - ScrollView { - LazyVGrid(columns: columns) { - - Group { - NavigationLink { - AfroBoyArtView() - } label: { - AfroBoyPreviewView() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - NosebleedArtView() - } label: { - NosebleedArtPreviewView() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - ImWearingPantsArtView() - } label: { - ImWearingPantsPreviewView() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - AfroBoyArtView() - } label: { - AfroBoyPreviewView() - } + + VStack { + + Spacer() + .frame(height: 60) + + Text("SF Symbols Art") + .font(.largeTitle) + .bold() + + Text("is just the art created by combining SF Symbols") + + NavigationStack { + ScrollView { + LazyVGrid(columns: columns) { - NavigationLink { - AfroBoyArtView() - } label: { - AfroBoyPreviewView() - .galleryGridItemView(length: model.galleryColumnLength) + Group { + NavigationLink { + AfroBoyArtView() + } label: { + AfroBoyPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) + } + + NavigationLink { + NosebleedArtView() + } label: { + NosebleedArtPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) + } + + NavigationLink { + ImWearingPantsArtView() + } label: { + ImWearingPantsPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) + } + + NavigationLink { + AfroBoyArtView() + } label: { + AfroBoyPreviewView() + } + + NavigationLink { + AfroBoyArtView() + } label: { + AfroBoyPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) + } } } + .padding(.horizontal, 24) } - .padding(.horizontal, 24) + .navigationTitle("Art Gallery") } - .navigationTitle("Art Gallery") } .environment(model) } From b52b2f8e4949c0b325b54f498b07eaa55d40bf5b Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 06:33:03 +0900 Subject: [PATCH 040/108] Create MagicianArt --- .../project.pbxproj | 16 + .../ArtWorks/Magician/MagicianArtView.swift | 328 ++++++++++++++++++ .../Magician/MagicianPreviewView.swift | 174 ++++++++++ 3 files changed, 518 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index aa7e455..4def53d 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -79,6 +79,8 @@ 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */; }; 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43922B72D3E2003648F5 /* ImWearingPantsPreviewView.swift */; }; 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */; }; + 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43972B733337003648F5 /* MagicianArtView.swift */; }; + 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -155,6 +157,8 @@ 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedPreviewView.swift; sourceTree = ""; }; 97EF43922B72D3E2003648F5 /* ImWearingPantsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImWearingPantsPreviewView.swift; sourceTree = ""; }; 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImWearingPantsArtView.swift; sourceTree = ""; }; + 97EF43972B733337003648F5 /* MagicianArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianArtView.swift; sourceTree = ""; }; + 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianPreviewView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -397,6 +401,7 @@ 97AD531B2B70E0A10034FB5D /* ArtWorks */ = { isa = PBXGroup; children = ( + 97EF43962B7332FB003648F5 /* Magician */, 97AD531E2B70E2770034FB5D /* AfroBoy */, 97EF43892B725DE7003648F5 /* Nosebleed */, 97EF43912B72D3AF003648F5 /* ImWearingPants */, @@ -520,6 +525,15 @@ path = ImWearingPants; sourceTree = ""; }; + 97EF43962B7332FB003648F5 /* Magician */ = { + isa = PBXGroup; + children = ( + 97EF43972B733337003648F5 /* MagicianArtView.swift */, + 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */, + ); + path = Magician; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -611,6 +625,7 @@ 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, 97E11E33281971E200B2AB32 /* CrayonHair.swift in Sources */, 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */, + 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */, 9748BE3A2893D0E3006DF0BE /* Frog.swift in Sources */, 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */, 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */, @@ -648,6 +663,7 @@ 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */, 9748BE2C2893C428006DF0BE /* Bear.swift in Sources */, 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */, + 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */, 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */, 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */, 97E11E3B281971ED00B2AB32 /* CrayonEyes.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift new file mode 100644 index 0000000..cb5f098 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift @@ -0,0 +1,328 @@ +// +// MagicianArtView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct MagicianArtView: View { + + @Environment(ArtWorkModel.self) var model + @State private var isAnimating = false + + var body: some View { + ZStack { + + // MARK: - 􀠒 Outline + ArtComponentView( + name: "drop.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.first)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.first)) + ), + finalValue: .init( + primaryColor: .paleOrange, + width: model.calculatingProportionalValue(withRatio: 0.5), + height: model.calculatingProportionalValue(withRatio: 0.75), + rotationDegrees: 180, + offsetY: model.calculatingProportionalValue(withRatio: 0.15) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: 0.001 + ) + + // MARK: - 􀏄 Hat band + ArtComponentView( + name: "rectangle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.second)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.second)) + ), + finalValue: .init( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.446), + height: model.calculatingProportionalValue(withRatio: 0.1), + offsetX: model.calculatingProportionalValue(withRatio: 0.01), + offsetY: model.calculatingProportionalValue(withRatio: -0.15) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 1) + ) + + // MARK: - 􀈮 Hat + ArtComponentView( + name: "archivebox.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) + ), + finalValue: .init( + width: model.calculatingProportionalValue(withRatio: 0.525), + height: model.calculatingProportionalValue(withRatio: 0.525), + rotationDegrees: 180, + offsetY: model.calculatingProportionalValue(withRatio: -0.25) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 2) + ) + + // MARK: - 􀏄 Hat brim + ArtComponentView( + name: "rectangle.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .second(.second)), + offsetY: model.calculatingInitialOffsetY(forPosition: .second(.second)) + ), + finalValue: .init( + width: model.calculatingProportionalValue(withRatio: 0.625), + height: model.calculatingProportionalValue(withRatio: 0.125), + offsetY: model.calculatingProportionalValue(withRatio: -0.05) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 3) + ) + + // MARK: - 􀆐 Eyebrow + ArtComponentView( + name: "chevron.compact.up", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) + ), + finalValue: .init( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.1), + height: model.calculatingProportionalValue(withRatio: 0.04), + offsetX: model.calculatingProportionalValue(withRatio: 0.1), + offsetY: model.calculatingProportionalValue(withRatio: 0.03) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 4) + ) + + ArtComponentView( + name: "chevron.compact.up", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) + ), + finalValue: .init( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.1), + height: model.calculatingProportionalValue(withRatio: 0.04), + offsetX: model.calculatingProportionalValue(withRatio: -0.1), + offsetY: model.calculatingProportionalValue(withRatio: 0.03) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 4) + ) + + // MARK: - 􀅽 Sunglasses frame + ArtComponentView( + name: "minus", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.0125), + offsetY: model.calculatingProportionalValue(withRatio: 0.12) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 5) + ) + + ArtComponentView( + name: "minus", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.0125), + offsetX: model.calculatingProportionalValue(withRatio: 0.2), + offsetY: model.calculatingProportionalValue(withRatio: 0.12) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 5) + ) + + ArtComponentView( + name: "minus", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) + ), + finalValue: .init( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.0125), + offsetX: model.calculatingProportionalValue(withRatio: -0.2), + offsetY: model.calculatingProportionalValue(withRatio: 0.12) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 5) + ) + + // MARK: - 􀆼 Sunglasses lens + ArtComponentView( + name: "moon.circle.fill", + initialValue: .init( + primaryColor: .white, + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fourth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) + ), + finalValue: .init( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.125), + height: model.calculatingProportionalValue(withRatio: 0.125), + offsetX: model.calculatingProportionalValue(withRatio: 0.1), + offsetY: model.calculatingProportionalValue(withRatio: 0.12) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 6) + ) + + ArtComponentView( + name: "moon.circle.fill", + initialValue: .init( + primaryColor: .white, + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fourth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) + ), + finalValue: .init( + primaryColor: .white, + secondaryColor: .black, + width: model.calculatingProportionalValue(withRatio: 0.125), + height: model.calculatingProportionalValue(withRatio: 0.125), + offsetX: model.calculatingProportionalValue(withRatio: -0.1), + offsetY: model.calculatingProportionalValue(withRatio: 0.12) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 6) + ) + + // MARK: - 􀇈 Nose + ArtComponentView( + name: "cloud.heavyrain", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fifth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fifth)) + ), + finalValue: .init( + fontWeight: .light, + width: model.calculatingProportionalValue(withRatio: 0.15), + height: model.calculatingProportionalValue(withRatio: 0.15), + offsetX: model.calculatingProportionalValue(withRatio: 0.01), + offsetY: model.calculatingProportionalValue(withRatio: 0.27) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 7) + ) + + // MARK: - 􀩻 Inside mouth + ArtComponentView( + name: "button.roundedbottom.horizontal.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.sixth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.sixth)) + ), + finalValue: .init( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.15), + height: model.calculatingProportionalValue(withRatio: 0.075), + offsetX: model.calculatingProportionalValue(withRatio: 0.01), + offsetY: model.calculatingProportionalValue(withRatio: 0.4) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 8) + ) + + // MARK: - 􀝷 Tongue capsule.fill + ArtComponentView( + name: "capsule.fill", + initialValue: .init( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.seventh)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.seventh)) + ), + finalValue: .init( + primaryColor: .orange, + width: model.calculatingProportionalValue(withRatio: 0.145), + height: model.calculatingProportionalValue(withRatio: 0.025), + offsetX: model.calculatingProportionalValue(withRatio: 0.01), + offsetY: model.calculatingProportionalValue(withRatio: 0.424) + ), + isAnimating: isAnimating, + animationDuration: model.animationDurationPerSymbol, + waitingTime: model.waitingTime(forCount: 9) + ) + } + .navigationTitle("Magician") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + } +} + +#Preview { + NavigationStack { + MagicianArtView() + .environment(ArtWorkModel.preview) + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift new file mode 100644 index 0000000..8ed1f90 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift @@ -0,0 +1,174 @@ +// +// MagicianPreviewView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct MagicianPreviewView: View { + + @Environment(ArtWorkModel.self) var model + + var body: some View { + ZStack { + + // MARK: - 􀠒 Outline + Image(systemName: "drop.fill") + .resizable() + .foregroundStyle(.paleOrange) + .frame(width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.75, forPreview: true)) + .rotationEffect(.degrees(180)) + .offset(y: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) + + // MARK: - 􀏄 Hat band + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.red) + .frame(width: model.calculatingProportionalValue(withRatio: 0.446, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + y: model.calculatingProportionalValue(withRatio: -0.15, forPreview: true)) + + // MARK: - 􀈮 Hat + Image(systemName: "archivebox.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.525, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.525, forPreview: true)) + .rotationEffect(.degrees(180)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.25, forPreview: true)) + + // MARK: - 􀏄 Hat brim + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.625, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.05, forPreview: true)) + + // MARK: - 􀆐 Eyebrow + Image(systemName: "chevron.compact.up") + .resizable() + .foregroundStyle(.black) + .fontWeight(.thin) + .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) + + Image(systemName: "chevron.compact.up") + .resizable() + .foregroundStyle(.black) + .fontWeight(.thin) + .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) + + // MARK: - 􀅽 Sunglasses frame + Image(systemName: "minus") + .resizable() + .foregroundStyle(.black) + .fontWeight(.thin) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true)) + .offset(y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + + Image(systemName: "minus") + .resizable() + .foregroundStyle(.black) + .fontWeight(.thin) + .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + + Image(systemName: "minus") + .resizable() + .foregroundStyle(.black) + .fontWeight(.thin) + .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + + // MARK: - 􀀁 Sunglasses inside lens + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.white) + .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + + // MARK: - 􀆼 Sunglasses outside lens + Image(systemName: "moon.circle.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + + Image(systemName: "moon.circle.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + + Image(systemName: "moon.circle.fill") + .resizable() + .foregroundStyle(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + + // MARK: - 􀇈 Nose + Image(systemName: "cloud.heavyrain") + .resizable() + .foregroundStyle(.black) + .fontWeight(.light) + .frame(width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true)) + + // MARK: - 􀩻 Inside mouth + Image(systemName: "button.roundedbottom.horizontal.fill") + .resizable() + .foregroundStyle(.red) + .frame(width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.075, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true)) + + // MARK: - 􀝷 Tongue capsule.fill + Image(systemName: "capsule.fill") + .resizable() + .foregroundStyle(.orange) + .frame(width: model.calculatingProportionalValue(withRatio: 0.145, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.025, forPreview: true)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + y: model.calculatingProportionalValue(withRatio: 0.424, forPreview: true)) + } + } +} + +#Preview { + MagicianPreviewView() + .environment(ArtWorkModel.preview) +} From 1912fbe0e81e2b0720688f78e47f5a9879cfc365 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 06:33:51 +0900 Subject: [PATCH 041/108] Update ArtGalleryView --- .../ArtGalleryView.swift | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index dc48755..cf2b81c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -25,20 +25,28 @@ struct ArtGalleryView: View { VStack { - Spacer() - .frame(height: 60) - - Text("SF Symbols Art") - .font(.largeTitle) - .bold() - - Text("is just the art created by combining SF Symbols") - + // Navigation pathの状態によって、この部分の表示非表示を切り替えれるか? +// Spacer() +// .frame(height: 60) +// +// Text("SF Symbols Art") +// .font(.largeTitle) +// .bold() +// +// Text("is just the art created by combining SF Symbols") +// NavigationStack { ScrollView { LazyVGrid(columns: columns) { Group { + NavigationLink { + MagicianArtView() + } label: { + MagicianPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) + } + NavigationLink { AfroBoyArtView() } label: { @@ -60,12 +68,6 @@ struct ArtGalleryView: View { .galleryGridItemView(length: model.galleryColumnLength) } - NavigationLink { - AfroBoyArtView() - } label: { - AfroBoyPreviewView() - } - NavigationLink { AfroBoyArtView() } label: { From bf0d7342d09b8aa0fc9ea088423eafba40f73f03 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 09:52:10 +0900 Subject: [PATCH 042/108] Add Color+Extension systemBackground color --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 4 ++++ .../ArtisticWorldOfSFSymbols/Extensions/Color+.swift | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Color+.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 4def53d..add7bb9 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -81,6 +81,7 @@ 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */; }; 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43972B733337003648F5 /* MagicianArtView.swift */; }; 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */; }; + 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439D2B744C4C003648F5 /* Color+.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -159,6 +160,7 @@ 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImWearingPantsArtView.swift; sourceTree = ""; }; 97EF43972B733337003648F5 /* MagicianArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianArtView.swift; sourceTree = ""; }; 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianPreviewView.swift; sourceTree = ""; }; + 97EF439D2B744C4C003648F5 /* Color+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+.swift"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -491,6 +493,7 @@ 97E11E412819727A00B2AB32 /* Extensions */ = { isa = PBXGroup; children = ( + 97EF439D2B744C4C003648F5 /* Color+.swift */, 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */, 97AD53112B70DEB60034FB5D /* UIDevice+.swift */, 97AD53192B70E0530034FB5D /* Font.Weight+.swift */, @@ -611,6 +614,7 @@ buildActionMask = 2147483647; files = ( 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */, + 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, 9748BE232893B35A006DF0BE /* WorldPeace.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Color+.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Color+.swift new file mode 100644 index 0000000..276e0b7 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Color+.swift @@ -0,0 +1,12 @@ +// +// Color+.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension Color { + static let systemBackground: Color = .init(uiColor: .systemBackground) +} From 1c27e9054c6478bb2f8258a17c5066054075d486 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 09:52:30 +0900 Subject: [PATCH 043/108] Refactor ArtComponentView --- .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 77 +-- .../ImWearingPantsArtView.swift | 513 ++++++------------ .../ArtWorks/Magician/MagicianArtView.swift | 305 ++++------- .../ArtWorks/Nosebleed/NosebleedArtView.swift | 317 ++++------- .../ArtComponentView/ArtComponentView.swift | 126 ++++- 5 files changed, 484 insertions(+), 854 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift index f08c3c2..0830ad0 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -18,79 +18,48 @@ struct AfroBoyArtView: View { // MARK: - 􁝰 Hair ArtComponentView( name: "tree.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) - ), - finalValue: .init( - width: model.calculatingProportionalValue(withRatio: 0.9), - height: model.calculatingProportionalValue(withRatio: 0.9) - ), + initialPosition: .third(.first), + widthRatio: 0.9, + heightRatio: 0.9, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: 0.001 + symbolCountToWaitFor: 0 ) // MARK: - 􀙧 Contour ArtComponentView( name: "shield.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) - ), - finalValue: .init( - primaryColor: .paleOrange, - width: model.calculatingProportionalValue(withRatio: 0.5), - height: model.calculatingProportionalValue(withRatio: 0.6), - offsetY: model.calculatingProportionalValue(withRatio: 0.17) - ), + initialPosition: .third(.second), + primaryColor: .paleOrange, + widthRatio: 0.5, + heightRatio: 0.6, + verticalOffsetRatio: 0.17, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 1) + symbolCountToWaitFor: 1 ) // MARK: - 􀎽 Face ArtComponentView( name: "faceid", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - secondaryColor: .paleOrange, - width: model.calculatingProportionalValue(withRatio: 0.3), - height: model.calculatingProportionalValue(withRatio: 0.3), - offsetY: model.calculatingProportionalValue(withRatio: 0.16) - ), + initialPosition: .third(.third), + secondaryColor: .paleOrange, + widthRatio: 0.3, + heightRatio: 0.3, + verticalOffsetRatio: 0.16, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 2) + symbolCountToWaitFor: 2 ) // MARK: - 􀦉 Comb ArtComponentView( name: "comb.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) - ), - finalValue: .init( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.2), - offsetX: model.calculatingProportionalValue(withRatio: -0.2), - offsetY: model.calculatingProportionalValue(withRatio: -0.2) - ), + initialPosition: .third(.fourth), + primaryColor: .red, + widthRatio: 0.2, + heightRatio: 0.2, + horizontalOffsetRatio: -0.2, + verticalOffsetRatio: -0.2, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 3) + symbolCountToWaitFor: 3 ) } .navigationTitle("Afro boy") diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index 74298d9..a67b230 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -66,20 +66,12 @@ struct ImWearingPantsArtView: View { // MARK: - Current pose ArtComponentView( name: currentPose.rawValue, - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) - ), - finalValue: .init( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.6), - height: model.calculatingProportionalValue(withRatio: 1) - ), + initialPosition: .third(.second), + primaryColor: .yellow, + widthRatio: 0.6, + heightRatio: 1, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 10) + symbolCountToWaitFor: 10 ) .contentTransition(isChangingPose ? .symbolEffect(.replace) : .identity) .offset(x: model.calculatingProportionalValue(withRatio: currentPose.offsetXRatio)) @@ -87,23 +79,15 @@ struct ImWearingPantsArtView: View { // MARK: - 􁉨 Pants ArtComponentView( name: "parkingsign.steeringwheel", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) - ), - finalValue: .init( - primaryColor: .palePink, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.35), - height: model.calculatingProportionalValue(withRatio: 0.2), - offsetX: model.calculatingProportionalValue(withRatio: -0.07), - offsetY: model.calculatingProportionalValue(withRatio: 0.03) - ), + initialPosition: .third(.first), + primaryColor: .palePink, + fontWeight: .ultraLight, + widthRatio: 0.35, + heightRatio: 0.2, + horizontalOffsetRatio: -0.07, + verticalOffsetRatio: 0.03, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 16) + symbolCountToWaitFor: 16 ) .zIndex(0.1) @@ -341,444 +325,277 @@ struct ImWearingPantsArtView: View { // MARK: - 􀑪 Music ArtComponentView( name: "music.note", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.first)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.first)) - ), - finalValue: .init( - width: model.calculatingProportionalValue(withRatio: 0.1), - height: model.calculatingProportionalValue(withRatio: 0.15), - offsetX: model.calculatingProportionalValue(withRatio: 0.35), - offsetY: model.calculatingProportionalValue(withRatio: -0.5) - ), + initialPosition: .second(.first), + widthRatio: 0.1, + heightRatio: 0.15, + horizontalOffsetRatio: 0.35, + verticalOffsetRatio: -0.5, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: 0.001 + symbolCountToWaitFor: 0 ) .symbolEffect(.bounce, value: musicCount) // MARK: - 􀫀 Music 3 ArtComponentView( name: "music.quarternote.3", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.second)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.second)) - ), - finalValue: .init( - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.15), - offsetX: model.calculatingProportionalValue(withRatio: -0.34), - offsetY: model.calculatingProportionalValue(withRatio: -0.38) - ), + initialPosition: .second(.second), + widthRatio: 0.2, + heightRatio: 0.15, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: -0.38, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 1) + symbolCountToWaitFor: 1 ) .symbolEffect(.bounce, value: musicCount) // MARK: - 􀀁 Face background ArtComponentView( name: "circle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.third)) - ), - finalValue: .init( - primaryColor: Color(uiColor: .systemBackground), - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.2), - offsetY: model.calculatingProportionalValue(withRatio: -0.4) - ), + initialPosition: .second(.third), + primaryColor: .systemBackground, + widthRatio: 0.2, + heightRatio: 0.2, + verticalOffsetRatio: -0.4, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 2) + symbolCountToWaitFor: 2 ) // MARK: - 􀧷 Contour ArtComponentView( name: "capsule.portrait.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fourth)) - ), - finalValue: .init( - primaryColor: .yellow, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.16), - height: model.calculatingProportionalValue(withRatio: 0.22), - offsetY: model.calculatingProportionalValue(withRatio: -0.4) - ), + initialPosition: .second(.fourth), + primaryColor: .yellow, + fontWeight: .ultraLight, + widthRatio: 0.16, + heightRatio: 0.22, + verticalOffsetRatio: -0.4, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 2) + symbolCountToWaitFor: 2 ) // MARK: - 􀧷 Contour bottom ArtComponentView( name: "capsule.portrait.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fourth)) - ), - finalValue: .init( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.1), - height: model.calculatingProportionalValue(withRatio: 0.16), - offsetY: model.calculatingProportionalValue(withRatio: -0.35) - ), + initialPosition: .second(.fourth), + primaryColor: .yellow, + widthRatio: 0.1, + heightRatio: 0.16, + verticalOffsetRatio: -0.35, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 3) + symbolCountToWaitFor: 3 ) // MARK: - 􀨯 nose ArtComponentView( name: "nose", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.fifth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fifth)) - ), - finalValue: .init( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.045), - height: model.calculatingProportionalValue(withRatio: 0.06), - offsetY: model.calculatingProportionalValue(withRatio: -0.38) - ), + initialPosition: .second(.fifth), + fontWeight: .ultraLight, + widthRatio: 0.045, + heightRatio: 0.06, + verticalOffsetRatio: -0.38, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 4) + symbolCountToWaitFor: 4 ) // MARK: - 􀦭 Right eyebrow ArtComponentView( name: "eyebrow", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.sixth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.sixth)) - ), - finalValue: .init( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.04), - rotationDegrees: 10, - offsetX: model.calculatingProportionalValue(withRatio: 0.03), - offsetY: model.calculatingProportionalValue(withRatio: -0.41) - ), + initialPosition: .second(.sixth), + fontWeight: .ultraLight, + widthRatio: 0.04, + heightRatio: 0.04, + horizontalOffsetRatio: 0.03, + verticalOffsetRatio: -0.41, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 5) + symbolCountToWaitFor: 5 ) // MARK: - 􀦭 Left eyebrow ArtComponentView( name: "eyebrow", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.sixth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.sixth)) - ), - finalValue: .init( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.045), - height: model.calculatingProportionalValue(withRatio: 0.04), - rotationDegrees: 180, - rotationAxis: (x: 0, y: 1, z: 0), - offsetX: model.calculatingProportionalValue(withRatio: -0.03), - offsetY: model.calculatingProportionalValue(withRatio: -0.408) - ), + initialPosition: .second(.sixth), + fontWeight: .ultraLight, + widthRatio: 0.045, + heightRatio: 0.04, + rotationDegrees: 180, + rotationAxis: (x: 0, y: 1, z: 0), + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.408, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 5) + symbolCountToWaitFor: 5 ) // MARK: - 􀧷 Concealing part for eyebrow ArtComponentView( name: "capsule.portrait.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.fourth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fourth)) - ), - finalValue: .init( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.05), - height: model.calculatingProportionalValue(withRatio: 0.02), - rotationDegrees: -10, - offsetX: model.calculatingProportionalValue(withRatio: -0.035), - offsetY: model.calculatingProportionalValue(withRatio: -0.396) - ), + initialPosition: .second(.fourth), + primaryColor: .yellow, + widthRatio: 0.05, + heightRatio: 0.02, + rotationDegrees: -10, + horizontalOffsetRatio: -0.035, + verticalOffsetRatio: -0.396, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 5) + symbolCountToWaitFor: 5 ) ArtComponentView( name: "capsule.portrait.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.fourth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.fourth)) - ), - finalValue: .init( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.05), - height: model.calculatingProportionalValue(withRatio: 0.02), - rotationDegrees: 10, - offsetX: model.calculatingProportionalValue(withRatio: 0.035), - offsetY: model.calculatingProportionalValue(withRatio: -0.396) - ), + initialPosition: .second(.fourth), + primaryColor: .yellow, + widthRatio: 0.05, + heightRatio: 0.02, + rotationDegrees: 10, + horizontalOffsetRatio: 0.035, + verticalOffsetRatio: -0.396, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 5) + symbolCountToWaitFor: 5 ) // MARK: - 􀋭 Right eye ArtComponentView( name: "eye", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.seventh)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.seventh)) - ), - finalValue: .init( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.02), - offsetX: model.calculatingProportionalValue(withRatio: 0.03), - offsetY: model.calculatingProportionalValue(withRatio: -0.4) - ), + initialPosition: .second(.seventh), + fontWeight: .ultraLight, + widthRatio: 0.04, + heightRatio: 0.02, + horizontalOffsetRatio: 0.03, + verticalOffsetRatio: -0.4, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 6) + symbolCountToWaitFor: 6 ) // MARK: - 􀋭 Left eye ArtComponentView( name: "eye", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.seventh)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.seventh)) - ), - finalValue: .init( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.02), - offsetX: model.calculatingProportionalValue(withRatio: -0.03), - offsetY: model.calculatingProportionalValue(withRatio: -0.4) - ), + initialPosition: .second(.seventh), + fontWeight: .ultraLight, + widthRatio: 0.04, + heightRatio: 0.02, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.4, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 6) + symbolCountToWaitFor: 6 ) // MARK: - 􀋮 Right eye.fill ArtComponentView( name: "eye.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.seventh)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.seventh)) - ), - finalValue: .init( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.02), - offsetX: model.calculatingProportionalValue(withRatio: 0.03), - offsetY: model.calculatingProportionalValue(withRatio: -0.4) - ), + initialPosition: .third(.seventh), + primaryColor: .white, + widthRatio: 0.04, + heightRatio: 0.02, + horizontalOffsetRatio: 0.03, + verticalOffsetRatio: -0.4, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 6) + symbolCountToWaitFor: 6 ) // MARK: - 􀋮 Left eye.fill ArtComponentView( name: "eye.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.seventh)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.seventh)) - ), - finalValue: .init( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.02), - offsetX: model.calculatingProportionalValue(withRatio: -0.03), - offsetY: model.calculatingProportionalValue(withRatio: -0.4) - ), + initialPosition: .third(.seventh), + primaryColor: .white, + widthRatio: 0.04, + heightRatio: 0.02, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.4, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 6) + symbolCountToWaitFor: 6 ) // MARK: - 􀦪 Mouth ArtComponentView( name: "mouth.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.02), - offsetY: model.calculatingProportionalValue(withRatio: -0.32) - ), + initialPosition: .third(.third), + primaryColor: .red, + widthRatio: 0.06, + heightRatio: 0.02, + verticalOffsetRatio: -0.32, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 7) + symbolCountToWaitFor: 7 ) ArtComponentView( name: "mouth.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.02), - offsetY: model.calculatingProportionalValue(withRatio: -0.33) - ), + initialPosition: .third(.third), + primaryColor: .red, + widthRatio: 0.06, + heightRatio: 0.02, + verticalOffsetRatio: -0.33, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 7) + symbolCountToWaitFor: 7 ) // MARK: - 􁒀 Teeth ArtComponentView( name: "window.casement.closed", - initialValue: .init( - secondaryColor: .clear, - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) - ), - finalValue: .init( - primaryColor: .black, - secondaryColor: .white, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.015), - height: model.calculatingProportionalValue(withRatio: 0.029), - rotationDegrees: 90, - offsetX: model.calculatingProportionalValue(withRatio: 0.013), - offsetY: model.calculatingProportionalValue(withRatio: -0.328) - ), + initialSecondaryColor: .clear, + initialPosition: .third(.fourth), + secondaryColor: .white, + fontWeight: .ultraLight, + widthRatio: 0.015, + heightRatio: 0.029, + rotationDegrees: 90, + horizontalOffsetRatio: 0.013, + verticalOffsetRatio: -0.328, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 8) + symbolCountToWaitFor: 8 ) ArtComponentView( name: "window.casement.closed", - initialValue: .init( - secondaryColor: .clear, - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) - ), - finalValue: .init( - primaryColor: .black, - secondaryColor: .white, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.015), - height: model.calculatingProportionalValue(withRatio: 0.029), - rotationDegrees: 90, - offsetX: model.calculatingProportionalValue(withRatio: -0.014), - offsetY: model.calculatingProportionalValue(withRatio: -0.328) - ), + initialSecondaryColor: .clear, + initialPosition: .third(.fourth), + secondaryColor: .white, + fontWeight: .ultraLight, + widthRatio: 0.015, + heightRatio: 0.029, + rotationDegrees: 90, + horizontalOffsetRatio: -0.014, + verticalOffsetRatio: -0.328, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 8) + symbolCountToWaitFor: 8 ) // MARK: - 􀲟 Hair ArtComponentView( name: "oval.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fifth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fifth)) - ), - finalValue: .init( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.14), - height: model.calculatingProportionalValue(withRatio: 0.057), - offsetX: model.calculatingProportionalValue(withRatio: -0.001), - offsetY: model.calculatingProportionalValue(withRatio: -0.49) - ), + initialPosition: .third(.fifth), + fontWeight: .ultraLight, + widthRatio: 0.14, + heightRatio: 0.057, + horizontalOffsetRatio: -0.001, + verticalOffsetRatio: -0.49, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 9) + symbolCountToWaitFor: 9 ) // MARK: - 􀠒 Hair ArtComponentView( name: "drop.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.sixth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.sixth)) - ), - finalValue: .init( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.05), - height: model.calculatingProportionalValue(withRatio: 0.06), - rotationDegrees: -65, - offsetX: model.calculatingProportionalValue(withRatio: 0.04), - offsetY: model.calculatingProportionalValue(withRatio: -0.48) - ), + initialPosition: .third(.sixth), + fontWeight: .ultraLight, + widthRatio: 0.05, + heightRatio: 0.06, + rotationDegrees: -65, + horizontalOffsetRatio: 0.04, + verticalOffsetRatio: -0.48, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 9) + symbolCountToWaitFor: 9 ) ArtComponentView( name: "drop.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.sixth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.sixth)) - ), - finalValue: .init( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.05), - height: model.calculatingProportionalValue(withRatio: 0.1), - rotationDegrees: 95, - offsetX: model.calculatingProportionalValue(withRatio: -0.03), - offsetY: model.calculatingProportionalValue(withRatio: -0.47) - ), + initialPosition: .third(.sixth), + fontWeight: .ultraLight, + widthRatio: 0.05, + heightRatio: 0.1, + rotationDegrees: 95, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.47, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 9) + symbolCountToWaitFor: 9 ) } .navigationTitle("I'm wearing pants") diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift index cb5f098..2a8ed50 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift @@ -18,290 +18,177 @@ struct MagicianArtView: View { // MARK: - 􀠒 Outline ArtComponentView( name: "drop.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.first)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.first)) - ), - finalValue: .init( - primaryColor: .paleOrange, - width: model.calculatingProportionalValue(withRatio: 0.5), - height: model.calculatingProportionalValue(withRatio: 0.75), - rotationDegrees: 180, - offsetY: model.calculatingProportionalValue(withRatio: 0.15) - ), + initialPosition: .second(.first), + primaryColor: .paleOrange, + widthRatio: 0.5, + heightRatio: 0.75, + rotationDegrees: 180, + verticalOffsetRatio: 0.15, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: 0.001 + symbolCountToWaitFor: 0 ) // MARK: - 􀏄 Hat band ArtComponentView( name: "rectangle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.second)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.second)) - ), - finalValue: .init( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.446), - height: model.calculatingProportionalValue(withRatio: 0.1), - offsetX: model.calculatingProportionalValue(withRatio: 0.01), - offsetY: model.calculatingProportionalValue(withRatio: -0.15) - ), + initialPosition: .second(.second), + primaryColor: .red, + widthRatio: 0.446, + heightRatio: 0.1, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: -0.15, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 1) + symbolCountToWaitFor: 1 ) // MARK: - 􀈮 Hat ArtComponentView( name: "archivebox.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) - ), - finalValue: .init( - width: model.calculatingProportionalValue(withRatio: 0.525), - height: model.calculatingProportionalValue(withRatio: 0.525), - rotationDegrees: 180, - offsetY: model.calculatingProportionalValue(withRatio: -0.25) - ), + initialPosition: .third(.first), + widthRatio: 0.525, + heightRatio: 0.525, + rotationDegrees: 180, + verticalOffsetRatio: -0.25, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 2) + symbolCountToWaitFor: 2 ) // MARK: - 􀏄 Hat brim ArtComponentView( name: "rectangle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .second(.second)), - offsetY: model.calculatingInitialOffsetY(forPosition: .second(.second)) - ), - finalValue: .init( - width: model.calculatingProportionalValue(withRatio: 0.625), - height: model.calculatingProportionalValue(withRatio: 0.125), - offsetY: model.calculatingProportionalValue(withRatio: -0.05) - ), + initialPosition: .second(.second), + widthRatio: 0.625, + heightRatio: 0.125, + verticalOffsetRatio: -0.05, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 3) + symbolCountToWaitFor: 3 ) // MARK: - 􀆐 Eyebrow ArtComponentView( name: "chevron.compact.up", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) - ), - finalValue: .init( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.1), - height: model.calculatingProportionalValue(withRatio: 0.04), - offsetX: model.calculatingProportionalValue(withRatio: 0.1), - offsetY: model.calculatingProportionalValue(withRatio: 0.03) - ), + initialPosition: .third(.second), + fontWeight: .thin, + widthRatio: 0.1, + heightRatio: 0.04, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: 0.03, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 4) + symbolCountToWaitFor: 4 ) ArtComponentView( name: "chevron.compact.up", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) - ), - finalValue: .init( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.1), - height: model.calculatingProportionalValue(withRatio: 0.04), - offsetX: model.calculatingProportionalValue(withRatio: -0.1), - offsetY: model.calculatingProportionalValue(withRatio: 0.03) - ), + initialPosition: .third(.second), + fontWeight: .thin, + widthRatio: 0.1, + heightRatio: 0.04, + horizontalOffsetRatio: -0.1, + verticalOffsetRatio: 0.03, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 4) + symbolCountToWaitFor: 4 ) // MARK: - 􀅽 Sunglasses frame ArtComponentView( name: "minus", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.0125), - offsetY: model.calculatingProportionalValue(withRatio: 0.12) - ), + initialPosition: .third(.third), + fontWeight: .thin, + widthRatio: 0.06, + heightRatio: 0.0125, + verticalOffsetRatio: 0.12, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 5) + symbolCountToWaitFor: 5 ) ArtComponentView( name: "minus", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.0125), - offsetX: model.calculatingProportionalValue(withRatio: 0.2), - offsetY: model.calculatingProportionalValue(withRatio: 0.12) - ), + initialPosition: .third(.third), + fontWeight: .thin, + widthRatio: 0.06, + heightRatio: 0.0125, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.12, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 5) + symbolCountToWaitFor: 5 ) ArtComponentView( name: "minus", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.0125), - offsetX: model.calculatingProportionalValue(withRatio: -0.2), - offsetY: model.calculatingProportionalValue(withRatio: 0.12) - ), + initialPosition: .third(.third), + fontWeight: .thin, + widthRatio: 0.04, + heightRatio: 0.0125, + horizontalOffsetRatio: -0.2, + verticalOffsetRatio: 0.12, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 5) + symbolCountToWaitFor: 5 ) // MARK: - 􀆼 Sunglasses lens ArtComponentView( name: "moon.circle.fill", - initialValue: .init( - primaryColor: .white, - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fourth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) - ), - finalValue: .init( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.125), - height: model.calculatingProportionalValue(withRatio: 0.125), - offsetX: model.calculatingProportionalValue(withRatio: 0.1), - offsetY: model.calculatingProportionalValue(withRatio: 0.12) - ), + initialPrimaryColor: .white, + initialPosition: .third(.fourth), + primaryColor: .white, + widthRatio: 0.125, + heightRatio: 0.125, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: 0.12, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 6) + symbolCountToWaitFor: 6 ) ArtComponentView( name: "moon.circle.fill", - initialValue: .init( - primaryColor: .white, - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fourth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) - ), - finalValue: .init( - primaryColor: .white, - secondaryColor: .black, - width: model.calculatingProportionalValue(withRatio: 0.125), - height: model.calculatingProportionalValue(withRatio: 0.125), - offsetX: model.calculatingProportionalValue(withRatio: -0.1), - offsetY: model.calculatingProportionalValue(withRatio: 0.12) - ), + initialPrimaryColor: .white, + initialPosition: .third(.fourth), + primaryColor: .white, + widthRatio: 0.125, + heightRatio: 0.125, + horizontalOffsetRatio: -0.1, + verticalOffsetRatio: 0.12, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 6) + symbolCountToWaitFor: 6 ) // MARK: - 􀇈 Nose ArtComponentView( name: "cloud.heavyrain", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fifth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fifth)) - ), - finalValue: .init( - fontWeight: .light, - width: model.calculatingProportionalValue(withRatio: 0.15), - height: model.calculatingProportionalValue(withRatio: 0.15), - offsetX: model.calculatingProportionalValue(withRatio: 0.01), - offsetY: model.calculatingProportionalValue(withRatio: 0.27) - ), + initialPosition: .third(.fifth), + fontWeight: .light, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: 0.27, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 7) + symbolCountToWaitFor: 7 ) // MARK: - 􀩻 Inside mouth ArtComponentView( name: "button.roundedbottom.horizontal.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.sixth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.sixth)) - ), - finalValue: .init( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.15), - height: model.calculatingProportionalValue(withRatio: 0.075), - offsetX: model.calculatingProportionalValue(withRatio: 0.01), - offsetY: model.calculatingProportionalValue(withRatio: 0.4) - ), + initialPosition: .third(.sixth), + primaryColor: .red, + widthRatio: 0.15, + heightRatio: 0.075, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: 0.4, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 8) + symbolCountToWaitFor: 8 ) // MARK: - 􀝷 Tongue capsule.fill ArtComponentView( name: "capsule.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.seventh)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.seventh)) - ), - finalValue: .init( - primaryColor: .orange, - width: model.calculatingProportionalValue(withRatio: 0.145), - height: model.calculatingProportionalValue(withRatio: 0.025), - offsetX: model.calculatingProportionalValue(withRatio: 0.01), - offsetY: model.calculatingProportionalValue(withRatio: 0.424) - ), + initialPosition: .third(.seventh), + primaryColor: .orange, + widthRatio: 0.145, + heightRatio: 0.025, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: 0.424, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 9) + symbolCountToWaitFor: 9 ) } .navigationTitle("Magician") diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift index 0a0dc9d..be605d8 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -20,43 +20,26 @@ struct NosebleedArtView: View { // MARK: - 􀀁 Contour ArtComponentView( name: "circle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) - ), - finalValue: .init( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.65), - height: model.calculatingProportionalValue(withRatio: 0.65) - ), + initialPosition: .third(.first), + primaryColor: .awesomeYellow, + widthRatio: 0.65, + heightRatio: 0.65, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: 0.001 + symbolCountToWaitFor: 0 ) // MARK: - 􀭧 Nosebleed bottom ArtComponentView( name: "cellularbars", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) - ), - finalValue: .init( - primaryColor: .red, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.5), - rotationDegrees: 180, - offsetX: model.calculatingProportionalValue(withRatio: 0.09), - offsetY: model.calculatingProportionalValue(withRatio: 0.074) - ), + initialPosition: .third(.second), + primaryColor: .red, + widthRatio: 0.2, + heightRatio: 0.5, + rotationDegrees: 180, + horizontalOffsetRatio: 0.09, + verticalOffsetRatio: 0.074, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 1) + symbolCountToWaitFor: 1 ) .symbolEffect(.variableColor.hideInactiveLayers, options: .speed(0.6).repeating, @@ -65,87 +48,55 @@ struct NosebleedArtView: View { // MARK: - 􀏄 Concealing part for nosebleed bottom ArtComponentView( name: "rectangle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.1), - height: model.calculatingProportionalValue(withRatio: 0.14), - offsetX: model.calculatingProportionalValue(withRatio: 0.09), - offsetY: model.calculatingProportionalValue(withRatio: 0.15) - ), + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.1, + heightRatio: 0.14, + horizontalOffsetRatio: 0.09, + verticalOffsetRatio: 0.15, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 2) + symbolCountToWaitFor: 2 ) // MARK: - 􀓩 Mouth ArtComponentView( name: "lasso", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fourth)) - ), - finalValue: .init( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.4), - height: model.calculatingProportionalValue(withRatio: 0.3), - rotationDegrees: 170, - offsetX: model.calculatingProportionalValue(withRatio: 0.01), - offsetY: model.calculatingProportionalValue(withRatio: 0.05) - ), + initialPosition: .third(.fourth), + fontWeight: .ultraLight, + widthRatio: 0.4, + heightRatio: 0.3, + rotationDegrees: 170, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: 0.05, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 3) + symbolCountToWaitFor: 3 ) // MARK: - 􀏄 Concealing part for Mouth ArtComponentView( name: "rectangle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.5), - height: model.calculatingProportionalValue(withRatio: 0.3), - rotationDegrees: 176, - offsetY: model.calculatingProportionalValue(withRatio: -0.03) - ), + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.5, + heightRatio: 0.3, + rotationDegrees: 176, + verticalOffsetRatio: -0.03, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 4) + symbolCountToWaitFor: 4 ) // MARK: - 􀭧 Nosebleed top ArtComponentView( name: "cellularbars", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.second)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.second)) - ), - finalValue: .init( - primaryColor: .red, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.12), - rotationDegrees: 180, - offsetX: model.calculatingProportionalValue(withRatio: 0.033), - offsetY: model.calculatingProportionalValue(withRatio: 0.096) - ), + initialPosition: .third(.second), + primaryColor: .red, + widthRatio: 0.2, + heightRatio: 0.12, + rotationDegrees: 180, + horizontalOffsetRatio: 0.035, + verticalOffsetRatio: 0.097, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 5) + symbolCountToWaitFor: 5 ) .symbolEffect(.variableColor.hideInactiveLayers, options: .speed(0.6).repeating, @@ -154,172 +105,108 @@ struct NosebleedArtView: View { // MARK: - 􀏄 Concealing part for nosebleed top right ArtComponentView( name: "rectangle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.1), - height: model.calculatingProportionalValue(withRatio: 0.1), - offsetX: model.calculatingProportionalValue(withRatio: 0.09), - offsetY: model.calculatingProportionalValue(withRatio: 0.06) - ), + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.1, + heightRatio: 0.1, + horizontalOffsetRatio: 0.09, + verticalOffsetRatio: 0.06, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 6) + symbolCountToWaitFor: 6 ) // MARK: - 􀏄 Concealing part for nosebleed top left ArtComponentView( name: "rectangle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.03), - height: model.calculatingProportionalValue(withRatio: 0.14), - offsetX: model.calculatingProportionalValue(withRatio: -0.053), - offsetY: model.calculatingProportionalValue(withRatio: 0.09) - ), + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.04, + heightRatio: 0.14, + horizontalOffsetRatio: -0.047, + verticalOffsetRatio: 0.09, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 6) + symbolCountToWaitFor: 6 ) // MARK: - 􀀁 Right eye ArtComponentView( name: "circle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) - ), - finalValue: .init( - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.06), - offsetX: model.calculatingProportionalValue(withRatio: 0.117), - offsetY: model.calculatingProportionalValue(withRatio: -0.176) - ), + initialPosition: .third(.first), + widthRatio: 0.06, + heightRatio: 0.06, + horizontalOffsetRatio: 0.117, + verticalOffsetRatio: -0.176, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 7) + symbolCountToWaitFor: 7 ) // MARK: - 􀀁 Left eye ArtComponentView( name: "circle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.first)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.first)) - ), - finalValue: .init( - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.06), - offsetX: model.calculatingProportionalValue(withRatio: -0.113), - offsetY: model.calculatingProportionalValue(withRatio: -0.17) - ), + initialPosition: .third(.first), + widthRatio: 0.06, + heightRatio: 0.06, + horizontalOffsetRatio: -0.113, + verticalOffsetRatio: -0.17, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 7) + symbolCountToWaitFor: 7 ) // MARK: - 􀥨 Tissue ArtComponentView( name: "doc.plaintext.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fifth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fifth)) - ), - finalValue: .init( - primaryColor: .white, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.08), - rotationDegrees: 188, - offsetX: model.calculatingProportionalValue(withRatio: -0.052), - offsetY: model.calculatingProportionalValue(withRatio: 0.083) - ), + initialPosition: .third(.fifth), + primaryColor: .white, + fontWeight: .ultraLight, + widthRatio: 0.04, + heightRatio: 0.08, + rotationDegrees: 188, + horizontalOffsetRatio: -0.052, + verticalOffsetRatio: 0.083, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 8) + symbolCountToWaitFor: 8 ) // MARK: - 􀉆 Tissue frame ArtComponentView( name: "doc.plaintext", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.sixth)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.sixth)) - ), - finalValue: .init( - fontWeight: .light, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.08), - rotationDegrees: 188, - offsetX: model.calculatingProportionalValue(withRatio: -0.052), - offsetY: model.calculatingProportionalValue(withRatio: 0.083) - ), + initialPosition: .third(.sixth), + fontWeight: .light, + widthRatio: 0.04, + heightRatio: 0.08, + rotationDegrees: 188, + horizontalOffsetRatio: -0.052, + verticalOffsetRatio: 0.083, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 8) + symbolCountToWaitFor: 8 ) // MARK: - 􀥰 Nose ArtComponentView( name: "triangleshape", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.seventh)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.seventh)) - ), - finalValue: .init( - fontWeight: .light, - width: model.calculatingProportionalValue(withRatio: 0.15), - height: model.calculatingProportionalValue(withRatio: 0.14), - rotationDegrees: -4, - offsetX: model.calculatingProportionalValue(withRatio: -0.013), - offsetY: model.calculatingProportionalValue(withRatio: -0.02) - ), + initialPosition: .third(.seventh), + fontWeight: .light, + widthRatio: 0.15, + heightRatio: 0.14, + rotationDegrees: -4, + horizontalOffsetRatio: -0.013, + verticalOffsetRatio: -0.02, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 9) + symbolCountToWaitFor: 9 ) // MARK: - 􀏄 Concealing part for nose ArtComponentView( name: "rectangle.fill", - initialValue: .init( - width: model.initialSymbolLength, - height: model.initialSymbolLength, - offsetX: model.calculatingInitialOffsetX(forPosition: .third(.third)), - offsetY: model.calculatingInitialOffsetY(forPosition: .third(.third)) - ), - finalValue: .init( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.02), - height: model.calculatingProportionalValue(withRatio: 0.13), - rotationDegrees: 148, - offsetX: model.calculatingProportionalValue(withRatio: 0.007), - offsetY: model.calculatingProportionalValue(withRatio: -0.046) - ), + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.02, + heightRatio: 0.13, + rotationDegrees: 148, + horizontalOffsetRatio: 0.007, + verticalOffsetRatio: -0.046, isAnimating: isAnimating, - animationDuration: model.animationDurationPerSymbol, - waitingTime: model.waitingTime(forCount: 10) + symbolCountToWaitFor: 10 ) } .navigationTitle("Nosebleed") diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift index 267bdde..2135e8e 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift @@ -9,12 +9,89 @@ import SwiftUI struct ArtComponentView: View { + init( + name: String, + initialPrimaryColor: Color = .black, + initialSecondaryColor: Color = .black, + initialPosition: ArtWorkModel.InitialSymbolRow, + primaryColor: Color = .black, + secondaryColor: Color = .black, + fontWeight: Font.Weight = .regular, + widthRatio: CGFloat, + heightRatio: CGFloat, + rotationDegrees: CGFloat = 0, + rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) = (x: 0, y: 0, z: 1), + horizontalOffsetRatio: CGFloat = 0, + verticalOffsetRatio: CGFloat = 0, + isAnimating: Bool, + symbolCountToWaitFor: Int + ) { + self.name = name + self.initialPrimaryColor = initialPrimaryColor + self.initialSecondaryColor = initialSecondaryColor + self.initialPosition = initialPosition + self.primaryColor = primaryColor + self.secondaryColor = secondaryColor + self.fontWeight = fontWeight + self.widthRatio = widthRatio + self.heightRatio = heightRatio + self.rotationDegrees = rotationDegrees + self.rotationAxis = rotationAxis + self.horizontalOffsetRatio = horizontalOffsetRatio + self.verticalOffsetRatio = verticalOffsetRatio + self.isAnimating = isAnimating + self.symbolCountToWaitFor = symbolCountToWaitFor + } + + @Environment(ArtWorkModel.self) var model let name: String - let initialValue: AnimationValues - let finalValue: AnimationValues + let initialPrimaryColor: Color + let initialSecondaryColor: Color + let initialPosition: ArtWorkModel.InitialSymbolRow + let primaryColor: Color + let secondaryColor: Color + let fontWeight: Font.Weight + let widthRatio: CGFloat + let heightRatio: CGFloat + let rotationDegrees: CGFloat + var rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) + let horizontalOffsetRatio: CGFloat + let verticalOffsetRatio: CGFloat let isAnimating: Bool - let animationDuration: Double - let waitingTime: Double + let symbolCountToWaitFor: Int + + private var initialValue: AnimationValues { + return .init( + primaryColor: initialPrimaryColor, + secondaryColor: initialSecondaryColor, + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: initialPosition), + offsetY: model.calculatingInitialOffsetY(forPosition: initialPosition) + ) + } + + private var finalValue: AnimationValues { + return .init( + primaryColor: primaryColor, + secondaryColor: secondaryColor, + fontWeight: fontWeight, + width: model.calculatingProportionalValue(withRatio: widthRatio), + height: model.calculatingProportionalValue(withRatio: heightRatio), + rotationDegrees: rotationDegrees, + rotationAxis: rotationAxis, + offsetX: model.calculatingProportionalValue(withRatio: horizontalOffsetRatio), + offsetY: model.calculatingProportionalValue(withRatio: verticalOffsetRatio) + ) + } + + private var waitingTime: Double { + if symbolCountToWaitFor <= 0 { + // In case of setting it to 0, the symbols disappear from the view. + return 0.001 + } + return model.waitingTime(forCount: symbolCountToWaitFor) + } var body: some View { Image(systemName: name) @@ -58,57 +135,57 @@ struct ArtComponentView: View { KeyframeTrack(\.primaryColor) { LinearKeyframe(value.primaryColor, duration: waitingTime) - CubicKeyframe(finalValue.primaryColor, duration: animationDuration) + CubicKeyframe(finalValue.primaryColor, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.secondaryColor) { LinearKeyframe(value.secondaryColor, duration: waitingTime) - CubicKeyframe(finalValue.secondaryColor, duration: animationDuration) + CubicKeyframe(finalValue.secondaryColor, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.fontWeightValue) { LinearKeyframe(value.fontWeightValue, duration: waitingTime) - CubicKeyframe(finalValue.fontWeightValue, duration: animationDuration) + CubicKeyframe(finalValue.fontWeightValue, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.width) { LinearKeyframe(value.width, duration: waitingTime) - CubicKeyframe(finalValue.width, duration: animationDuration) + CubicKeyframe(finalValue.width, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.height) { LinearKeyframe(value.height, duration: waitingTime) - CubicKeyframe(finalValue.height, duration: animationDuration) + CubicKeyframe(finalValue.height, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.rotationDegrees) { LinearKeyframe(value.rotationDegrees, duration: waitingTime) - CubicKeyframe(finalValue.rotationDegrees, duration: animationDuration) + CubicKeyframe(finalValue.rotationDegrees, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.rotationAxis.x) { LinearKeyframe(value.rotationAxis.x, duration: waitingTime) - CubicKeyframe(finalValue.rotationAxis.x, duration: animationDuration) + CubicKeyframe(finalValue.rotationAxis.x, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.rotationAxis.y) { LinearKeyframe(value.rotationAxis.y, duration: waitingTime) - CubicKeyframe(finalValue.rotationAxis.y, duration: animationDuration) + CubicKeyframe(finalValue.rotationAxis.y, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.rotationAxis.z) { LinearKeyframe(value.rotationAxis.z, duration: waitingTime) - CubicKeyframe(finalValue.rotationAxis.z, duration: animationDuration) + CubicKeyframe(finalValue.rotationAxis.z, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.offset) { LinearKeyframe(value.offset, duration: waitingTime) - CubicKeyframe(finalValue.offset, duration: animationDuration) + CubicKeyframe(finalValue.offset, duration: model.animationDurationPerSymbol) } KeyframeTrack(\.symbolNameVisibleValue) { LinearKeyframe(1, duration: waitingTime) - CubicKeyframe(0, duration: animationDuration * 0.2) + CubicKeyframe(0, duration: model.animationDurationPerSymbol * 0.2) } } } @@ -117,19 +194,12 @@ struct ArtComponentView: View { #Preview { ArtComponentView( name: "circle.fill", - initialValue: .init( - width: 100, - height: 100, - offsetX: 0, - offsetY: 0 - ), finalValue: .init( - width: 200, - height: 200, - offsetX: 0, - offsetY: 0 - ), + initialPosition: .third(.first), + primaryColor: .red, + widthRatio: 1, + heightRatio: 1, isAnimating: true, - animationDuration: 20, - waitingTime: 0 + symbolCountToWaitFor: 0 ) + .environment(ArtWorkModel.preview) } From 6cfefd136e1ba2eb748165c9ebb30e38ad8d543f Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 09:54:38 +0900 Subject: [PATCH 044/108] Refactor Color.systemBackground --- .../ArtWorks/ImWearingPants/ImWearingPantsArtView.swift | 8 ++++---- .../ImWearingPants/ImWearingPantsPreviewView.swift | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index a67b230..aa5c66c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -129,7 +129,7 @@ struct ImWearingPantsArtView: View { // MARK: - 􀏄 Parts for shaping Image(systemName: "rectangle.fill") .resizable() - .foregroundStyle(Color(uiColor: .systemBackground)) + .foregroundStyle(Color.systemBackground) .fontWeight(.black) .frame(width: model.calculatingProportionalValue(withRatio: 0.3), height: model.calculatingProportionalValue(withRatio: 0.4)) @@ -138,7 +138,7 @@ struct ImWearingPantsArtView: View { Image(systemName: "rectangle.fill") .resizable() - .foregroundStyle(Color(uiColor: .systemBackground)) + .foregroundStyle(Color.systemBackground) .fontWeight(.black) .frame(width: model.calculatingProportionalValue(withRatio: 0.3), height: model.calculatingProportionalValue(withRatio: 0.4)) @@ -158,7 +158,7 @@ struct ImWearingPantsArtView: View { // MARK: - 􀂓 Parts for shaping Image(systemName: "square.fill") .resizable() - .foregroundStyle(Color(uiColor: .systemBackground)) + .foregroundStyle(Color.systemBackground) .frame(width: model.calculatingProportionalValue(withRatio: 0.2), height: model.calculatingProportionalValue(withRatio: 0.2)) .offset(x: model.calculatingProportionalValue(withRatio: 0.14), @@ -166,7 +166,7 @@ struct ImWearingPantsArtView: View { Image(systemName: "square.fill") .resizable() - .foregroundStyle(Color(uiColor: .systemBackground)) + .foregroundStyle(Color.systemBackground) .frame(width: model.calculatingProportionalValue(withRatio: 0.2), height: model.calculatingProportionalValue(withRatio: 0.2)) .offset(x: model.calculatingProportionalValue(withRatio: -0.14), diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift index 03b3c9f..0dbb32a 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift @@ -67,7 +67,7 @@ struct ImWearingPantsPreviewView: View { // MARK: - 􀏄 Parts for shaping Image(systemName: "rectangle.fill") .resizable() - .foregroundStyle(Color(uiColor: .systemBackground)) + .foregroundStyle(Color.systemBackground) .fontWeight(.black) .frame(width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), height: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true)) @@ -76,7 +76,7 @@ struct ImWearingPantsPreviewView: View { Image(systemName: "rectangle.fill") .resizable() - .foregroundStyle(Color(uiColor: .systemBackground)) + .foregroundStyle(Color.systemBackground) .fontWeight(.black) .frame(width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), height: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true)) @@ -96,7 +96,7 @@ struct ImWearingPantsPreviewView: View { // MARK: - 􀂓 Parts for shaping Image(systemName: "square.fill") .resizable() - .foregroundStyle(Color(uiColor: .systemBackground)) + .foregroundStyle(Color.systemBackground) .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) .offset(x: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), @@ -104,7 +104,7 @@ struct ImWearingPantsPreviewView: View { Image(systemName: "square.fill") .resizable() - .foregroundStyle(Color(uiColor: .systemBackground)) + .foregroundStyle(Color.systemBackground) .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) .offset(x: model.calculatingProportionalValue(withRatio: -0.14, forPreview: true), From eced7610a5221b54b59a45d3b9ff6c818a8c7ece Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 10:04:55 +0900 Subject: [PATCH 045/108] Update NosebleedArtView --- .../ArtWorks/Nosebleed/NosebleedArtView.swift | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift index be605d8..c378257 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -25,7 +25,7 @@ struct NosebleedArtView: View { widthRatio: 0.65, heightRatio: 0.65, isAnimating: isAnimating, - symbolCountToWaitFor: 0 + symbolCountToWaitFor: 2 ) // MARK: - 􀭧 Nosebleed bottom @@ -39,7 +39,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.09, verticalOffsetRatio: 0.074, isAnimating: isAnimating, - symbolCountToWaitFor: 1 + symbolCountToWaitFor: 0 ) .symbolEffect(.variableColor.hideInactiveLayers, options: .speed(0.6).repeating, @@ -55,7 +55,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.09, verticalOffsetRatio: 0.15, isAnimating: isAnimating, - symbolCountToWaitFor: 2 + symbolCountToWaitFor: 3 ) // MARK: - 􀓩 Mouth @@ -69,7 +69,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.01, verticalOffsetRatio: 0.05, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 1 ) // MARK: - 􀏄 Concealing part for Mouth @@ -82,7 +82,7 @@ struct NosebleedArtView: View { rotationDegrees: 176, verticalOffsetRatio: -0.03, isAnimating: isAnimating, - symbolCountToWaitFor: 4 + symbolCountToWaitFor: 3 ) // MARK: - 􀭧 Nosebleed top @@ -96,7 +96,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.035, verticalOffsetRatio: 0.097, isAnimating: isAnimating, - symbolCountToWaitFor: 5 + symbolCountToWaitFor: 0 ) .symbolEffect(.variableColor.hideInactiveLayers, options: .speed(0.6).repeating, @@ -112,7 +112,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.09, verticalOffsetRatio: 0.06, isAnimating: isAnimating, - symbolCountToWaitFor: 6 + symbolCountToWaitFor: 3 ) // MARK: - 􀏄 Concealing part for nosebleed top left @@ -125,7 +125,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: -0.047, verticalOffsetRatio: 0.09, isAnimating: isAnimating, - symbolCountToWaitFor: 6 + symbolCountToWaitFor: 3 ) // MARK: - 􀀁 Right eye @@ -137,7 +137,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.117, verticalOffsetRatio: -0.176, isAnimating: isAnimating, - symbolCountToWaitFor: 7 + symbolCountToWaitFor: 2 ) // MARK: - 􀀁 Left eye @@ -149,7 +149,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: -0.113, verticalOffsetRatio: -0.17, isAnimating: isAnimating, - symbolCountToWaitFor: 7 + symbolCountToWaitFor: 2 ) // MARK: - 􀥨 Tissue @@ -164,7 +164,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: -0.052, verticalOffsetRatio: 0.083, isAnimating: isAnimating, - symbolCountToWaitFor: 8 + symbolCountToWaitFor: 5 ) // MARK: - 􀉆 Tissue frame @@ -178,7 +178,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: -0.052, verticalOffsetRatio: 0.083, isAnimating: isAnimating, - symbolCountToWaitFor: 8 + symbolCountToWaitFor: 5 ) // MARK: - 􀥰 Nose @@ -192,7 +192,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: -0.013, verticalOffsetRatio: -0.02, isAnimating: isAnimating, - symbolCountToWaitFor: 9 + symbolCountToWaitFor: 4 ) // MARK: - 􀏄 Concealing part for nose @@ -206,7 +206,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.007, verticalOffsetRatio: -0.046, isAnimating: isAnimating, - symbolCountToWaitFor: 10 + symbolCountToWaitFor: 3 ) } .navigationTitle("Nosebleed") @@ -225,7 +225,7 @@ struct NosebleedArtView: View { .onChange(of: isAnimating) { _, newValue in if newValue { Timer.scheduledTimer( - withTimeInterval: model.waitingTime(forCount: 13), + withTimeInterval: model.waitingTime(forCount: 6), repeats: false ) { _ in isEffectActivated = true From 108aa779fa8ef99dc2721be1985d6514f36297fe Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 10:10:06 +0900 Subject: [PATCH 046/108] Update IamWearingPants --- .../ImWearingPantsArtView.swift | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index aa5c66c..800933c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -382,7 +382,7 @@ struct ImWearingPantsArtView: View { heightRatio: 0.16, verticalOffsetRatio: -0.35, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 2 ) // MARK: - 􀨯 nose @@ -394,7 +394,7 @@ struct ImWearingPantsArtView: View { heightRatio: 0.06, verticalOffsetRatio: -0.38, isAnimating: isAnimating, - symbolCountToWaitFor: 4 + symbolCountToWaitFor: 3 ) // MARK: - 􀦭 Right eyebrow @@ -407,7 +407,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: 0.03, verticalOffsetRatio: -0.41, isAnimating: isAnimating, - symbolCountToWaitFor: 5 + symbolCountToWaitFor: 4 ) // MARK: - 􀦭 Left eyebrow @@ -422,7 +422,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: -0.03, verticalOffsetRatio: -0.408, isAnimating: isAnimating, - symbolCountToWaitFor: 5 + symbolCountToWaitFor: 4 ) // MARK: - 􀧷 Concealing part for eyebrow @@ -436,7 +436,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: -0.035, verticalOffsetRatio: -0.396, isAnimating: isAnimating, - symbolCountToWaitFor: 5 + symbolCountToWaitFor: 2 ) ArtComponentView( @@ -449,7 +449,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: 0.035, verticalOffsetRatio: -0.396, isAnimating: isAnimating, - symbolCountToWaitFor: 5 + symbolCountToWaitFor: 2 ) // MARK: - 􀋭 Right eye @@ -462,7 +462,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: 0.03, verticalOffsetRatio: -0.4, isAnimating: isAnimating, - symbolCountToWaitFor: 6 + symbolCountToWaitFor: 5 ) // MARK: - 􀋭 Left eye @@ -475,7 +475,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: -0.03, verticalOffsetRatio: -0.4, isAnimating: isAnimating, - symbolCountToWaitFor: 6 + symbolCountToWaitFor: 5 ) // MARK: - 􀋮 Right eye.fill @@ -488,7 +488,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: 0.03, verticalOffsetRatio: -0.4, isAnimating: isAnimating, - symbolCountToWaitFor: 6 + symbolCountToWaitFor: 5 ) // MARK: - 􀋮 Left eye.fill @@ -501,7 +501,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: -0.03, verticalOffsetRatio: -0.4, isAnimating: isAnimating, - symbolCountToWaitFor: 6 + symbolCountToWaitFor: 5 ) // MARK: - 􀦪 Mouth @@ -513,7 +513,7 @@ struct ImWearingPantsArtView: View { heightRatio: 0.02, verticalOffsetRatio: -0.32, isAnimating: isAnimating, - symbolCountToWaitFor: 7 + symbolCountToWaitFor: 6 ) ArtComponentView( @@ -524,7 +524,7 @@ struct ImWearingPantsArtView: View { heightRatio: 0.02, verticalOffsetRatio: -0.33, isAnimating: isAnimating, - symbolCountToWaitFor: 7 + symbolCountToWaitFor: 6 ) // MARK: - 􁒀 Teeth @@ -540,7 +540,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: 0.013, verticalOffsetRatio: -0.328, isAnimating: isAnimating, - symbolCountToWaitFor: 8 + symbolCountToWaitFor: 7 ) ArtComponentView( @@ -555,7 +555,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: -0.014, verticalOffsetRatio: -0.328, isAnimating: isAnimating, - symbolCountToWaitFor: 8 + symbolCountToWaitFor: 7 ) // MARK: - 􀲟 Hair @@ -568,7 +568,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: -0.001, verticalOffsetRatio: -0.49, isAnimating: isAnimating, - symbolCountToWaitFor: 9 + symbolCountToWaitFor: 8 ) // MARK: - 􀠒 Hair From ae02c7e0fadf874c6dc6d3824d03d2af33c84bcc Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 17:36:41 +0900 Subject: [PATCH 047/108] Remove old magician --- .../project.pbxproj | 24 ------- .../ArtWorks/Magician/Magician.swift | 32 --------- .../ArtWorks/Magician/MagicianFace.swift | 65 ------------------- .../ArtWorks/Magician/MagicianHat.swift | 41 ------------ .../Magician/MagicianSunGlasses.swift | 59 ----------------- 5 files changed, 221 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtWorks/Magician/Magician.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/Magician/MagicianFace.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/Magician/MagicianHat.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/Magician/MagicianSunGlasses.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index add7bb9..c624ba0 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -7,13 +7,9 @@ objects = { /* Begin PBXBuildFile section */ - 971D9DE828C9497D00136A36 /* MagicianSunGlasses.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971D9DE728C9497D00136A36 /* MagicianSunGlasses.swift */; }; 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971D9DE928C9731D00136A36 /* iOSDCJapan2022SymbolType.swift */; }; 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */; }; 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */; }; - 9748BE15289338A3006DF0BE /* Magician.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE14289338A3006DF0BE /* Magician.swift */; }; - 9748BE1828933E40006DF0BE /* MagicianHat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1728933E40006DF0BE /* MagicianHat.swift */; }; - 9748BE1A289341BE006DF0BE /* MagicianFace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE19289341BE006DF0BE /* MagicianFace.swift */; }; 9748BE1D289399CF006DF0BE /* SFAlphabet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1C289399CF006DF0BE /* SFAlphabet.swift */; }; 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1F28939B04006DF0BE /* FlipType.swift */; }; 9748BE232893B35A006DF0BE /* WorldPeace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE222893B35A006DF0BE /* WorldPeace.swift */; }; @@ -85,13 +81,9 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 971D9DE728C9497D00136A36 /* MagicianSunGlasses.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianSunGlasses.swift; sourceTree = ""; }; 971D9DE928C9731D00136A36 /* iOSDCJapan2022SymbolType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022SymbolType.swift; sourceTree = ""; }; 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithFont.swift; sourceTree = ""; }; 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithWidthAndHeight.swift; sourceTree = ""; }; - 9748BE14289338A3006DF0BE /* Magician.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Magician.swift; sourceTree = ""; }; - 9748BE1728933E40006DF0BE /* MagicianHat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianHat.swift; sourceTree = ""; }; - 9748BE19289341BE006DF0BE /* MagicianFace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianFace.swift; sourceTree = ""; }; 9748BE1C289399CF006DF0BE /* SFAlphabet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SFAlphabet.swift; sourceTree = ""; }; 9748BE1F28939B04006DF0BE /* FlipType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlipType.swift; sourceTree = ""; }; 9748BE222893B35A006DF0BE /* WorldPeace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeace.swift; sourceTree = ""; }; @@ -222,17 +214,6 @@ path = ViewModifiers; sourceTree = ""; }; - 9748BE16289338C9006DF0BE /* Magician */ = { - isa = PBXGroup; - children = ( - 9748BE14289338A3006DF0BE /* Magician.swift */, - 9748BE1728933E40006DF0BE /* MagicianHat.swift */, - 9748BE19289341BE006DF0BE /* MagicianFace.swift */, - 971D9DE728C9497D00136A36 /* MagicianSunGlasses.swift */, - ); - path = Magician; - sourceTree = ""; - }; 9748BE1E28939AE5006DF0BE /* Enum */ = { isa = PBXGroup; children = ( @@ -343,7 +324,6 @@ 9748BE3D2897ADBD006DF0BE /* ArmHair */, 9748BE2A2893C406006DF0BE /* PartyAnimals */, 9748BE212893B2CD006DF0BE /* WorldPeace */, - 9748BE16289338C9006DF0BE /* Magician */, 97E11E402819720900B2AB32 /* CrayonBoy */, 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */, ); @@ -624,7 +604,6 @@ 9748BE372893D064006DF0BE /* PartyAnimals.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, - 971D9DE828C9497D00136A36 /* MagicianSunGlasses.swift in Sources */, 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, 97E11E33281971E200B2AB32 /* CrayonHair.swift in Sources */, @@ -634,7 +613,6 @@ 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */, 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */, 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */, - 9748BE15289338A3006DF0BE /* Magician.swift in Sources */, 9748BE3C2897AA28006DF0BE /* AnimalWhiskers.swift in Sources */, 97E11E35281971E200B2AB32 /* CrayonMouth.swift in Sources */, 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, @@ -662,7 +640,6 @@ 9748BE4328980C4D006DF0BE /* Hair.swift in Sources */, 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */, - 9748BE1828933E40006DF0BE /* MagicianHat.swift in Sources */, 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */, 9748BE2C2893C428006DF0BE /* Bear.swift in Sources */, @@ -681,7 +658,6 @@ 97E11E34281971E200B2AB32 /* CrayonFace.swift in Sources */, 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, - 9748BE1A289341BE006DF0BE /* MagicianFace.swift in Sources */, 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */, 9748BE4628981011006DF0BE /* DemonWrestler.swift in Sources */, 9748BE302893C706006DF0BE /* AnimalNose.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/Magician/Magician.swift b/SFSymbolsArtCollection/ArtWorks/Magician/Magician.swift deleted file mode 100644 index a1d2129..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Magician/Magician.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Magician.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct Magician: View { - var body: some View { - - GeometryReader { proxy in - - let baseLength = proxy.baseLength - - ZStack { - MagicianFace(baseLength: baseLength) - .offset(x: 0, y: baseLength * 0.125) - MagicianHat(baseLength: baseLength) - .offset(x: 0, y: baseLength * -0.375) - } - .position(proxy.localCenter) - } - } -} - -struct Magician_Previews: PreviewProvider { - static var previews: some View { - Magician() - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/Magician/MagicianFace.swift b/SFSymbolsArtCollection/ArtWorks/Magician/MagicianFace.swift deleted file mode 100644 index 9cd7e10..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Magician/MagicianFace.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// MagicianFace.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct MagicianFace: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - // Outline - Image(symbol: .dropFill) - .arrangeShape(color: .paleOrange, - fontSize: baseLength * 0.75, - flipType: .vertical) - - VStack { - // Eyebrows - HStack(spacing: 0) { - ForEach(0..<2) { _ in - Image(symbol: .chevronCompactUp) - .arrangeShape(fontSize: baseLength * 0.225, - fontWeight: .thin) - } - } - - Spacer() - .frame(height: 0) - - MagicianSunGlasses(baseLength: baseLength) - - // Nose - Image(symbol: .cloudHeavyrain) - .arrangeShape(fontSize: baseLength * 0.1625, - fontWeight: .light) - - // Mouse - ZStack { - - Image(symbol: .rectangleRoundedbottomFill) - .arrangeShape(color: .red, - width: baseLength * 0.15, - height: baseLength * 0.075) - - Image(symbol: .capsuleFill) - .arrangeShape(color: .orange, - width: baseLength * 0.145, - height: baseLength * 0.025, - offsetY: baseLength * 0.025) - } - } - } - } -} - -struct MagicianFace_Previews: PreviewProvider { - static var previews: some View { - MagicianFace(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/Magician/MagicianHat.swift b/SFSymbolsArtCollection/ArtWorks/Magician/MagicianHat.swift deleted file mode 100644 index bb32bb8..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Magician/MagicianHat.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// MagicianHat.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct MagicianHat: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - - Image(symbol: .rectangleFill) - .arrangeShape(color: .red, - width: baseLength * 0.435, - height: baseLength * 0.075, - flipType: .vertical, - offsetY: baseLength * 0.1) - - Image(symbol: .archiveboxFill) - .arrangeShape(fontSize: baseLength * 0.525, - flipType: .vertical) - - Image(symbol: .rectangleFill) - .arrangeShape(width: baseLength * 0.625, - height: baseLength * 0.125, - flipType: .vertical, - offsetY: baseLength * 0.1875) - } - } -} - -struct MagicianHat_Previews: PreviewProvider { - static var previews: some View { - MagicianHat(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/Magician/MagicianSunGlasses.swift b/SFSymbolsArtCollection/ArtWorks/Magician/MagicianSunGlasses.swift deleted file mode 100644 index 616c7a6..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Magician/MagicianSunGlasses.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// MagicianSunGlasses.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/08. -// - -import SwiftUI - -struct MagicianSunGlasses: View { - - let baseLength: CGFloat - - var body: some View { - - HStack(spacing: 0) { - - Image(symbol: .minus) - .arrangeShape(width: baseLength * 0.075, - height: baseLength * 0.0125) - - ZStack { - - Image(symbol: .circleFill) - .arrangeShape(color: .white, - fontSize: baseLength * 0.125) - - Image(symbol: .moonCircleFill) - .arrangeShape(fontSize: baseLength * 0.125) - - } - - Image(symbol: .minus) - .arrangeShape(width: baseLength * 0.075, - height: baseLength * 0.0125) - - ZStack { - - Image(symbol: .circleFill) - .arrangeShape(color: .white, - fontSize: baseLength * 0.125) - - Image(symbol: .moonCircleFill) - .arrangeShape(fontSize: baseLength * 0.125) - - } - - Image(symbol: .minus) - .arrangeShape(width: baseLength * 0.075, - height: baseLength * 0.0125) - } - } -} - -struct MagicianSunGlasses_Previews: PreviewProvider { - static var previews: some View { - MagicianSunGlasses(baseLength: 400) - } -} From 01dda732be78cda5ff0d8ba089c113577c098560 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 21:01:39 +0900 Subject: [PATCH 048/108] Add CrayonBoyArt --- .../project.pbxproj | 26 +- .../ArtWorks/ArtWorkView.swift | 2 +- .../ArtGalleryView.swift | 4 +- .../ArtWorks/CrayonBoy/CrayonBoyArtView.swift | 238 ++++++++++++++++++ .../CrayonBoy/CrayonBoyPreviewView.swift | 178 +++++++++++++ .../ImWearingPantsArtView.swift | 3 +- .../Common/Enums}/FlipType.swift | 2 +- .../Common/Models/AnimationValues.swift | 2 +- .../ArtComponentView/ArtComponentView.swift | 14 +- .../Extensions/Image+arrangeShape.swift | 34 +++ 10 files changed, 486 insertions(+), 17 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift rename SFSymbolsArtCollection/{Common/Enum => ArtisticWorldOfSFSymbols/Common/Enums}/FlipType.swift (93%) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Image+arrangeShape.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index c624ba0..618dbc2 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -78,6 +78,9 @@ 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43972B733337003648F5 /* MagicianArtView.swift */; }; 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */; }; 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439D2B744C4C003648F5 /* Color+.swift */; }; + 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43A02B74CA38003648F5 /* CrayonBoyPreviewView.swift */; }; + 97EF43A32B74D9BA003648F5 /* Image+arrangeShape.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43A22B74D9BA003648F5 /* Image+arrangeShape.swift */; }; + 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43A42B74F27D003648F5 /* CrayonBoyArtView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -153,6 +156,9 @@ 97EF43972B733337003648F5 /* MagicianArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianArtView.swift; sourceTree = ""; }; 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianPreviewView.swift; sourceTree = ""; }; 97EF439D2B744C4C003648F5 /* Color+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+.swift"; sourceTree = ""; }; + 97EF43A02B74CA38003648F5 /* CrayonBoyPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoyPreviewView.swift; sourceTree = ""; }; + 97EF43A22B74D9BA003648F5 /* Image+arrangeShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Image+arrangeShape.swift"; sourceTree = ""; }; + 97EF43A42B74F27D003648F5 /* CrayonBoyArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoyArtView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -180,7 +186,6 @@ isa = PBXGroup; children = ( 973B2CA228C2584F006ED5F0 /* ViewModifiers */, - 9748BE1E28939AE5006DF0BE /* Enum */, ); path = Common; sourceTree = ""; @@ -214,12 +219,12 @@ path = ViewModifiers; sourceTree = ""; }; - 9748BE1E28939AE5006DF0BE /* Enum */ = { + 9748BE1E28939AE5006DF0BE /* Enums */ = { isa = PBXGroup; children = ( 9748BE1F28939B04006DF0BE /* FlipType.swift */, ); - path = Enum; + path = Enums; sourceTree = ""; }; 9748BE212893B2CD006DF0BE /* WorldPeace */ = { @@ -355,6 +360,7 @@ 97AD530E2B70DDD10034FB5D /* Common */ = { isa = PBXGroup; children = ( + 9748BE1E28939AE5006DF0BE /* Enums */, 97AD53142B70DF8A0034FB5D /* Models */, 97AD53132B70DF5A0034FB5D /* Views */, ); @@ -384,6 +390,7 @@ isa = PBXGroup; children = ( 97EF43962B7332FB003648F5 /* Magician */, + 97EF439F2B74CA22003648F5 /* CrayonBoy */, 97AD531E2B70E2770034FB5D /* AfroBoy */, 97EF43892B725DE7003648F5 /* Nosebleed */, 97EF43912B72D3AF003648F5 /* ImWearingPants */, @@ -475,6 +482,7 @@ children = ( 97EF439D2B744C4C003648F5 /* Color+.swift */, 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */, + 97EF43A22B74D9BA003648F5 /* Image+arrangeShape.swift */, 97AD53112B70DEB60034FB5D /* UIDevice+.swift */, 97AD53192B70E0530034FB5D /* Font.Weight+.swift */, ); @@ -517,6 +525,15 @@ path = Magician; sourceTree = ""; }; + 97EF439F2B74CA22003648F5 /* CrayonBoy */ = { + isa = PBXGroup; + children = ( + 97EF43A42B74F27D003648F5 /* CrayonBoyArtView.swift */, + 97EF43A02B74CA38003648F5 /* CrayonBoyPreviewView.swift */, + ); + path = CrayonBoy; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -629,6 +646,7 @@ 97E11E3C281971ED00B2AB32 /* CrayonEye.swift in Sources */, 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, + 97EF43A32B74D9BA003648F5 /* Image+arrangeShape.swift in Sources */, 9748BE1D289399CF006DF0BE /* SFAlphabet.swift in Sources */, 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, @@ -649,10 +667,12 @@ 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */, 97E11E3B281971ED00B2AB32 /* CrayonEyes.swift in Sources */, 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */, + 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */, 9748BE352893CB67006DF0BE /* Lion.swift in Sources */, 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, 97AD53222B70E3FA0034FB5D /* ArtComponentView.swift in Sources */, 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, + 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */, 97E11E34281971E200B2AB32 /* CrayonFace.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift b/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift index 472def3..3b7c945 100644 --- a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift +++ b/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift @@ -17,7 +17,7 @@ struct ArtWorkView: View { case .crayonBoy: CrayonBoy() case .magician: - Magician() +EmptyView() case .worldPeace: WorldPeace() case .partyAnimals: diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index cf2b81c..f8964de 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -69,9 +69,9 @@ struct ArtGalleryView: View { } NavigationLink { - AfroBoyArtView() + CrayonBoyArtView() } label: { - AfroBoyPreviewView() + CrayonBoyPreviewView() .galleryGridItemView(length: model.galleryColumnLength) } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift new file mode 100644 index 0000000..aac7e52 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift @@ -0,0 +1,238 @@ +// +// CrayonBoyArtView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct CrayonBoyArtView: View { + + @Environment(ArtWorkModel.self) var model + @State private var isAnimating = false + + var body: some View { + + ZStack { + // MARK: - 􀇃 Outline + ArtComponentView( + name: "cloud.fill", + initialPosition: .second(.first), + primaryColor: .paleOrange, + fontWeight: .ultraLight, + widthRatio: 0.75, + heightRatio: 0.5, + rotationDegrees: 8, + flip: .horizontal, + isAnimating: isAnimating, + symbolCountToWaitFor: 0 + ) + + // MARK: - 􀀁 Hair top + ArtComponentView( + name: "circle.fill", + initialPosition: .second(.second), + widthRatio: 0.44, + heightRatio: 0.25, + horizontalOffsetRatio: 0.05, + verticalOffsetRatio: -0.125, + isAnimating: isAnimating, + symbolCountToWaitFor: 2 + ) + + // MARK: - 􀏄 Concealing part for hair + ArtComponentView( + name: "rectangle.fill", + initialPosition: .third(.fifth), + primaryColor: .paleOrange, + widthRatio: 0.4, + heightRatio: 0.25, + horizontalOffsetRatio: 0.033, + verticalOffsetRatio: -0.05, + isAnimating: isAnimating, + symbolCountToWaitFor: 3 + ) + + // MARK: - 􀆍 Eyebrow + ArtComponentView( + name: "control", + initialPosition: .third(.sixth), + fontWeight: .black, + widthRatio: 0.2, + heightRatio: 0.1, + rotationDegrees: 6, + horizontalOffsetRatio: -0.07, + verticalOffsetRatio: -0.14, + isAnimating: isAnimating, + symbolCountToWaitFor: 4 + ) + + ArtComponentView( + name: "control", + initialPosition: .third(.sixth), + fontWeight: .black, + widthRatio: 0.2, + heightRatio: 0.1, + rotationDegrees: 6, + horizontalOffsetRatio: 0.14, + verticalOffsetRatio: -0.12, + isAnimating: isAnimating, + symbolCountToWaitFor: 4 + ) + + // MARK: - 􀀀 Eyelid + ArtComponentView( + name: "circle", + initialPosition: .second(.third), + fontWeight: .ultraLight, + widthRatio: 0.17, + heightRatio: 0.16, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.01, + isAnimating: isAnimating, + symbolCountToWaitFor: 5 + ) + + ArtComponentView( + name: "circle", + initialPosition: .second(.third), + fontWeight: .ultraLight, + widthRatio: 0.17, + heightRatio: 0.16, + horizontalOffsetRatio: -0.08, + verticalOffsetRatio: -0.01, + isAnimating: isAnimating, + symbolCountToWaitFor: 5 + ) + + // MARK: - 􀏄 Concealing part for Eyelid + ArtComponentView( + name: "rectangle.fill", + initialPosition: .third(.fifth), + primaryColor: .paleOrange, + widthRatio: 0.2, + heightRatio: 0.16, + horizontalOffsetRatio: 0.13, + verticalOffsetRatio: 0.06, + isAnimating: isAnimating, + symbolCountToWaitFor: 6 + ) + + ArtComponentView( + name: "rectangle.fill", + initialPosition: .third(.fifth), + primaryColor: .paleOrange, + widthRatio: 0.2, + heightRatio: 0.16, + horizontalOffsetRatio: -0.08, + verticalOffsetRatio: 0.06, + isAnimating: isAnimating, + symbolCountToWaitFor: 6 + ) + + // MARK: - 􀢚 Eye + ArtComponentView( + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.seventh), + primaryColor: .white, + widthRatio: 0.14, + heightRatio: 0.14, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: 0.02, + isAnimating: isAnimating, + symbolCountToWaitFor: 7 + ) + + ArtComponentView( + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.seventh), + primaryColor: .white, + widthRatio: 0.14, + heightRatio: 0.14, + horizontalOffsetRatio: -0.06, + verticalOffsetRatio: 0.016, + isAnimating: isAnimating, + symbolCountToWaitFor: 7 + ) + + // MARK: - 􀇂 Outline frame + ArtComponentView( + name: "cloud", + initialPosition: .third(.first), + fontWeight: .ultraLight, + widthRatio: 0.75, + heightRatio: 0.5, + rotationDegrees: 8, + flip: .horizontal, + isAnimating: isAnimating, + symbolCountToWaitFor: 1 + ) + + // MARK: - 􀧷 Mouth + ArtComponentView( + name: "capsule.portrait.fill", + initialPosition: .third(.second), + primaryColor: .red, + fontWeight: .ultraLight, + widthRatio: 0.1, + heightRatio: 0.15, + rotationDegrees: 16, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: 0.225, + isAnimating: isAnimating, + symbolCountToWaitFor: 8 + ) + + // MARK: - 􀧶 Mouth frame + ArtComponentView( + name: "capsule.portrait", + initialPosition: .third(.third), + fontWeight: .ultraLight, + widthRatio: 0.1, + heightRatio: 0.15, + rotationDegrees: 16, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: 0.225, + isAnimating: isAnimating, + symbolCountToWaitFor: 8 + ) + + // MARK: - 􁹬 Sideburns + ArtComponentView( + name: "righttriangle.fill", + initialPosition: .third(.fourth), + widthRatio: 0.064, + heightRatio: 0.2, + rotationDegrees: 170, + flip: .horizontal, + horizontalOffsetRatio: 0.215, + verticalOffsetRatio: -0.07, + isAnimating: isAnimating, + symbolCountToWaitFor: 9 + ) + } + .navigationTitle("Crayon boy") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + } +} + +#Preview { + NavigationStack { + CrayonBoyArtView() + .environment(ArtWorkModel.preview) + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift new file mode 100644 index 0000000..baf984b --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift @@ -0,0 +1,178 @@ +// +// CrayonBoyPreviewView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct CrayonBoyPreviewView: View { + + @Environment(ArtWorkModel.self) var model + + var body: some View { + + ZStack { + // MARK: - 􀇃 Outline + Image(systemName: "cloud.fill") + .arrangeShape( + primaryColor: .paleOrange, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.75, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + rotationDegrees: 8, + flip: .horizontal + ) + + // MARK: - 􀀁 Hair top + Image(systemName: "circle.fill") + .arrangeShape( + width: model.calculatingProportionalValue(withRatio: 0.44, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true) + ) + + // MARK: - 􀏄 Concealing part for hair + Image(systemName: "rectangle.fill") + .arrangeShape( + primaryColor: .paleOrange, + width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.033, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.05, forPreview: true) + ) + + // MARK: - 􀆍 Eyebrow + Image(systemName: "control") + .arrangeShape( + fontWeight: .black, + width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + rotationDegrees: 6, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.14, forPreview: true) + ) + + Image(systemName: "control") + .arrangeShape( + fontWeight: .black, + width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + rotationDegrees: 6, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.12, forPreview: true) + ) + + // MARK: - 􀀀 Eyelid + Image(systemName: "circle") + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true) + ) + + Image(systemName: "circle") + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true) + ) + + // MARK: - 􀏄 Concealing part for Eyelid + Image(systemName: "rectangle.fill") + .arrangeShape( + primaryColor: .paleOrange, + width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true) + ) + + Image(systemName: "rectangle.fill") + .arrangeShape( + primaryColor: .paleOrange, + width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true) + ) + + // MARK: - 􀢚 Eye + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .black, + width: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true) + ) + + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .black, + width: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.06, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.016, forPreview: true) + ) + + // MARK: - 􀇂 Outline frame + Image(systemName: "cloud") + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.75, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + rotationDegrees: 8, + flip: .horizontal + ) + + // MARK: - 􀧷 Mouth + Image(systemName: "capsule.portrait.fill") + .arrangeShape( + primaryColor: .red, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.10, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + rotationDegrees: 16, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.225, forPreview: true) + ) + + // MARK: - 􀧶 Mouth frame + Image(systemName: "capsule.portrait") + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.10, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + rotationDegrees: 16, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.225, forPreview: true) + ) + + // MARK: - 􁹬 Sideburns + Image(systemName: "righttriangle.fill") + .arrangeShape( + width: model.calculatingProportionalValue(withRatio: 0.064, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + rotationDegrees: 170, + flip: .horizontal, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.215, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true) + ) + } + } +} + +#Preview { + CrayonBoyPreviewView() + .environment(ArtWorkModel.preview) +// .environment(ArtWorkModel.init(screenSize: .init(width: 4600, height: 4600))) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index 800933c..a431e5d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -417,8 +417,7 @@ struct ImWearingPantsArtView: View { fontWeight: .ultraLight, widthRatio: 0.045, heightRatio: 0.04, - rotationDegrees: 180, - rotationAxis: (x: 0, y: 1, z: 0), + flip: .horizontal, horizontalOffsetRatio: -0.03, verticalOffsetRatio: -0.408, isAnimating: isAnimating, diff --git a/SFSymbolsArtCollection/Common/Enum/FlipType.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Enums/FlipType.swift similarity index 93% rename from SFSymbolsArtCollection/Common/Enum/FlipType.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Enums/FlipType.swift index 710c3aa..c93c50c 100644 --- a/SFSymbolsArtCollection/Common/Enum/FlipType.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Enums/FlipType.swift @@ -2,7 +2,7 @@ // FlipType.swift // SFSymbolsArtCollection // -// Created by 平岡修 on 2022/07/29. +// Created by Lil Ossa // import CoreGraphics diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift index 701ec78..c40d8cc 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift @@ -17,7 +17,7 @@ struct AnimationValues { height: CGFloat, symbolNameVisibleValue: CGFloat = 1, rotationDegrees: CGFloat = 0, - rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) = (x: 0, y: 0, z: 1), + rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) = (x: 0, y: 0, z: 0), offsetX: CGFloat = 0, offsetY: CGFloat = 0 ) { diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift index 2135e8e..9ae7c12 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift @@ -20,7 +20,7 @@ struct ArtComponentView: View { widthRatio: CGFloat, heightRatio: CGFloat, rotationDegrees: CGFloat = 0, - rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) = (x: 0, y: 0, z: 1), + flip: FlipType = .none, horizontalOffsetRatio: CGFloat = 0, verticalOffsetRatio: CGFloat = 0, isAnimating: Bool, @@ -36,7 +36,7 @@ struct ArtComponentView: View { self.widthRatio = widthRatio self.heightRatio = heightRatio self.rotationDegrees = rotationDegrees - self.rotationAxis = rotationAxis + self.rotationAxis = flip.axis self.horizontalOffsetRatio = horizontalOffsetRatio self.verticalOffsetRatio = verticalOffsetRatio self.isAnimating = isAnimating @@ -124,11 +124,11 @@ struct ArtComponentView: View { width: value.width, height: value.height ) + .rotationEffect(.degrees(value.rotationDegrees)) + .rotation3DEffect(.degrees(180), + axis: value.rotationAxis, + anchorZ: 0) } - .rotation3DEffect( - .degrees(value.rotationDegrees), - axis: value.rotationAxis - ) .offset(value.offset) } keyframes: { value in @@ -193,7 +193,7 @@ struct ArtComponentView: View { #Preview { ArtComponentView( - name: "circle.fill", + name: "nose", initialPosition: .third(.first), primaryColor: .red, widthRatio: 1, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Image+arrangeShape.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Image+arrangeShape.swift new file mode 100644 index 0000000..b0cd9c8 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Image+arrangeShape.swift @@ -0,0 +1,34 @@ +// +// Image+arrangeShape.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension Image { + + func arrangeShape( + primaryColor: Color = .black, + secondaryColor: Color = .black, + fontWeight: Font.Weight = .regular, + width: CGFloat, + height: CGFloat, + rotationDegrees: CGFloat = 0, + flip: FlipType = .none, + horizontalOffset: CGFloat = 0, + verticalOffset: CGFloat = 0 + ) -> some View { + self + .resizable() + .foregroundStyle(primaryColor, secondaryColor) + .fontWeight(fontWeight) + .frame(width: width, height: height) + .rotationEffect(.degrees(rotationDegrees)) + .rotation3DEffect(.degrees(180), axis: flip.axis) + .offset(x: horizontalOffset, + y: verticalOffset) + } +} + From 2e14953757c74708213c8b4bd2dba5f87c599a11 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 21:02:19 +0900 Subject: [PATCH 049/108] Remove old CrayonBoy --- .../project.pbxproj | 52 ---------------- .../ArtWorks/CrayonBoy/CrayonBoy.swift | 56 ----------------- .../CrayonBoy/CrayonEye/CrayonEye.swift | 34 ----------- .../CrayonBoy/CrayonEye/CrayonEyeBall.swift | 31 ---------- .../CrayonBoy/CrayonEye/CrayonEyebrow.swift | 26 -------- .../CrayonBoy/CrayonEye/CrayonEyelid.swift | 34 ----------- .../CrayonBoy/CrayonEye/CrayonEyes.swift | 32 ---------- .../ArtWorks/CrayonBoy/CrayonFace.swift | 61 ------------------- .../ArtWorks/CrayonBoy/CrayonHair.swift | 33 ---------- .../ArtWorks/CrayonBoy/CrayonMouth.swift | 34 ----------- 10 files changed, 393 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonBoy.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEye.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyeBall.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyebrow.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyelid.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyes.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonFace.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonHair.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonMouth.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 618dbc2..863af95 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -61,15 +61,6 @@ 97E11D542817381200B2AB32 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97E11D532817381200B2AB32 /* Assets.xcassets */; }; 97E11D572817381200B2AB32 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97E11D562817381200B2AB32 /* Preview Assets.xcassets */; }; 97E11DF028176A0D00B2AB32 /* SFUserFriendlySymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 97E11DEF28176A0D00B2AB32 /* SFUserFriendlySymbols */; }; - 97E11E33281971E200B2AB32 /* CrayonHair.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E30281971E100B2AB32 /* CrayonHair.swift */; }; - 97E11E34281971E200B2AB32 /* CrayonFace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E31281971E200B2AB32 /* CrayonFace.swift */; }; - 97E11E35281971E200B2AB32 /* CrayonMouth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E32281971E200B2AB32 /* CrayonMouth.swift */; }; - 97E11E3B281971ED00B2AB32 /* CrayonEyes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E36281971EC00B2AB32 /* CrayonEyes.swift */; }; - 97E11E3C281971ED00B2AB32 /* CrayonEye.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E37281971EC00B2AB32 /* CrayonEye.swift */; }; - 97E11E3D281971ED00B2AB32 /* CrayonEyelid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E38281971ED00B2AB32 /* CrayonEyelid.swift */; }; - 97E11E3E281971ED00B2AB32 /* CrayonEyebrow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E39281971ED00B2AB32 /* CrayonEyebrow.swift */; }; - 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E3A281971ED00B2AB32 /* CrayonEyeBall.swift */; }; - 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11E452819734700B2AB32 /* CrayonBoy.swift */; }; 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */; }; 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */; }; 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */; }; @@ -139,15 +130,6 @@ 97E11D512817381100B2AB32 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 97E11D532817381200B2AB32 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97E11D562817381200B2AB32 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 97E11E30281971E100B2AB32 /* CrayonHair.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonHair.swift; sourceTree = ""; }; - 97E11E31281971E200B2AB32 /* CrayonFace.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonFace.swift; sourceTree = ""; }; - 97E11E32281971E200B2AB32 /* CrayonMouth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonMouth.swift; sourceTree = ""; }; - 97E11E36281971EC00B2AB32 /* CrayonEyes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyes.swift; sourceTree = ""; }; - 97E11E37281971EC00B2AB32 /* CrayonEye.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEye.swift; sourceTree = ""; }; - 97E11E38281971ED00B2AB32 /* CrayonEyelid.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyelid.swift; sourceTree = ""; }; - 97E11E39281971ED00B2AB32 /* CrayonEyebrow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyebrow.swift; sourceTree = ""; }; - 97E11E3A281971ED00B2AB32 /* CrayonEyeBall.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrayonEyeBall.swift; sourceTree = ""; }; - 97E11E452819734700B2AB32 /* CrayonBoy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoy.swift; sourceTree = ""; }; 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedArtView.swift; sourceTree = ""; }; 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArtWorkModel+InitialSymbolRow.swift"; sourceTree = ""; }; 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedPreviewView.swift; sourceTree = ""; }; @@ -198,18 +180,6 @@ path = Entity; sourceTree = ""; }; - 971D9DEC28C98BF900136A36 /* CrayonEye */ = { - isa = PBXGroup; - children = ( - 97E11E36281971EC00B2AB32 /* CrayonEyes.swift */, - 97E11E37281971EC00B2AB32 /* CrayonEye.swift */, - 97E11E3A281971ED00B2AB32 /* CrayonEyeBall.swift */, - 97E11E39281971ED00B2AB32 /* CrayonEyebrow.swift */, - 97E11E38281971ED00B2AB32 /* CrayonEyelid.swift */, - ); - path = CrayonEye; - sourceTree = ""; - }; 973B2CA228C2584F006ED5F0 /* ViewModifiers */ = { isa = PBXGroup; children = ( @@ -329,7 +299,6 @@ 9748BE3D2897ADBD006DF0BE /* ArmHair */, 9748BE2A2893C406006DF0BE /* PartyAnimals */, 9748BE212893B2CD006DF0BE /* WorldPeace */, - 97E11E402819720900B2AB32 /* CrayonBoy */, 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */, ); path = ArtWorks; @@ -465,18 +434,6 @@ path = "Preview Content"; sourceTree = ""; }; - 97E11E402819720900B2AB32 /* CrayonBoy */ = { - isa = PBXGroup; - children = ( - 97E11E452819734700B2AB32 /* CrayonBoy.swift */, - 97E11E31281971E200B2AB32 /* CrayonFace.swift */, - 97E11E30281971E100B2AB32 /* CrayonHair.swift */, - 97E11E32281971E200B2AB32 /* CrayonMouth.swift */, - 971D9DEC28C98BF900136A36 /* CrayonEye */, - ); - path = CrayonBoy; - sourceTree = ""; - }; 97E11E412819727A00B2AB32 /* Extensions */ = { isa = PBXGroup; children = ( @@ -623,7 +580,6 @@ 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, - 97E11E33281971E200B2AB32 /* CrayonHair.swift in Sources */, 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */, 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */, 9748BE3A2893D0E3006DF0BE /* Frog.swift in Sources */, @@ -631,19 +587,15 @@ 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */, 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */, 9748BE3C2897AA28006DF0BE /* AnimalWhiskers.swift in Sources */, - 97E11E35281971E200B2AB32 /* CrayonMouth.swift in Sources */, 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, 9748BE6428A3936E006DF0BE /* ArtWorkView.swift in Sources */, - 97E11E3D281971ED00B2AB32 /* CrayonEyelid.swift in Sources */, 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */, 97624C3C28C935F0004E1720 /* FiveCharactersView.swift in Sources */, 9748BE292893BFE3006DF0BE /* Earth.swift in Sources */, - 97E11E3E281971ED00B2AB32 /* CrayonEyebrow.swift in Sources */, 9748BE5F289F194E006DF0BE /* RocketFirework.swift in Sources */, 9748BE2E2893C688006DF0BE /* AnimalOutline.swift in Sources */, 9748BE322893C91F006DF0BE /* AnimalEye.swift in Sources */, 9748BE59289DCE17006DF0BE /* Fireworks.swift in Sources */, - 97E11E3C281971ED00B2AB32 /* CrayonEye.swift in Sources */, 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, 97EF43A32B74D9BA003648F5 /* Image+arrangeShape.swift in Sources */, @@ -659,13 +611,10 @@ 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */, 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, - 97E11E3F281971ED00B2AB32 /* CrayonEyeBall.swift in Sources */, 9748BE2C2893C428006DF0BE /* Bear.swift in Sources */, 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */, 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */, 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */, - 97E11E462819734700B2AB32 /* CrayonBoy.swift in Sources */, - 97E11E3B281971ED00B2AB32 /* CrayonEyes.swift in Sources */, 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */, 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */, 9748BE352893CB67006DF0BE /* Lion.swift in Sources */, @@ -675,7 +624,6 @@ 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */, - 97E11E34281971E200B2AB32 /* CrayonFace.swift in Sources */, 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonBoy.swift b/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonBoy.swift deleted file mode 100644 index 29e5b06..0000000 --- a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonBoy.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// CrayonBoy.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/04/27. -// - -import SwiftUI - -struct CrayonBoy: View { - - var body: some View { - - GeometryReader { proxy in - - let baseLength = proxy.baseLength - - ZStack { - CrayonFace(faceType: .fill, - baseLength: baseLength) - - CrayonHair(baseLength: baseLength) - .offset(x: baseLength * 0.025, - y: baseLength * -0.125) - - Group { - CrayonEye(baseLength: baseLength) - .offset(x: baseLength * -0.0625, - y: 0) - - CrayonEye(baseLength: baseLength) - .offset(x: baseLength * 0.125, - y: 0) - - } - .rotationEffect(.radians(0.1)) - - CrayonFace(faceType: .line, - baseLength: baseLength) - - - CrayonMouth(baseLength: baseLength) - .offset(x: baseLength * -0.075, - y: baseLength * 0.225) - - } - .position(proxy.localCenter) - } - } -} - -struct CrayonBoy_Previews: PreviewProvider { - static var previews: some View { - CrayonBoy() - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEye.swift b/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEye.swift deleted file mode 100644 index 9b1fe80..0000000 --- a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEye.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// CrayonEye.swift -// CrayonShinchan -// -// Created by 平岡修 on 2022/02/23. -// - -import SwiftUI - -struct CrayonEye: View { - - let baseLength: CGFloat - - var body: some View { - - ZStack { - CrayonEyebrow(baseLength: baseLength) - .offset(x: 0, - y: baseLength * -0.125) - - CrayonEyelid(baseLength: baseLength) - - CrayonEyeBall(baseLength: baseLength) - .offset(x: baseLength * -0.0075, - y: baseLength * 0.025) - } - } -} - -struct CrayonEye_Previews: PreviewProvider { - static var previews: some View { - CrayonEye(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyeBall.swift b/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyeBall.swift deleted file mode 100644 index bc65387..0000000 --- a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyeBall.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// CrayonEyeBall.swift -// CrayonShinchan -// -// Created by 平岡修 on 2022/02/23. -// - -import SwiftUI - -struct CrayonEyeBall: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - - Image(symbol: .circleFill) - .arrangeShape(fontSize: baseLength * 0.125) - - Image(symbol: .circleFill) - .arrangeShape(color: .white, - fontSize: baseLength * 0.05) - } - } -} - -struct CrayonEyeBall_Previews: PreviewProvider { - static var previews: some View { - CrayonEyeBall(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyebrow.swift b/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyebrow.swift deleted file mode 100644 index b07d5c8..0000000 --- a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyebrow.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// CrayonEyebrow.swift -// CrayonShinchan -// -// Created by 平岡修 on 2022/02/23. -// - -import SwiftUI - -struct CrayonEyebrow: View { - - let baseLength: CGFloat - - var body: some View { - - Image(symbol: .control) - .arrangeShape(fontSize: baseLength * 0.2, - fontWeight: .black) - } -} - -struct CrayonEyebrow_Previews: PreviewProvider { - static var previews: some View { - CrayonEyebrow(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyelid.swift b/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyelid.swift deleted file mode 100644 index d1d0a84..0000000 --- a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyelid.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// CrayonEyelid.swift -// CrayonShinchan -// -// Created by 平岡修 on 2022/02/23. -// - -import SwiftUI - -struct CrayonEyelid: View { - - let baseLength: CGFloat - - var body: some View { - - ZStack { - Image(symbol: .circle) - .arrangeShape(fontSize: baseLength * 0.15, - fontWeight: .ultraLight) - - Image(symbol: .rectangleFill) - .arrangeShape(color: .paleOrange, - fontSize: baseLength * 0.15, - fontWeight: .ultraLight, - offsetY: baseLength * 0.05) - } - } -} - -struct CrayonEyelid_Previews: PreviewProvider { - static var previews: some View { - CrayonEyelid(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyes.swift b/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyes.swift deleted file mode 100644 index e9fa169..0000000 --- a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonEye/CrayonEyes.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CrayonEyes.swift -// CrayonShinchan -// -// Created by 平岡修 on 2022/02/23. -// - -import SwiftUI - -struct CrayonEyes: View { - - let baseLength: CGFloat - - var body: some View { - HStack(spacing: 0) { - Spacer() - - CrayonEye(baseLength: baseLength) - - CrayonEye(baseLength: baseLength) - - Spacer() - } - .rotationEffect(.radians(0.1)) - } -} - -struct CrayonEyes_Previews: PreviewProvider { - static var previews: some View { - CrayonEyes(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonFace.swift b/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonFace.swift deleted file mode 100644 index 1c0f37e..0000000 --- a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonFace.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// CrayonFace.swift -// CrayonShinchan -// -// Created by littleossa on 2022/02/23. -// - -import SwiftUI -import SFUserFriendlySymbols - -struct CrayonFace: View { - - enum FaceType: String { - case line - case fill - - var symbol: SFSymbols { - switch self { - case .line: - return .cloud - case .fill: - return .cloudFill - } - } - - var color: Color { - switch self { - case .line: - return .black - case .fill: - return .paleOrange - } - } - } - - let faceType: FaceType - let baseLength: CGFloat - - var body: some View { - - Image(symbol: faceType.symbol) - .arrangeShape(color: faceType.color, - width: baseLength * 0.75, - height: baseLength * 0.5, - fontWeight: .ultraLight, - flipType: .horizontal, - rotationDegrees: 8) - } -} - -struct CrayonFace_Previews: PreviewProvider { - static var previews: some View { - - ZStack { - CrayonFace(faceType: .fill, - baseLength: 400) - CrayonFace(faceType: .line, - baseLength: 400) - } - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonHair.swift b/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonHair.swift deleted file mode 100644 index 722c9c7..0000000 --- a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonHair.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// CrayonHair.swift -// CrayonShinchan -// -// Created by 平岡修 on 2022/02/23. -// - -import SwiftUI - -struct CrayonHair: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - Image(symbol: .circleFill) - .arrangeShape(width: baseLength * 0.375, - height: baseLength * 0.25) - - Image(symbol: .rectangleFill) - .arrangeShape(color: .paleOrange, - width: baseLength * 0.375, - height: baseLength * 0.25, - offsetY: baseLength * 0.075) - } - } -} - -struct CrayonHair_Previews: PreviewProvider { - static var previews: some View { - CrayonHair(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonMouth.swift b/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonMouth.swift deleted file mode 100644 index 3f5bcb9..0000000 --- a/SFSymbolsArtCollection/ArtWorks/CrayonBoy/CrayonMouth.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// CrayonMouse.swift -// CrayonShinchan -// -// Created by 平岡修 on 2022/02/23. -// - -import SwiftUI - -struct CrayonMouth: View { - - let baseLength: CGFloat - - var body: some View { - - ZStack { - Image(symbol: .capsulePortraitFill) - .arrangeShape(color: .red, - width: baseLength * 0.105, - height: baseLength * 0.15, fontWeight: .ultraLight) - - Image(symbol: .capsulePortrait) - .arrangeShape(width: baseLength * 0.105, - height: baseLength * 0.15, fontWeight: .ultraLight) - } - .rotationEffect(.degrees(10)) - } -} - -struct CrayonMouth_Previews: PreviewProvider { - static var previews: some View { - CrayonMouth(baseLength: 400) - } -} From 7df682d8cd2c0ba2d3b7d253e995517efb3fbfe4 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 21:04:53 +0900 Subject: [PATCH 050/108] Rename ArtComponentView into AnimatableSymbolView --- .../project.pbxproj | 14 +++--- .../ArtWorks/ArtWorkView.swift | 2 +- .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 8 ++-- .../ArtWorks/CrayonBoy/CrayonBoyArtView.swift | 30 ++++++------ .../ImWearingPantsArtView.swift | 46 +++++++++---------- .../ArtWorks/Magician/MagicianArtView.swift | 28 +++++------ .../ArtWorks/Nosebleed/NosebleedArtView.swift | 28 +++++------ .../AnimatableSymbolView.swift} | 6 +-- .../SymbolNameFrameView.swift | 0 9 files changed, 81 insertions(+), 81 deletions(-) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/{ArtComponentView/ArtComponentView.swift => AnimatableSymbolView/AnimatableSymbolView.swift} (98%) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/{ArtComponentView => AnimatableSymbolView}/SymbolNameFrameView.swift (100%) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 863af95..a86ff30 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -48,7 +48,7 @@ 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53172B70DFF30034FB5D /* AnimationValues.swift */; }; 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53192B70E0530034FB5D /* Font.Weight+.swift */; }; - 97AD53222B70E3FA0034FB5D /* ArtComponentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */; }; + 97AD53222B70E3FA0034FB5D /* AnimatableSymbolView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53212B70E3FA0034FB5D /* AnimatableSymbolView.swift */; }; 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53232B70E48F0034FB5D /* PlayButton.swift */; }; 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53282B7100670034FB5D /* ArtWorkModel.swift */; }; 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */; }; @@ -117,7 +117,7 @@ 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; 97AD53172B70DFF30034FB5D /* AnimationValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationValues.swift; sourceTree = ""; }; 97AD53192B70E0530034FB5D /* Font.Weight+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font.Weight+.swift"; sourceTree = ""; }; - 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtComponentView.swift; sourceTree = ""; }; + 97AD53212B70E3FA0034FB5D /* AnimatableSymbolView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatableSymbolView.swift; sourceTree = ""; }; 97AD53232B70E48F0034FB5D /* PlayButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayButton.swift; sourceTree = ""; }; 97AD53282B7100670034FB5D /* ArtWorkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtWorkModel.swift; sourceTree = ""; }; 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AfroBoyArtView.swift; sourceTree = ""; }; @@ -339,7 +339,7 @@ 97AD53132B70DF5A0034FB5D /* Views */ = { isa = PBXGroup; children = ( - 97AD53252B70E4DA0034FB5D /* ArtComponentView */, + 97AD53252B70E4DA0034FB5D /* AnimatableSymbolView */, 97AD53302B71A5130034FB5D /* GalleryGridView.swift */, 97AD53232B70E48F0034FB5D /* PlayButton.swift */, ); @@ -376,13 +376,13 @@ path = AfroBoy; sourceTree = ""; }; - 97AD53252B70E4DA0034FB5D /* ArtComponentView */ = { + 97AD53252B70E4DA0034FB5D /* AnimatableSymbolView */ = { isa = PBXGroup; children = ( - 97AD53212B70E3FA0034FB5D /* ArtComponentView.swift */, + 97AD53212B70E3FA0034FB5D /* AnimatableSymbolView.swift */, 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, ); - path = ArtComponentView; + path = AnimatableSymbolView; sourceTree = ""; }; 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */ = { @@ -619,7 +619,7 @@ 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */, 9748BE352893CB67006DF0BE /* Lion.swift in Sources */, 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, - 97AD53222B70E3FA0034FB5D /* ArtComponentView.swift in Sources */, + 97AD53222B70E3FA0034FB5D /* AnimatableSymbolView.swift in Sources */, 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift b/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift index 3b7c945..1f5e4a2 100644 --- a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift +++ b/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift @@ -15,7 +15,7 @@ struct ArtWorkView: View { switch artwork { case .crayonBoy: - CrayonBoy() + EmptyView() case .magician: EmptyView() case .worldPeace: diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift index 0830ad0..c44ae3f 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -16,7 +16,7 @@ struct AfroBoyArtView: View { ZStack { // MARK: - 􁝰 Hair - ArtComponentView( + AnimatableSymbolView( name: "tree.fill", initialPosition: .third(.first), widthRatio: 0.9, @@ -26,7 +26,7 @@ struct AfroBoyArtView: View { ) // MARK: - 􀙧 Contour - ArtComponentView( + AnimatableSymbolView( name: "shield.fill", initialPosition: .third(.second), primaryColor: .paleOrange, @@ -38,7 +38,7 @@ struct AfroBoyArtView: View { ) // MARK: - 􀎽 Face - ArtComponentView( + AnimatableSymbolView( name: "faceid", initialPosition: .third(.third), secondaryColor: .paleOrange, @@ -50,7 +50,7 @@ struct AfroBoyArtView: View { ) // MARK: - 􀦉 Comb - ArtComponentView( + AnimatableSymbolView( name: "comb.fill", initialPosition: .third(.fourth), primaryColor: .red, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift index aac7e52..f03503c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift @@ -16,7 +16,7 @@ struct CrayonBoyArtView: View { ZStack { // MARK: - 􀇃 Outline - ArtComponentView( + AnimatableSymbolView( name: "cloud.fill", initialPosition: .second(.first), primaryColor: .paleOrange, @@ -30,7 +30,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􀀁 Hair top - ArtComponentView( + AnimatableSymbolView( name: "circle.fill", initialPosition: .second(.second), widthRatio: 0.44, @@ -42,7 +42,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􀏄 Concealing part for hair - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .third(.fifth), primaryColor: .paleOrange, @@ -55,7 +55,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􀆍 Eyebrow - ArtComponentView( + AnimatableSymbolView( name: "control", initialPosition: .third(.sixth), fontWeight: .black, @@ -68,7 +68,7 @@ struct CrayonBoyArtView: View { symbolCountToWaitFor: 4 ) - ArtComponentView( + AnimatableSymbolView( name: "control", initialPosition: .third(.sixth), fontWeight: .black, @@ -82,7 +82,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􀀀 Eyelid - ArtComponentView( + AnimatableSymbolView( name: "circle", initialPosition: .second(.third), fontWeight: .ultraLight, @@ -94,7 +94,7 @@ struct CrayonBoyArtView: View { symbolCountToWaitFor: 5 ) - ArtComponentView( + AnimatableSymbolView( name: "circle", initialPosition: .second(.third), fontWeight: .ultraLight, @@ -107,7 +107,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􀏄 Concealing part for Eyelid - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .third(.fifth), primaryColor: .paleOrange, @@ -119,7 +119,7 @@ struct CrayonBoyArtView: View { symbolCountToWaitFor: 6 ) - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .third(.fifth), primaryColor: .paleOrange, @@ -132,7 +132,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􀢚 Eye - ArtComponentView( + AnimatableSymbolView( name: "record.circle.fill", initialPrimaryColor: .systemBackground, initialPosition: .third(.seventh), @@ -145,7 +145,7 @@ struct CrayonBoyArtView: View { symbolCountToWaitFor: 7 ) - ArtComponentView( + AnimatableSymbolView( name: "record.circle.fill", initialPrimaryColor: .systemBackground, initialPosition: .third(.seventh), @@ -159,7 +159,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􀇂 Outline frame - ArtComponentView( + AnimatableSymbolView( name: "cloud", initialPosition: .third(.first), fontWeight: .ultraLight, @@ -172,7 +172,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􀧷 Mouth - ArtComponentView( + AnimatableSymbolView( name: "capsule.portrait.fill", initialPosition: .third(.second), primaryColor: .red, @@ -187,7 +187,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􀧶 Mouth frame - ArtComponentView( + AnimatableSymbolView( name: "capsule.portrait", initialPosition: .third(.third), fontWeight: .ultraLight, @@ -201,7 +201,7 @@ struct CrayonBoyArtView: View { ) // MARK: - 􁹬 Sideburns - ArtComponentView( + AnimatableSymbolView( name: "righttriangle.fill", initialPosition: .third(.fourth), widthRatio: 0.064, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index a431e5d..950f442 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -64,7 +64,7 @@ struct ImWearingPantsArtView: View { ZStack { // MARK: - Current pose - ArtComponentView( + AnimatableSymbolView( name: currentPose.rawValue, initialPosition: .third(.second), primaryColor: .yellow, @@ -77,7 +77,7 @@ struct ImWearingPantsArtView: View { .offset(x: model.calculatingProportionalValue(withRatio: currentPose.offsetXRatio)) // MARK: - 􁉨 Pants - ArtComponentView( + AnimatableSymbolView( name: "parkingsign.steeringwheel", initialPosition: .third(.first), primaryColor: .palePink, @@ -323,7 +323,7 @@ struct ImWearingPantsArtView: View { } // MARK: - 􀑪 Music - ArtComponentView( + AnimatableSymbolView( name: "music.note", initialPosition: .second(.first), widthRatio: 0.1, @@ -336,7 +336,7 @@ struct ImWearingPantsArtView: View { .symbolEffect(.bounce, value: musicCount) // MARK: - 􀫀 Music 3 - ArtComponentView( + AnimatableSymbolView( name: "music.quarternote.3", initialPosition: .second(.second), widthRatio: 0.2, @@ -349,7 +349,7 @@ struct ImWearingPantsArtView: View { .symbolEffect(.bounce, value: musicCount) // MARK: - 􀀁 Face background - ArtComponentView( + AnimatableSymbolView( name: "circle.fill", initialPosition: .second(.third), primaryColor: .systemBackground, @@ -361,7 +361,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀧷 Contour - ArtComponentView( + AnimatableSymbolView( name: "capsule.portrait.fill", initialPosition: .second(.fourth), primaryColor: .yellow, @@ -374,7 +374,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀧷 Contour bottom - ArtComponentView( + AnimatableSymbolView( name: "capsule.portrait.fill", initialPosition: .second(.fourth), primaryColor: .yellow, @@ -386,7 +386,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀨯 nose - ArtComponentView( + AnimatableSymbolView( name: "nose", initialPosition: .second(.fifth), fontWeight: .ultraLight, @@ -398,7 +398,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀦭 Right eyebrow - ArtComponentView( + AnimatableSymbolView( name: "eyebrow", initialPosition: .second(.sixth), fontWeight: .ultraLight, @@ -411,7 +411,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀦭 Left eyebrow - ArtComponentView( + AnimatableSymbolView( name: "eyebrow", initialPosition: .second(.sixth), fontWeight: .ultraLight, @@ -425,7 +425,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀧷 Concealing part for eyebrow - ArtComponentView( + AnimatableSymbolView( name: "capsule.portrait.fill", initialPosition: .second(.fourth), primaryColor: .yellow, @@ -438,7 +438,7 @@ struct ImWearingPantsArtView: View { symbolCountToWaitFor: 2 ) - ArtComponentView( + AnimatableSymbolView( name: "capsule.portrait.fill", initialPosition: .second(.fourth), primaryColor: .yellow, @@ -452,7 +452,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀋭 Right eye - ArtComponentView( + AnimatableSymbolView( name: "eye", initialPosition: .second(.seventh), fontWeight: .ultraLight, @@ -465,7 +465,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀋭 Left eye - ArtComponentView( + AnimatableSymbolView( name: "eye", initialPosition: .second(.seventh), fontWeight: .ultraLight, @@ -478,7 +478,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀋮 Right eye.fill - ArtComponentView( + AnimatableSymbolView( name: "eye.fill", initialPosition: .third(.seventh), primaryColor: .white, @@ -491,7 +491,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀋮 Left eye.fill - ArtComponentView( + AnimatableSymbolView( name: "eye.fill", initialPosition: .third(.seventh), primaryColor: .white, @@ -504,7 +504,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀦪 Mouth - ArtComponentView( + AnimatableSymbolView( name: "mouth.fill", initialPosition: .third(.third), primaryColor: .red, @@ -515,7 +515,7 @@ struct ImWearingPantsArtView: View { symbolCountToWaitFor: 6 ) - ArtComponentView( + AnimatableSymbolView( name: "mouth.fill", initialPosition: .third(.third), primaryColor: .red, @@ -527,7 +527,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􁒀 Teeth - ArtComponentView( + AnimatableSymbolView( name: "window.casement.closed", initialSecondaryColor: .clear, initialPosition: .third(.fourth), @@ -542,7 +542,7 @@ struct ImWearingPantsArtView: View { symbolCountToWaitFor: 7 ) - ArtComponentView( + AnimatableSymbolView( name: "window.casement.closed", initialSecondaryColor: .clear, initialPosition: .third(.fourth), @@ -558,7 +558,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀲟 Hair - ArtComponentView( + AnimatableSymbolView( name: "oval.fill", initialPosition: .third(.fifth), fontWeight: .ultraLight, @@ -571,7 +571,7 @@ struct ImWearingPantsArtView: View { ) // MARK: - 􀠒 Hair - ArtComponentView( + AnimatableSymbolView( name: "drop.fill", initialPosition: .third(.sixth), fontWeight: .ultraLight, @@ -584,7 +584,7 @@ struct ImWearingPantsArtView: View { symbolCountToWaitFor: 9 ) - ArtComponentView( + AnimatableSymbolView( name: "drop.fill", initialPosition: .third(.sixth), fontWeight: .ultraLight, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift index 2a8ed50..e3284eb 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift @@ -16,7 +16,7 @@ struct MagicianArtView: View { ZStack { // MARK: - 􀠒 Outline - ArtComponentView( + AnimatableSymbolView( name: "drop.fill", initialPosition: .second(.first), primaryColor: .paleOrange, @@ -29,7 +29,7 @@ struct MagicianArtView: View { ) // MARK: - 􀏄 Hat band - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .second(.second), primaryColor: .red, @@ -42,7 +42,7 @@ struct MagicianArtView: View { ) // MARK: - 􀈮 Hat - ArtComponentView( + AnimatableSymbolView( name: "archivebox.fill", initialPosition: .third(.first), widthRatio: 0.525, @@ -54,7 +54,7 @@ struct MagicianArtView: View { ) // MARK: - 􀏄 Hat brim - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .second(.second), widthRatio: 0.625, @@ -65,7 +65,7 @@ struct MagicianArtView: View { ) // MARK: - 􀆐 Eyebrow - ArtComponentView( + AnimatableSymbolView( name: "chevron.compact.up", initialPosition: .third(.second), fontWeight: .thin, @@ -77,7 +77,7 @@ struct MagicianArtView: View { symbolCountToWaitFor: 4 ) - ArtComponentView( + AnimatableSymbolView( name: "chevron.compact.up", initialPosition: .third(.second), fontWeight: .thin, @@ -90,7 +90,7 @@ struct MagicianArtView: View { ) // MARK: - 􀅽 Sunglasses frame - ArtComponentView( + AnimatableSymbolView( name: "minus", initialPosition: .third(.third), fontWeight: .thin, @@ -101,7 +101,7 @@ struct MagicianArtView: View { symbolCountToWaitFor: 5 ) - ArtComponentView( + AnimatableSymbolView( name: "minus", initialPosition: .third(.third), fontWeight: .thin, @@ -113,7 +113,7 @@ struct MagicianArtView: View { symbolCountToWaitFor: 5 ) - ArtComponentView( + AnimatableSymbolView( name: "minus", initialPosition: .third(.third), fontWeight: .thin, @@ -126,7 +126,7 @@ struct MagicianArtView: View { ) // MARK: - 􀆼 Sunglasses lens - ArtComponentView( + AnimatableSymbolView( name: "moon.circle.fill", initialPrimaryColor: .white, initialPosition: .third(.fourth), @@ -139,7 +139,7 @@ struct MagicianArtView: View { symbolCountToWaitFor: 6 ) - ArtComponentView( + AnimatableSymbolView( name: "moon.circle.fill", initialPrimaryColor: .white, initialPosition: .third(.fourth), @@ -153,7 +153,7 @@ struct MagicianArtView: View { ) // MARK: - 􀇈 Nose - ArtComponentView( + AnimatableSymbolView( name: "cloud.heavyrain", initialPosition: .third(.fifth), fontWeight: .light, @@ -166,7 +166,7 @@ struct MagicianArtView: View { ) // MARK: - 􀩻 Inside mouth - ArtComponentView( + AnimatableSymbolView( name: "button.roundedbottom.horizontal.fill", initialPosition: .third(.sixth), primaryColor: .red, @@ -179,7 +179,7 @@ struct MagicianArtView: View { ) // MARK: - 􀝷 Tongue capsule.fill - ArtComponentView( + AnimatableSymbolView( name: "capsule.fill", initialPosition: .third(.seventh), primaryColor: .orange, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift index c378257..e5d996a 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -18,7 +18,7 @@ struct NosebleedArtView: View { ZStack { // MARK: - 􀀁 Contour - ArtComponentView( + AnimatableSymbolView( name: "circle.fill", initialPosition: .third(.first), primaryColor: .awesomeYellow, @@ -29,7 +29,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀭧 Nosebleed bottom - ArtComponentView( + AnimatableSymbolView( name: "cellularbars", initialPosition: .third(.second), primaryColor: .red, @@ -46,7 +46,7 @@ struct NosebleedArtView: View { isActive: isEffectActivated) // MARK: - 􀏄 Concealing part for nosebleed bottom - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .third(.third), primaryColor: .awesomeYellow, @@ -59,7 +59,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀓩 Mouth - ArtComponentView( + AnimatableSymbolView( name: "lasso", initialPosition: .third(.fourth), fontWeight: .ultraLight, @@ -73,7 +73,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀏄 Concealing part for Mouth - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .third(.third), primaryColor: .awesomeYellow, @@ -86,7 +86,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀭧 Nosebleed top - ArtComponentView( + AnimatableSymbolView( name: "cellularbars", initialPosition: .third(.second), primaryColor: .red, @@ -103,7 +103,7 @@ struct NosebleedArtView: View { isActive: isEffectActivated) // MARK: - 􀏄 Concealing part for nosebleed top right - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .third(.third), primaryColor: .awesomeYellow, @@ -116,7 +116,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀏄 Concealing part for nosebleed top left - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .third(.third), primaryColor: .awesomeYellow, @@ -129,7 +129,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀀁 Right eye - ArtComponentView( + AnimatableSymbolView( name: "circle.fill", initialPosition: .third(.first), widthRatio: 0.06, @@ -141,7 +141,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀀁 Left eye - ArtComponentView( + AnimatableSymbolView( name: "circle.fill", initialPosition: .third(.first), widthRatio: 0.06, @@ -153,7 +153,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀥨 Tissue - ArtComponentView( + AnimatableSymbolView( name: "doc.plaintext.fill", initialPosition: .third(.fifth), primaryColor: .white, @@ -168,7 +168,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀉆 Tissue frame - ArtComponentView( + AnimatableSymbolView( name: "doc.plaintext", initialPosition: .third(.sixth), fontWeight: .light, @@ -182,7 +182,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀥰 Nose - ArtComponentView( + AnimatableSymbolView( name: "triangleshape", initialPosition: .third(.seventh), fontWeight: .light, @@ -196,7 +196,7 @@ struct NosebleedArtView: View { ) // MARK: - 􀏄 Concealing part for nose - ArtComponentView( + AnimatableSymbolView( name: "rectangle.fill", initialPosition: .third(.third), primaryColor: .awesomeYellow, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift similarity index 98% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift index 9ae7c12..f23f304 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/ArtComponentView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift @@ -1,5 +1,5 @@ // -// ArtComponentView.swift +// AnimatableSymbolView.swift // SFSymbolsArtCollection // // Created by Lil Ossa @@ -7,7 +7,7 @@ import SwiftUI -struct ArtComponentView: View { +struct AnimatableSymbolView: View { init( name: String, @@ -192,7 +192,7 @@ struct ArtComponentView: View { } #Preview { - ArtComponentView( + AnimatableSymbolView( name: "nose", initialPosition: .third(.first), primaryColor: .red, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/SymbolNameFrameView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolNameFrameView.swift similarity index 100% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/ArtComponentView/SymbolNameFrameView.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolNameFrameView.swift From 29feddd05bcec4df93f34c8111276e6846ac0c88 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 21:10:08 +0900 Subject: [PATCH 051/108] Refactor AfroBoyPreview --- .../ArtWorks/AfroBoy/AfroBoyPreviewView.swift | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift index db475ec..534e89d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift @@ -17,35 +17,39 @@ struct AfroBoyPreviewView: View { // MARK: - 􁝰 Hair Image(systemName: "tree.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.9, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.9, forPreview: true)) + .arrangeShape( + width: model.calculatingProportionalValue(withRatio: 0.9, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.9, forPreview: true) + ) // MARK: - 􀙧 Contour Image(systemName: "shield.fill") - .resizable() - .foregroundStyle(.paleOrange) - .frame(width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.6, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true)) + .arrangeShape( + primaryColor: .paleOrange, + width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.6, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) + ) // MARK: - 􀎽 Face Image(systemName: "faceid") - .resizable() - .foregroundStyle(.black, .paleOrange) - .frame(width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true)) + .arrangeShape( + primaryColor: .black, + secondaryColor: .paleOrange, + width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true) + ) // MARK: - 􀦉 Comb Image(systemName: "comb.fill") - .resizable() - .foregroundStyle(.red) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true)) + .arrangeShape( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true) + ) } } } From e18eff1b4a0253d435ca08dba54776d54d79d9e5 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 21:23:27 +0900 Subject: [PATCH 052/108] Refactor MagicianPreview --- .../Magician/MagicianPreviewView.swift | 211 ++++++++---------- 1 file changed, 96 insertions(+), 115 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift index 8ed1f90..16ea12e 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift @@ -16,154 +16,135 @@ struct MagicianPreviewView: View { // MARK: - 􀠒 Outline Image(systemName: "drop.fill") - .resizable() - .foregroundStyle(.paleOrange) - .frame(width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.75, forPreview: true)) - .rotationEffect(.degrees(180)) - .offset(y: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) + .arrangeShape( + primaryColor: .paleOrange, + width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.75, forPreview: true), + rotationDegrees: 180, + verticalOffset: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true) + ) // MARK: - 􀏄 Hat band Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.red) - .frame(width: model.calculatingProportionalValue(withRatio: 0.446, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.15, forPreview: true)) + .arrangeShape( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.446, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.15, forPreview: true) + ) // MARK: - 􀈮 Hat Image(systemName: "archivebox.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.525, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.525, forPreview: true)) - .rotationEffect(.degrees(180)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.25, forPreview: true)) + .arrangeShape( + width: model.calculatingProportionalValue(withRatio: 0.525, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.525, forPreview: true), + rotationDegrees: 180, + verticalOffset: model.calculatingProportionalValue(withRatio: -0.25, forPreview: true) + ) // MARK: - 􀏄 Hat brim Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.625, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.05, forPreview: true)) + .arrangeShape( + width: model.calculatingProportionalValue(withRatio: 0.625, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.05, forPreview: true) + ) // MARK: - 􀆐 Eyebrow Image(systemName: "chevron.compact.up") - .resizable() - .foregroundStyle(.black) - .fontWeight(.thin) - .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) + .arrangeShape( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true) + ) Image(systemName: "chevron.compact.up") - .resizable() - .foregroundStyle(.black) - .fontWeight(.thin) - .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) + .arrangeShape( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true) + ) // MARK: - 􀅽 Sunglasses frame Image(systemName: "minus") - .resizable() - .foregroundStyle(.black) - .fontWeight(.thin) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + .arrangeShape( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) + ) Image(systemName: "minus") - .resizable() - .foregroundStyle(.black) - .fontWeight(.thin) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + .arrangeShape( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) + ) Image(systemName: "minus") - .resizable() - .foregroundStyle(.black) - .fontWeight(.thin) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) - - // MARK: - 􀀁 Sunglasses inside lens - Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) - - Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) - - // MARK: - 􀆼 Sunglasses outside lens - Image(systemName: "moon.circle.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) - + .arrangeShape( + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) + ) + + // MARK: - 􀆼 Sunglasses lens Image(systemName: "moon.circle.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) + ) Image(systemName: "moon.circle.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) + ) // MARK: - 􀇈 Nose Image(systemName: "cloud.heavyrain") - .resizable() - .foregroundStyle(.black) - .fontWeight(.light) - .frame(width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true)) + .arrangeShape( + fontWeight: .light, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true) + ) // MARK: - 􀩻 Inside mouth Image(systemName: "button.roundedbottom.horizontal.fill") - .resizable() - .foregroundStyle(.red) - .frame(width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.075, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true)) + .arrangeShape( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.075, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true) + ) // MARK: - 􀝷 Tongue capsule.fill Image(systemName: "capsule.fill") - .resizable() - .foregroundStyle(.orange) - .frame(width: model.calculatingProportionalValue(withRatio: 0.145, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.025, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.424, forPreview: true)) + .arrangeShape( + primaryColor: .orange, + width: model.calculatingProportionalValue(withRatio: 0.145, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.025, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.424, forPreview: true) + ) } } } From 16b1e0a870eb24709257f7f092cd55281c2a39a0 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 21:45:15 +0900 Subject: [PATCH 053/108] Refactor NosebleedArt --- .../ArtWorks/Nosebleed/NosebleedArtView.swift | 36 ++-- .../Nosebleed/NosebleedPreviewView.swift | 198 +++++++++--------- 2 files changed, 123 insertions(+), 111 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift index e5d996a..26c1b13 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -25,7 +25,7 @@ struct NosebleedArtView: View { widthRatio: 0.65, heightRatio: 0.65, isAnimating: isAnimating, - symbolCountToWaitFor: 2 + symbolCountToWaitFor: 3 ) // MARK: - 􀭧 Nosebleed bottom @@ -33,13 +33,14 @@ struct NosebleedArtView: View { name: "cellularbars", initialPosition: .third(.second), primaryColor: .red, + fontWeight: .ultraLight, widthRatio: 0.2, heightRatio: 0.5, rotationDegrees: 180, horizontalOffsetRatio: 0.09, verticalOffsetRatio: 0.074, isAnimating: isAnimating, - symbolCountToWaitFor: 0 + symbolCountToWaitFor: 1 ) .symbolEffect(.variableColor.hideInactiveLayers, options: .speed(0.6).repeating, @@ -55,7 +56,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.09, verticalOffsetRatio: 0.15, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 2 ) // MARK: - 􀓩 Mouth @@ -69,9 +70,9 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.01, verticalOffsetRatio: 0.05, isAnimating: isAnimating, - symbolCountToWaitFor: 1 + symbolCountToWaitFor: 0 ) - + // MARK: - 􀏄 Concealing part for Mouth AnimatableSymbolView( name: "rectangle.fill", @@ -82,7 +83,7 @@ struct NosebleedArtView: View { rotationDegrees: 176, verticalOffsetRatio: -0.03, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 2 ) // MARK: - 􀭧 Nosebleed top @@ -90,13 +91,14 @@ struct NosebleedArtView: View { name: "cellularbars", initialPosition: .third(.second), primaryColor: .red, + fontWeight: .ultraLight, widthRatio: 0.2, heightRatio: 0.12, rotationDegrees: 180, - horizontalOffsetRatio: 0.035, - verticalOffsetRatio: 0.097, + horizontalOffsetRatio: 0.033, + verticalOffsetRatio: 0.096, isAnimating: isAnimating, - symbolCountToWaitFor: 0 + symbolCountToWaitFor: 1 ) .symbolEffect(.variableColor.hideInactiveLayers, options: .speed(0.6).repeating, @@ -112,7 +114,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.09, verticalOffsetRatio: 0.06, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 2 ) // MARK: - 􀏄 Concealing part for nosebleed top left @@ -125,7 +127,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: -0.047, verticalOffsetRatio: 0.09, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 2 ) // MARK: - 􀀁 Right eye @@ -137,7 +139,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.117, verticalOffsetRatio: -0.176, isAnimating: isAnimating, - symbolCountToWaitFor: 2 + symbolCountToWaitFor: 3 ) // MARK: - 􀀁 Left eye @@ -149,7 +151,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: -0.113, verticalOffsetRatio: -0.17, isAnimating: isAnimating, - symbolCountToWaitFor: 2 + symbolCountToWaitFor: 3 ) // MARK: - 􀥨 Tissue @@ -164,7 +166,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: -0.052, verticalOffsetRatio: 0.083, isAnimating: isAnimating, - symbolCountToWaitFor: 5 + symbolCountToWaitFor: 6 ) // MARK: - 􀉆 Tissue frame @@ -178,7 +180,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: -0.052, verticalOffsetRatio: 0.083, isAnimating: isAnimating, - symbolCountToWaitFor: 5 + symbolCountToWaitFor: 6 ) // MARK: - 􀥰 Nose @@ -206,7 +208,7 @@ struct NosebleedArtView: View { horizontalOffsetRatio: 0.007, verticalOffsetRatio: -0.046, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 5 ) } .navigationTitle("Nosebleed") @@ -225,7 +227,7 @@ struct NosebleedArtView: View { .onChange(of: isAnimating) { _, newValue in if newValue { Timer.scheduledTimer( - withTimeInterval: model.waitingTime(forCount: 6), + withTimeInterval: model.waitingTime(forCount: 7), repeats: false ) { _ in isEffectActivated = true diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift index 448020e..d0653b3 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift @@ -17,139 +17,149 @@ struct NosebleedArtPreviewView: View { // MARK: - 􀀁 Contour Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true)) + .arrangeShape( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true) + ) // MARK: - 􀭧 Nosebleed bottom Image(systemName: "cellularbars") - .resizable() - .foregroundStyle(.red) - .fontWeight(.ultraLight) - .rotationEffect(.degrees(180)) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.074, forPreview: true)) + .arrangeShape( + primaryColor: .red, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + rotationDegrees: 180, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.0741, forPreview: true) + ) // MARK: - 􀏄 Concealing part for nosebleed bottom Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) + .arrangeShape( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true) + ) // MARK: - 􀓩 Mouth Image(systemName: "lasso") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) - .rotationEffect(.degrees(170)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true)) + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + rotationDegrees: 170, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true) + ) // MARK: - 􀏄 Concealing part for Mouth Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) - .rotationEffect(.degrees(176)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true)) + .arrangeShape( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + rotationDegrees: 176, + verticalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true) + ) // MARK: - 􀭧 Nosebleed top Image(systemName: "cellularbars") - .resizable() - .foregroundStyle(.red) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true)) - .rotationEffect(.degrees(180)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.033, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.096, forPreview: true)) + .arrangeShape( + primaryColor: .red, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + rotationDegrees: 180, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.033, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.096, forPreview: true) + ) // MARK: - 􀏄 Nosebleed top right hide Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) + .arrangeShape( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true) + ) // MARK: - 􀏄 Nosebleed top left hide Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.053, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true)) + .arrangeShape( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.053, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true) + ) // MARK: - 􀀁 Right eye Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.117, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.176, forPreview: true)) + .arrangeShape( + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.117, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.176, forPreview: true) + ) // MARK: - 􀀁 Left eye Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.113, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.17, forPreview: true)) + .arrangeShape( + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.113, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.17, forPreview: true) + ) // MARK: - 􀥨 Tissue Image(systemName: "doc.plaintext.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true)) - .rotationEffect(.degrees(188)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true)) + .arrangeShape( + primaryColor: .white, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), + rotationDegrees: 188, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true) + ) // MARK: - 􀉆 Tissue frame Image(systemName: "doc.plaintext") - .resizable() - .foregroundStyle(.black) - .fontWeight(.light) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true)) - .rotationEffect(.degrees(188)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true)) + .arrangeShape( + fontWeight: .light, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), + rotationDegrees: 188, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true) + ) // MARK: - 􀥰 Nose Image(systemName: "triangleshape") - .resizable() - .foregroundStyle(.black) - .fontWeight(.light) - .frame(width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true)) - .rotationEffect(.degrees(-4)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.013, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.02, forPreview: true)) + .arrangeShape( + fontWeight: .light, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + rotationDegrees: -4, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.013, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.02, forPreview: true) + ) // MARK: - 􀏄 Nose hide Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(.awesomeYellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true)) - .rotationEffect(.degrees(148)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.007, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.046, forPreview: true)) + .arrangeShape( + primaryColor: .awesomeYellow, + width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), + rotationDegrees: 148, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.007, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.046, forPreview: true) + ) } } } From 823d5c626e006fa70fb4c4b54f628f7f6ee605cd Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 21:47:25 +0900 Subject: [PATCH 054/108] Rearrange ArtGralley list --- .../ArtisticWorldOfSFSymbols/ArtGalleryView.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index f8964de..b26c2ae 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -47,6 +47,13 @@ struct ArtGalleryView: View { .galleryGridItemView(length: model.galleryColumnLength) } + NavigationLink { + CrayonBoyArtView() + } label: { + CrayonBoyPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) + } + NavigationLink { AfroBoyArtView() } label: { @@ -67,13 +74,6 @@ struct ArtGalleryView: View { ImWearingPantsPreviewView() .galleryGridItemView(length: model.galleryColumnLength) } - - NavigationLink { - CrayonBoyArtView() - } label: { - CrayonBoyPreviewView() - .galleryGridItemView(length: model.galleryColumnLength) - } } } .padding(.horizontal, 24) From e94f637decb6e15fc90b1f15e9e1490274f7c0e2 Mon Sep 17 00:00:00 2001 From: littleossa Date: Thu, 8 Feb 2024 23:22:09 +0900 Subject: [PATCH 055/108] Refactor ImWearingPant art --- .../ImWearingPantsArtView.swift | 343 +++++------ .../ImWearingPantsPreviewView.swift | 533 +++++++++--------- 2 files changed, 461 insertions(+), 415 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index 950f442..aaa690c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -97,226 +97,247 @@ struct ImWearingPantsArtView: View { // MARK: - 􁗅 Pose Image(systemName: "figure.arms.open") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.6), - height: model.calculatingProportionalValue(withRatio: 1)) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.6), + height: model.calculatingProportionalValue(withRatio: 1) + ) // MARK: - 􀆹 Chest shadow Image(systemName: "moon") - .resizable() - .foregroundStyle(.black.opacity(0.6)) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.015)) - .rotationEffect(.degrees(-10)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.09), - y: model.calculatingProportionalValue(withRatio: -0.125)) + .arrangeShape( + primaryColor: .black.opacity(0.6), + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.015), + rotationDegrees: -10, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.125) + ) Image(systemName: "moon") - .resizable() - .foregroundStyle(.black.opacity(0.6)) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.015)) - .rotation3DEffect( - .degrees(160), - axis: (x: 0, y: 1, z: 0) + .arrangeShape( + primaryColor: .black.opacity(0.6), + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.015), + rotationDegrees: -10, + flip: .horizontal, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.085), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.125) ) - .offset(x: model.calculatingProportionalValue(withRatio: 0.085), - y: model.calculatingProportionalValue(withRatio: -0.125)) // MARK: - 􀏄 Parts for shaping Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(Color.systemBackground) - .fontWeight(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.3), - height: model.calculatingProportionalValue(withRatio: 0.4)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.25), - y: model.calculatingProportionalValue(withRatio: -0.1)) + .arrangeShape( + primaryColor: .systemBackground, + fontWeight: .black, + width: model.calculatingProportionalValue(withRatio: 0.3), + height: model.calculatingProportionalValue(withRatio: 0.4), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.25), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.1) + ) Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(Color.systemBackground) - .fontWeight(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.3), - height: model.calculatingProportionalValue(withRatio: 0.4)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.25), - y: model.calculatingProportionalValue(withRatio: -0.1)) + .arrangeShape( + primaryColor: .systemBackground, + fontWeight: .black, + width: model.calculatingProportionalValue(withRatio: 0.3), + height: model.calculatingProportionalValue(withRatio: 0.4), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.25), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.1) + ) // MARK: - 􀊡 Neck Image(systemName: "speaker.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.38)) - .rotationEffect(.degrees(90)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.005), - y: model.calculatingProportionalValue(withRatio: -0.27)) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.38), + rotationDegrees: 90, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.005), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.27) + ) // MARK: - 􀂓 Parts for shaping Image(systemName: "square.fill") - .resizable() - .foregroundStyle(Color.systemBackground) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.2)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.14), - y: model.calculatingProportionalValue(withRatio: -0.385)) + .arrangeShape( + primaryColor: .systemBackground, + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.2), + rotationDegrees: 90, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.14), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.385) + ) Image(systemName: "square.fill") - .resizable() - .foregroundStyle(Color.systemBackground) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.2)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.14), - y: model.calculatingProportionalValue(withRatio: -0.385)) + .arrangeShape( + primaryColor: .systemBackground, + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.2), + rotationDegrees: 90, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.14), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.385) + ) // MARK: - 􀆺 Chest Image(systemName: "moon.fill") - .resizable() - .foregroundStyle(.yellow) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.04)) - .rotationEffect(.degrees(-10)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.09), - y: model.calculatingProportionalValue(withRatio: -0.138)) - + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.04), + rotationDegrees: -10, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.138) + ) + Image(systemName: "moon.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.04)) - .rotation3DEffect( - .degrees(160), - axis: (x: 0, y: 1, z: 0) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.04), + rotationDegrees: -10, + flip: .horizontal, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.085), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.138) ) - .offset(x: model.calculatingProportionalValue(withRatio: 0.085), - y: model.calculatingProportionalValue(withRatio: -0.138)) // MARK: - 􀆉 Left arm Image(systemName: "chevron.left") - .resizable() - .foregroundStyle(.yellow) - .fontWeight(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.3)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.2), - y: model.calculatingProportionalValue(withRatio: -0.08)) + .arrangeShape( + primaryColor: .yellow, + fontWeight: .black, + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.3), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.08) + ) // MARK: - 􀆊 Right artm Image(systemName: "chevron.right") - .resizable() - .foregroundStyle(.yellow) - .fontWeight(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.3)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.2), - y: model.calculatingProportionalValue(withRatio: -0.08)) + .arrangeShape( + primaryColor: .yellow, + fontWeight: .black, + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.3), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.08) + ) } .transition(.symbolEffect(.appear)) Group { // MARK: - 􀀁 Pant center hole cover Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.palePink) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.06)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.01), - y: model.calculatingProportionalValue(withRatio: 0.04)) + .arrangeShape( + primaryColor: .palePink, + width: model.calculatingProportionalValue(withRatio: 0.06), + height: model.calculatingProportionalValue(withRatio: 0.06), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.01), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.04) + ) // MARK: - 􁁌 Patterns on pants Image(systemName: "fan.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.04)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.01), - y: model.calculatingProportionalValue(withRatio: 0.04)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.04), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.01), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.04) + ) Image(systemName: "fan.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.04)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.08), - y: model.calculatingProportionalValue(withRatio: 0.02)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.04), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.02) + ) Image(systemName: "fan.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.04)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.08), - y: model.calculatingProportionalValue(withRatio: 0.02)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.04), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.02) + ) Image(systemName: "fan.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.04)) - .offset(y: model.calculatingProportionalValue(withRatio: 0.099)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04), + height: model.calculatingProportionalValue(withRatio: 0.04), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.099) + ) // MARK: - 􀲟 Concealing part for pants Image(systemName: "oval.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.11), - height: model.calculatingProportionalValue(withRatio: 0.03)) - .rotationEffect(.degrees(45)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.07), - y: model.calculatingProportionalValue(withRatio: 0.09)) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.11), + height: model.calculatingProportionalValue(withRatio: 0.03), + rotationDegrees: 45, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.07), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.09) + ) Image(systemName: "oval.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.11), - height: model.calculatingProportionalValue(withRatio: 0.03)) - .rotationEffect(.degrees(-47)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.06), - y: model.calculatingProportionalValue(withRatio: 0.089)) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.11), + height: model.calculatingProportionalValue(withRatio: 0.03), + rotationDegrees: -47, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.06), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.089) + ) // MARK: - 􁎘 Abdomen Image(systemName: "visionpro.fill") - .resizable() - .foregroundStyle(.yellow) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.25), - height: model.calculatingProportionalValue(withRatio: 0.15)) - .rotationEffect(.degrees(180)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.045)) + .arrangeShape( + primaryColor: .yellow, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.25), + height: model.calculatingProportionalValue(withRatio: 0.15), + rotationDegrees: 180, + verticalOffset: model.calculatingProportionalValue(withRatio: -0.045) + ) // MARK: - 􀥤 Belly button Image(systemName: "poweron") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.02), - height: model.calculatingProportionalValue(withRatio: 0.002)) - .rotationEffect(.degrees(180)) + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.02), + height: model.calculatingProportionalValue(withRatio: 0.002), + rotationDegrees: 180 + ) // MARK: - 􀕩 Niple Image(systemName: "smallcircle.filled.circle.fill") - .resizable() - .foregroundStyle(.brown) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.02), - height: model.calculatingProportionalValue(withRatio: 0.01)) - .rotationEffect(.degrees(15)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.09), - y: model.calculatingProportionalValue(withRatio: -0.138)) + .arrangeShape( + primaryColor: .yellow, + secondaryColor: .brown, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.02), + height: model.calculatingProportionalValue(withRatio: 0.01), + rotationDegrees: 15, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.138) + ) Image(systemName: "smallcircle.filled.circle.fill") - .resizable() - .foregroundStyle(.brown) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.02), - height: model.calculatingProportionalValue(withRatio: 0.01)) - .rotationEffect(.degrees(-15)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.09), - y: model.calculatingProportionalValue(withRatio: -0.14)) + .arrangeShape( + primaryColor: .yellow, + secondaryColor: .brown, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.02), + height: model.calculatingProportionalValue(withRatio: 0.01), + rotationDegrees: -15, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.14) + ) } .zIndex(0.2) .transition(.symbolEffect(.appear)) @@ -435,7 +456,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: -0.035, verticalOffsetRatio: -0.396, isAnimating: isAnimating, - symbolCountToWaitFor: 2 + symbolCountToWaitFor: 5 ) AnimatableSymbolView( @@ -448,7 +469,7 @@ struct ImWearingPantsArtView: View { horizontalOffsetRatio: 0.035, verticalOffsetRatio: -0.396, isAnimating: isAnimating, - symbolCountToWaitFor: 2 + symbolCountToWaitFor: 5 ) // MARK: - 􀋭 Right eye diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift index 0dbb32a..61d1255 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift @@ -42,27 +42,27 @@ struct ImWearingPantsPreviewView: View { // MARK: - 􀆹 Chest shadow Image(systemName: "moon") - .resizable() - .foregroundStyle(.black.opacity(0.6)) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true)) - .rotationEffect(.degrees(-10)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true)) + .arrangeShape( + primaryColor: .black.opacity(0.6), + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), + rotationDegrees: -10, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true) + ) Image(systemName: "moon") - .resizable() - .foregroundStyle(.black.opacity(0.6)) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true)) - .rotation3DEffect( - .degrees(160), - axis: (x: 0, y: 1, z: 0) + .arrangeShape( + primaryColor: .black.opacity(0.6), + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), + rotationDegrees: -10, + flip: .horizontal, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.085, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true) ) - .offset(x: model.calculatingProportionalValue(withRatio: 0.085, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true)) // MARK: - 􀏄 Parts for shaping Image(systemName: "rectangle.fill") @@ -112,325 +112,350 @@ struct ImWearingPantsPreviewView: View { // MARK: - 􀆺 Chest Image(systemName: "moon.fill") - .resizable() - .foregroundStyle(.yellow) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .rotationEffect(.degrees(-10)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true)) - + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + rotationDegrees: -10, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true) + ) + Image(systemName: "moon.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .rotation3DEffect( - .degrees(160), - axis: (x: 0, y: 1, z: 0) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + rotationDegrees: -10, + flip: .horizontal, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.085, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true) ) - .offset(x: model.calculatingProportionalValue(withRatio: 0.085, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true)) // MARK: - 􀆉 Left arm Image(systemName: "chevron.left") - .resizable() - .foregroundStyle(.yellow) - .fontWeight(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + fontWeight: .black, + width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true) + ) // MARK: - 􀆊 Right artm Image(systemName: "chevron.right") - .resizable() - .foregroundStyle(.yellow) - .fontWeight(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + fontWeight: .black, + width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true) + ) // MARK: - 􁉨 Pants Image(systemName: "parkingsign.steeringwheel") - .resizable() - .foregroundStyle(.palePink) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.35, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) + .arrangeShape( + primaryColor: .palePink, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.35, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true) + ) // MARK: - 􀀁 Pant center hole cover Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.palePink) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .arrangeShape( + primaryColor: .palePink, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true) + ) // MARK: - 􁁌 Patterns on pants Image(systemName: "fan.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true) + ) Image(systemName: "fan.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true) + ) Image(systemName: "fan.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true) + ) Image(systemName: "fan.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: 0.099, forPreview: true)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.099, forPreview: true) + ) // MARK: - 􀲟 Concealing part for pants Image(systemName: "oval.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) - .rotationEffect(.degrees(45)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + rotationDegrees: 45, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true) + ) Image(systemName: "oval.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true)) - .rotationEffect(.degrees(-47)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - y: model.calculatingProportionalValue(withRatio: 0.089, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + rotationDegrees: -47, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.089, forPreview: true) + ) // MARK: - 􁎘 Abdomen Image(systemName: "visionpro.fill") - .resizable() - .foregroundStyle(.yellow) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) - .rotationEffect(.degrees(180)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.045, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + rotationDegrees: 180, + verticalOffset: model.calculatingProportionalValue(withRatio: -0.045, forPreview: true) + ) // MARK: - 􀥤 Belly button Image(systemName: "poweron") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.002, forPreview: true)) - .rotationEffect(.degrees(180)) + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.002, forPreview: true), + rotationDegrees: 180 + ) // MARK: - 􀕩 Niple Image(systemName: "smallcircle.filled.circle.fill") - .resizable() - .foregroundStyle(.brown) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true)) - .rotationEffect(.degrees(15)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + secondaryColor: .brown, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + rotationDegrees: 15, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true) + ) Image(systemName: "smallcircle.filled.circle.fill") - .resizable() - .foregroundStyle(.brown) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true)) - .rotationEffect(.degrees(-15)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.14, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + secondaryColor: .brown, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), + rotationDegrees: -15, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.14, forPreview: true) + ) // MARK: - 􀧷 Contour Image(systemName: "capsule.portrait.fill") - .resizable() - .foregroundStyle(.yellow) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.22, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.22, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) + ) Image(systemName: "capsule.portrait.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.35, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.35, forPreview: true) + ) // MARK: - 􀨯 Nose Image(systemName: "nose") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.045, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.38, forPreview: true)) + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.045, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.38, forPreview: true) + ) // MARK: - 􀦭 Eyebrow Image(systemName: "eyebrow") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .rotationEffect(.degrees(10)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.41, forPreview: true)) - + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + rotationDegrees: 10, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.41, forPreview: true) + ) + Image(systemName: "eyebrow") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.045, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true)) - .rotation3DEffect(.degrees(180), - axis: (x: 0, y: 1, z: 0)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.408, forPreview: true)) + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.045, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + flip: .horizontal, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.408, forPreview: true) + ) // MARK: - 􀧷 Concealing part for eyebrow Image(systemName: "capsule.portrait.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) - .rotationEffect(.degrees(-10)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.035, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.396, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + rotationDegrees: -10, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.035, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.396, forPreview: true) + ) Image(systemName: "capsule.portrait.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) - .rotationEffect(.degrees(10)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.035, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.396, forPreview: true)) + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + rotationDegrees: 10, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.035, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.396, forPreview: true) + ) // MARK: - 􀋭 Eye frame Image(systemName: "eye") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) - + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) + ) + Image(systemName: "eye") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) + ) // MARK: - 􀋮 Eye Image(systemName: "eye.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) + ) Image(systemName: "eye.fill") - .resizable() - .foregroundStyle(.white) - .frame(width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true)) + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) + ) // MARK: - 􀦪 Mouth Image(systemName: "mouth.fill") - .resizable() - .foregroundStyle(.red) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true)) + .arrangeShape( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true) + ) Image(systemName: "mouth.fill") - .resizable() - .foregroundStyle(.red) - .frame(width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true)) - .offset(y: model.calculatingProportionalValue(withRatio: -0.33, forPreview: true)) + .arrangeShape( + primaryColor: .red, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.33, forPreview: true) + ) // MARK: - 􁒀 Teeth Image(systemName: "window.casement.closed") - .resizable() - .foregroundStyle(.black, .white) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.029, forPreview: true)) - .rotationEffect(.degrees(90)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.013, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.328, forPreview: true)) + .arrangeShape( + primaryColor: .black, + secondaryColor: .white, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.029, forPreview: true), + rotationDegrees: 90, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.013, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.328, forPreview: true) + ) Image(systemName: "window.casement.closed") - .resizable() - .foregroundStyle(.black, .white) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.029, forPreview: true)) - .rotationEffect(.degrees(90)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.014, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.328, forPreview: true)) + .arrangeShape( + primaryColor: .black, + secondaryColor: .white, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.029, forPreview: true), + rotationDegrees: 90, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.014, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.328, forPreview: true) + ) // MARK: - 􀲟 Hair Image(systemName: "oval.fill") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.057, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.001, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.49, forPreview: true)) + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.057, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.001, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.49, forPreview: true) + ) // MARK: - 􀠒 Off-center part hair style Image(systemName: "drop.fill") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true)) - .rotationEffect(.degrees(-65)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.48, forPreview: true)) + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + rotationDegrees: -65, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.48, forPreview: true) + ) Image(systemName: "drop.fill") - .resizable() - .foregroundStyle(.black) - .fontWeight(.ultraLight) - .frame(width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true)) - .rotationEffect(.degrees(95)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.47, forPreview: true)) + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + rotationDegrees: 95, + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.47, forPreview: true) + ) } } } From 2e146554ac398941960fae38696f2f144cff76a5 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 00:43:49 +0900 Subject: [PATCH 056/108] Add WorldPeacePreview --- .../project.pbxproj | 20 ++++ .../CrayonBoy/CrayonBoyPreviewView.swift | 1 - .../WorldPeace+CharacterPosition.swift | 85 ++++++++++++++ .../WorldPeace/WorldPeacePreviewView.swift | 106 ++++++++++++++++++ .../Common/Models/Offset.swift | 13 +++ 5 files changed, 224 insertions(+), 1 deletion(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/Offset.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index a86ff30..9af815e 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -43,6 +43,9 @@ 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3928C82DBB004E1720 /* CharacterAppearance.swift */; }; 97624C3C28C935F0004E1720 /* FiveCharactersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */; }; 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3D28C93693004E1720 /* CharactersType.swift */; }; + 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */; }; + 9767DEFC2B7523A900457DA1 /* Offset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFB2B7523A900457DA1 /* Offset.swift */; }; + 9767DEFE2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -112,6 +115,9 @@ 97624C3928C82DBB004E1720 /* CharacterAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharacterAppearance.swift; sourceTree = ""; }; 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FiveCharactersView.swift; sourceTree = ""; }; 97624C3D28C93693004E1720 /* CharactersType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharactersType.swift; sourceTree = ""; }; + 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeacePreviewView.swift; sourceTree = ""; }; + 9767DEFB2B7523A900457DA1 /* Offset.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Offset.swift; sourceTree = ""; }; + 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeace+CharacterPosition.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -315,6 +321,15 @@ path = Animals; sourceTree = ""; }; + 9767DEF82B751C1300457DA1 /* WorldPeace */ = { + isa = PBXGroup; + children = ( + 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */, + 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */, + ); + path = WorldPeace; + sourceTree = ""; + }; 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */ = { isa = PBXGroup; children = ( @@ -351,6 +366,7 @@ children = ( 97EF438E2B726D66003648F5 /* ArtWorkModel */, 97AD53172B70DFF30034FB5D /* AnimationValues.swift */, + 9767DEFB2B7523A900457DA1 /* Offset.swift */, ); path = Models; sourceTree = ""; @@ -360,6 +376,7 @@ children = ( 97EF43962B7332FB003648F5 /* Magician */, 97EF439F2B74CA22003648F5 /* CrayonBoy */, + 9767DEF82B751C1300457DA1 /* WorldPeace */, 97AD531E2B70E2770034FB5D /* AfroBoy */, 97EF43892B725DE7003648F5 /* Nosebleed */, 97EF43912B72D3AF003648F5 /* ImWearingPants */, @@ -569,6 +586,7 @@ files = ( 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */, 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, + 9767DEFC2B7523A900457DA1 /* Offset.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, 9748BE232893B35A006DF0BE /* WorldPeace.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, @@ -578,10 +596,12 @@ 9748BE372893D064006DF0BE /* PartyAnimals.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, + 9767DEFE2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift in Sources */, 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */, 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */, + 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */, 9748BE3A2893D0E3006DF0BE /* Frog.swift in Sources */, 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */, 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift index baf984b..1c68be1 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift @@ -174,5 +174,4 @@ struct CrayonBoyPreviewView: View { #Preview { CrayonBoyPreviewView() .environment(ArtWorkModel.preview) -// .environment(ArtWorkModel.init(screenSize: .init(width: 4600, height: 4600))) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift new file mode 100644 index 0000000..c7d522b --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift @@ -0,0 +1,85 @@ +// +// WorldPeace+CharacterPosition.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +enum CharacterPosition: String, CaseIterable, Identifiable { + case topFirst + case topSecond + case topThird + case topFourth + case topFifth + case bottomFirst + case bottomSecond + case bottomThird + case bottomFourth + case bottomFifth + + struct Value { + let character: String + let color: Color + let horizontalOffsetRatio: CGFloat + let verticalOffsetRatio: CGFloat + } + + var id: String { self.rawValue } + + var value: Value { + switch self { + case .topFirst: + Value(character: "w", + color: .red, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: -0.4) + case .topSecond: + Value(character: "o", + color: .yellow, + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: -0.4) + case .topThird: + Value(character: "r", + color: .green, + horizontalOffsetRatio: 0, + verticalOffsetRatio: -0.4) + case .topFourth: + Value(character: "l", + color: .blue, + horizontalOffsetRatio: 0.17, + verticalOffsetRatio: -0.4) + case .topFifth: + Value(character: "d", + color: .purple, + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: -0.4) + case .bottomFirst: + Value(character: "p", + color: .teal, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: 0.4) + case .bottomSecond: + Value(character: "e", + color: .pink, + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: 0.4) + case .bottomThird: + Value(character: "a", + color: .mint, + horizontalOffsetRatio: 0, + verticalOffsetRatio: 0.4) + case .bottomFourth: + Value(character: "c", + color: .indigo, + horizontalOffsetRatio: 0.17, + verticalOffsetRatio: 0.4) + case .bottomFifth: + Value(character: "e", + color: .orange, + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: 0.4) + } + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift new file mode 100644 index 0000000..e46d431 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift @@ -0,0 +1,106 @@ +// +// WorldPeacePreviewView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct WorldPeacePreviewView: View { + + @Environment(ArtWorkModel.self) var model + + var body: some View { + + ZStack { + + // MARK: - Characters black shadow + ForEach(CharacterPosition.allCases) { + Image(systemName: "\($0.value.character).circle") + .arrangeShape( + fontWeight: .bold, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) + ) + } + + // MARK: - Colored Characters + ForEach(CharacterPosition.allCases) { + Image(systemName: "\($0.value.character).circle") + .arrangeShape( + primaryColor: $0.value.color, + fontWeight: .bold, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) + ) + } + .offset(x: model.calculatingProportionalValue(withRatio: -0.001)) + + // MARK: - 􀀀 Concealing part for Characters + ForEach(CharacterPosition.allCases) { + Image(systemName: "circle") + .arrangeShape( + primaryColor: .systemBackground, + fontWeight: .black, + width: model.calculatingProportionalValue(withRatio: 0.158, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.154, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) + ) + } + .offset(x: model.calculatingProportionalValue(withRatio: -0.0006)) + + // MARK: - 􀀁 Sea + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .cyan, + width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) + ) + + // MARK: - 􀀁 Sea + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .cyan, + width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) + ) + + // MARK: - 􀵶 Earth + Image(systemName: "globe.asia.australia.fill") + .arrangeShape( + primaryColor: .green, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) + ) + + // MARK: - 􀵵 Earth frame + Image(systemName: "globe.asia.australia") + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.57, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.57, forPreview: true) + ) + + // MARK: - 􀺎 Peace sign + Image(systemName: "peacesign") + .arrangeShape( + primaryColor: .white, + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.535, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.535, forPreview: true) + ) + } + } +} + +#Preview { + WorldPeacePreviewView() + .environment(ArtWorkModel.init(screenSize: .init(width: 4600, height: 4600))) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/Offset.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/Offset.swift new file mode 100644 index 0000000..9dfba23 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/Offset.swift @@ -0,0 +1,13 @@ +// +// Offset.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import CoreGraphics + +struct Offset { + let x: CGFloat + let y: CGFloat +} From c5afa0b2ace67f0a207d2cbad755103085a8e538 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 01:14:50 +0900 Subject: [PATCH 057/108] Add World peace art --- .../project.pbxproj | 8 +- .../ArtGalleryView.swift | 7 + .../WorldPeace+CharacterPosition.swift | 159 ++++++++++-------- .../WorldPeace/WorldPeaceArtView.swift | 118 +++++++++++++ .../WorldPeace/WorldPeacePreviewView.swift | 157 ++++++++--------- .../Common/Models/Offset.swift | 13 -- 6 files changed, 288 insertions(+), 174 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/Offset.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 9af815e..fb77c00 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -44,8 +44,8 @@ 97624C3C28C935F0004E1720 /* FiveCharactersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */; }; 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3D28C93693004E1720 /* CharactersType.swift */; }; 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */; }; - 9767DEFC2B7523A900457DA1 /* Offset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFB2B7523A900457DA1 /* Offset.swift */; }; 9767DEFE2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */; }; + 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -116,8 +116,8 @@ 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FiveCharactersView.swift; sourceTree = ""; }; 97624C3D28C93693004E1720 /* CharactersType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharactersType.swift; sourceTree = ""; }; 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeacePreviewView.swift; sourceTree = ""; }; - 9767DEFB2B7523A900457DA1 /* Offset.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Offset.swift; sourceTree = ""; }; 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeace+CharacterPosition.swift"; sourceTree = ""; }; + 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeaceArtView.swift; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -324,6 +324,7 @@ 9767DEF82B751C1300457DA1 /* WorldPeace */ = { isa = PBXGroup; children = ( + 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */, 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */, 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */, ); @@ -366,7 +367,6 @@ children = ( 97EF438E2B726D66003648F5 /* ArtWorkModel */, 97AD53172B70DFF30034FB5D /* AnimationValues.swift */, - 9767DEFB2B7523A900457DA1 /* Offset.swift */, ); path = Models; sourceTree = ""; @@ -586,10 +586,10 @@ files = ( 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */, 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, - 9767DEFC2B7523A900457DA1 /* Offset.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, 9748BE232893B35A006DF0BE /* WorldPeace.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, + 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */, 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, 97AD532D2B717C950034FB5D /* AfroBoyPreviewView.swift in Sources */, 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index b26c2ae..2d0c2d3 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -54,6 +54,13 @@ struct ArtGalleryView: View { .galleryGridItemView(length: model.galleryColumnLength) } + NavigationLink { + WorldPeaceArtView() + } label: { + WorldPeacePreviewView() + .galleryGridItemView(length: model.galleryColumnLength) + } + NavigationLink { AfroBoyArtView() } label: { diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift index c7d522b..ca29c2d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift @@ -7,79 +7,94 @@ import SwiftUI -enum CharacterPosition: String, CaseIterable, Identifiable { - case topFirst - case topSecond - case topThird - case topFourth - case topFifth - case bottomFirst - case bottomSecond - case bottomThird - case bottomFourth - case bottomFifth - - struct Value { - let character: String - let color: Color - let horizontalOffsetRatio: CGFloat - let verticalOffsetRatio: CGFloat - } - - var id: String { self.rawValue } +extension WorldPeaceArtView { - var value: Value { - switch self { - case .topFirst: - Value(character: "w", - color: .red, - horizontalOffsetRatio: -0.34, - verticalOffsetRatio: -0.4) - case .topSecond: - Value(character: "o", - color: .yellow, - horizontalOffsetRatio: -0.17, - verticalOffsetRatio: -0.4) - case .topThird: - Value(character: "r", - color: .green, - horizontalOffsetRatio: 0, - verticalOffsetRatio: -0.4) - case .topFourth: - Value(character: "l", - color: .blue, - horizontalOffsetRatio: 0.17, - verticalOffsetRatio: -0.4) - case .topFifth: - Value(character: "d", - color: .purple, - horizontalOffsetRatio: 0.34, - verticalOffsetRatio: -0.4) - case .bottomFirst: - Value(character: "p", - color: .teal, - horizontalOffsetRatio: -0.34, - verticalOffsetRatio: 0.4) - case .bottomSecond: - Value(character: "e", - color: .pink, - horizontalOffsetRatio: -0.17, - verticalOffsetRatio: 0.4) - case .bottomThird: - Value(character: "a", - color: .mint, - horizontalOffsetRatio: 0, - verticalOffsetRatio: 0.4) - case .bottomFourth: - Value(character: "c", - color: .indigo, - horizontalOffsetRatio: 0.17, - verticalOffsetRatio: 0.4) - case .bottomFifth: - Value(character: "e", - color: .orange, - horizontalOffsetRatio: 0.34, - verticalOffsetRatio: 0.4) + enum CharacterPosition: String, CaseIterable, Identifiable { + case topFirst + case topSecond + case topThird + case topFourth + case topFifth + case bottomFirst + case bottomSecond + case bottomThird + case bottomFourth + case bottomFifth + + struct Value { + let character: String + let color: Color + let initialPosition: ArtWorkModel.InitialSymbolRow + let horizontalOffsetRatio: CGFloat + let verticalOffsetRatio: CGFloat + } + + var id: String { self.rawValue } + + var value: Value { + switch self { + case .topFirst: + Value(character: "w", + color: .red, + initialPosition: .second(.second), + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: -0.4) + case .topSecond: + Value(character: "o", + color: .yellow, + initialPosition: .third(.sixth), + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: -0.4) + case .topThird: + Value(character: "r", + color: .green, + initialPosition: .second(.first), + + horizontalOffsetRatio: 0, + verticalOffsetRatio: -0.4) + case .topFourth: + Value(character: "l", + color: .blue, + initialPosition: .third(.fifth), + horizontalOffsetRatio: 0.17, + verticalOffsetRatio: -0.4) + case .topFifth: + Value(character: "d", + color: .purple, + initialPosition: .third(.third), + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: -0.4) + case .bottomFirst: + Value(character: "p", + color: .teal, + initialPosition: .third(.seventh), + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: 0.4) + case .bottomSecond: + Value(character: "e", + color: .pink, + initialPosition: .third(.fourth), + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: 0.4) + case .bottomThird: + Value(character: "a", + color: .mint, + initialPosition: .third(.first), + horizontalOffsetRatio: 0, + verticalOffsetRatio: 0.4) + case .bottomFourth: + Value(character: "c", + color: .indigo, + initialPosition: .third(.second), + horizontalOffsetRatio: 0.17, + verticalOffsetRatio: 0.4) + case .bottomFifth: + Value(character: "e", + color: .orange, + initialPosition: .third(.fourth), + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: 0.4) + } } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift new file mode 100644 index 0000000..8e8b921 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift @@ -0,0 +1,118 @@ +// +// WorldPeaceArtView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct WorldPeaceArtView: View { + + @Environment(ArtWorkModel.self) var model + @State private var isAnimating = false + + var body: some View { + + ZStack { + + // MARK: - Characters black shadow + ForEach(WorldPeaceArtView.CharacterPosition.allCases) { + + AnimatableSymbolView( + name: "\($0.value.character).circle", + initialPosition: $0.value.initialPosition, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: $0.value.horizontalOffsetRatio, + verticalOffsetRatio: $0.value.verticalOffsetRatio, + isAnimating: isAnimating, + symbolCountToWaitFor: 4 + ) + } + + // MARK: - Colored Characters + ForEach(WorldPeaceArtView.CharacterPosition.allCases) { + AnimatableSymbolView( + name: "\($0.value.character).circle", + initialPosition: $0.value.initialPosition, + primaryColor: $0.value.color, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: $0.value.horizontalOffsetRatio - 0.006, + verticalOffsetRatio: $0.value.verticalOffsetRatio, + isAnimating: isAnimating, + symbolCountToWaitFor: 5 + ) + } + + // MARK: - 􀀁 Sea + AnimatableSymbolView( + name: "circle.fill", + initialPosition: .second(.third), + primaryColor: .cyan, + widthRatio: 0.55, + heightRatio: 0.55, + isAnimating: isAnimating, + symbolCountToWaitFor: 0 + ) + + // MARK: - 􀵶 Earth + AnimatableSymbolView( + name: "globe.asia.australia.fill", + initialPosition: .second(.fourth), + primaryColor: .green, + fontWeight: .ultraLight, + widthRatio: 0.55, + heightRatio: 0.55, + isAnimating: isAnimating, + symbolCountToWaitFor: 1 + ) + + // MARK: - 􀵵 Earth frame + AnimatableSymbolView( + name: "globe.asia.australia", + initialPosition: .second(.fifth), + fontWeight: .ultraLight, + widthRatio: 0.57, + heightRatio: 0.57, + isAnimating: isAnimating, + symbolCountToWaitFor: 2 + ) + + // MARK: - 􀺎 Peace sign + AnimatableSymbolView( + name: "peacesign", + initialPosition: .second(.sixth), + primaryColor: .white, + fontWeight: .thin, + widthRatio: 0.535, + heightRatio: 0.535, + isAnimating: isAnimating, + symbolCountToWaitFor: 3 + ) + } + .navigationTitle("World Peace") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + } +} + +#Preview { + NavigationStack { + WorldPeaceArtView() + .environment(ArtWorkModel.preview) + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift index e46d431..7f3b83e 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift @@ -13,94 +13,81 @@ struct WorldPeacePreviewView: View { var body: some View { - ZStack { - - // MARK: - Characters black shadow - ForEach(CharacterPosition.allCases) { - Image(systemName: "\($0.value.character).circle") - .arrangeShape( - fontWeight: .bold, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) - ) - } - - // MARK: - Colored Characters - ForEach(CharacterPosition.allCases) { - Image(systemName: "\($0.value.character).circle") - .arrangeShape( - primaryColor: $0.value.color, - fontWeight: .bold, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) - ) - } - .offset(x: model.calculatingProportionalValue(withRatio: -0.001)) - - // MARK: - 􀀀 Concealing part for Characters - ForEach(CharacterPosition.allCases) { - Image(systemName: "circle") - .arrangeShape( - primaryColor: .systemBackground, - fontWeight: .black, - width: model.calculatingProportionalValue(withRatio: 0.158, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.154, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) - ) - } - .offset(x: model.calculatingProportionalValue(withRatio: -0.0006)) - - // MARK: - 􀀁 Sea - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .cyan, - width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) - ) - - // MARK: - 􀀁 Sea - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .cyan, - width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) - ) - - // MARK: - 􀵶 Earth - Image(systemName: "globe.asia.australia.fill") - .arrangeShape( - primaryColor: .green, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) - ) - - // MARK: - 􀵵 Earth frame - Image(systemName: "globe.asia.australia") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.57, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.57, forPreview: true) - ) - - // MARK: - 􀺎 Peace sign - Image(systemName: "peacesign") - .arrangeShape( - primaryColor: .white, - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.535, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.535, forPreview: true) - ) - } + ZStack { + + // MARK: - Characters black shadow + ForEach(WorldPeaceArtView.CharacterPosition.allCases) { + Image(systemName: "\($0.value.character).circle") + .arrangeShape( + secondaryColor: .systemBackground, + fontWeight: .bold, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) + ) + } + + // MARK: - Colored Characters + ForEach(WorldPeaceArtView.CharacterPosition.allCases) { + Image(systemName: "\($0.value.character).circle") + .arrangeShape( + primaryColor: $0.value.color, + secondaryColor: .systemBackground, + fontWeight: .bold, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio - 0.006, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) + ) + } + + // MARK: - 􀀁 Sea + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .cyan, + width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) + ) + + // MARK: - 􀀁 Sea + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .cyan, + width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) + ) + + // MARK: - 􀵶 Earth + Image(systemName: "globe.asia.australia.fill") + .arrangeShape( + primaryColor: .green, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) + ) + + // MARK: - 􀵵 Earth frame + Image(systemName: "globe.asia.australia") + .arrangeShape( + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.57, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.57, forPreview: true) + ) + + // MARK: - 􀺎 Peace sign + Image(systemName: "peacesign") + .arrangeShape( + primaryColor: .white, + fontWeight: .thin, + width: model.calculatingProportionalValue(withRatio: 0.535, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.535, forPreview: true) + ) + } } } #Preview { WorldPeacePreviewView() - .environment(ArtWorkModel.init(screenSize: .init(width: 4600, height: 4600))) + .environment(ArtWorkModel.init(screenSize: .init(width: 4600, height: 4600))) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/Offset.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/Offset.swift deleted file mode 100644 index 9dfba23..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/Offset.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Offset.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import CoreGraphics - -struct Offset { - let x: CGFloat - let y: CGFloat -} From d2ed557ee077e62a871faea23fca2ebfbc146a7f Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 01:16:03 +0900 Subject: [PATCH 058/108] Remove old world peace art --- .../project.pbxproj | 40 ----- .../ArtWorks/ArtWorkView.swift | 4 +- .../ArtWorks/WorldPeace/Earth.swift | 36 ---- .../Entity/CharacterAppearance.swift | 14 -- .../WorldPeace/Entity/CharactersType.swift | 54 ------ .../WorldPeace/FiveCharactersView.swift | 60 ------- .../ArtWorks/WorldPeace/SFAlphabet.swift | 155 ------------------ .../ArtWorks/WorldPeace/WorldPeace.swift | 42 ----- 8 files changed, 2 insertions(+), 403 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtWorks/WorldPeace/Earth.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/WorldPeace/Entity/CharacterAppearance.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/WorldPeace/Entity/CharactersType.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/WorldPeace/FiveCharactersView.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/WorldPeace/SFAlphabet.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/WorldPeace/WorldPeace.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index fb77c00..1979ccf 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -10,10 +10,7 @@ 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971D9DE928C9731D00136A36 /* iOSDCJapan2022SymbolType.swift */; }; 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */; }; 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */; }; - 9748BE1D289399CF006DF0BE /* SFAlphabet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1C289399CF006DF0BE /* SFAlphabet.swift */; }; 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1F28939B04006DF0BE /* FlipType.swift */; }; - 9748BE232893B35A006DF0BE /* WorldPeace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE222893B35A006DF0BE /* WorldPeace.swift */; }; - 9748BE292893BFE3006DF0BE /* Earth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE282893BFE3006DF0BE /* Earth.swift */; }; 9748BE2C2893C428006DF0BE /* Bear.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE2B2893C428006DF0BE /* Bear.swift */; }; 9748BE2E2893C688006DF0BE /* AnimalOutline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE2D2893C688006DF0BE /* AnimalOutline.swift */; }; 9748BE302893C706006DF0BE /* AnimalNose.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE2F2893C706006DF0BE /* AnimalNose.swift */; }; @@ -40,9 +37,6 @@ 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2B28C2DDAA004E1720 /* Buildings.swift */; }; 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2E28C2E608004E1720 /* SmallFirework.swift */; }; 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */; }; - 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3928C82DBB004E1720 /* CharacterAppearance.swift */; }; - 97624C3C28C935F0004E1720 /* FiveCharactersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */; }; - 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3D28C93693004E1720 /* CharactersType.swift */; }; 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */; }; 9767DEFE2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */; }; 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */; }; @@ -81,10 +75,7 @@ 971D9DE928C9731D00136A36 /* iOSDCJapan2022SymbolType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022SymbolType.swift; sourceTree = ""; }; 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithFont.swift; sourceTree = ""; }; 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithWidthAndHeight.swift; sourceTree = ""; }; - 9748BE1C289399CF006DF0BE /* SFAlphabet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SFAlphabet.swift; sourceTree = ""; }; 9748BE1F28939B04006DF0BE /* FlipType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlipType.swift; sourceTree = ""; }; - 9748BE222893B35A006DF0BE /* WorldPeace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeace.swift; sourceTree = ""; }; - 9748BE282893BFE3006DF0BE /* Earth.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Earth.swift; sourceTree = ""; }; 9748BE2B2893C428006DF0BE /* Bear.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bear.swift; sourceTree = ""; }; 9748BE2D2893C688006DF0BE /* AnimalOutline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalOutline.swift; sourceTree = ""; }; 9748BE2F2893C706006DF0BE /* AnimalNose.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalNose.swift; sourceTree = ""; }; @@ -112,9 +103,6 @@ 97624C2B28C2DDAA004E1720 /* Buildings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Buildings.swift; sourceTree = ""; }; 97624C2E28C2E608004E1720 /* SmallFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallFirework.swift; sourceTree = ""; }; 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GeometryProxy+.swift"; sourceTree = ""; }; - 97624C3928C82DBB004E1720 /* CharacterAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharacterAppearance.swift; sourceTree = ""; }; - 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FiveCharactersView.swift; sourceTree = ""; }; - 97624C3D28C93693004E1720 /* CharactersType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharactersType.swift; sourceTree = ""; }; 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeacePreviewView.swift; sourceTree = ""; }; 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeace+CharacterPosition.swift"; sourceTree = ""; }; 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeaceArtView.swift; sourceTree = ""; }; @@ -161,15 +149,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 971D9DE528C93E5900136A36 /* Entity */ = { - isa = PBXGroup; - children = ( - 97624C3D28C93693004E1720 /* CharactersType.swift */, - 97624C3928C82DBB004E1720 /* CharacterAppearance.swift */, - ); - path = Entity; - sourceTree = ""; - }; 971D9DE628C93EB500136A36 /* Common */ = { isa = PBXGroup; children = ( @@ -203,18 +182,6 @@ path = Enums; sourceTree = ""; }; - 9748BE212893B2CD006DF0BE /* WorldPeace */ = { - isa = PBXGroup; - children = ( - 9748BE222893B35A006DF0BE /* WorldPeace.swift */, - 9748BE282893BFE3006DF0BE /* Earth.swift */, - 97624C3B28C935F0004E1720 /* FiveCharactersView.swift */, - 9748BE1C289399CF006DF0BE /* SFAlphabet.swift */, - 971D9DE528C93E5900136A36 /* Entity */, - ); - path = WorldPeace; - sourceTree = ""; - }; 9748BE2A2893C406006DF0BE /* PartyAnimals */ = { isa = PBXGroup; children = ( @@ -304,7 +271,6 @@ 9748BE4428980FE4006DF0BE /* DemonWrestler */, 9748BE3D2897ADBD006DF0BE /* ArmHair */, 9748BE2A2893C406006DF0BE /* PartyAnimals */, - 9748BE212893B2CD006DF0BE /* WorldPeace */, 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */, ); path = ArtWorks; @@ -587,7 +553,6 @@ 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */, 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, - 9748BE232893B35A006DF0BE /* WorldPeace.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */, 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, @@ -597,9 +562,7 @@ 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, 9767DEFE2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift in Sources */, - 97624C3E28C93693004E1720 /* CharactersType.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, - 97624C3A28C82DBB004E1720 /* CharacterAppearance.swift in Sources */, 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */, 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */, 9748BE3A2893D0E3006DF0BE /* Frog.swift in Sources */, @@ -610,8 +573,6 @@ 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, 9748BE6428A3936E006DF0BE /* ArtWorkView.swift in Sources */, 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */, - 97624C3C28C935F0004E1720 /* FiveCharactersView.swift in Sources */, - 9748BE292893BFE3006DF0BE /* Earth.swift in Sources */, 9748BE5F289F194E006DF0BE /* RocketFirework.swift in Sources */, 9748BE2E2893C688006DF0BE /* AnimalOutline.swift in Sources */, 9748BE322893C91F006DF0BE /* AnimalEye.swift in Sources */, @@ -619,7 +580,6 @@ 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, 97EF43A32B74D9BA003648F5 /* Image+arrangeShape.swift in Sources */, - 9748BE1D289399CF006DF0BE /* SFAlphabet.swift in Sources */, 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift b/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift index 1f5e4a2..40eacb2 100644 --- a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift +++ b/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift @@ -17,9 +17,9 @@ struct ArtWorkView: View { case .crayonBoy: EmptyView() case .magician: -EmptyView() + EmptyView() case .worldPeace: - WorldPeace() + EmptyView() case .partyAnimals: PartyAnimals() case .armHair: diff --git a/SFSymbolsArtCollection/ArtWorks/WorldPeace/Earth.swift b/SFSymbolsArtCollection/ArtWorks/WorldPeace/Earth.swift deleted file mode 100644 index ae39be7..0000000 --- a/SFSymbolsArtCollection/ArtWorks/WorldPeace/Earth.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// Earth.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct Earth: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - Image(symbol: .circleFill) - .arrangeShape(color: .cyan, - fontSize: baseLength * 0.5) - - Image(symbol: .globeAsiaAustraliaFill) - .arrangeShape(color: .green, - fontSize: baseLength * 0.55, - fontWeight: .ultraLight) - - Image(symbol: .globeAsiaAustralia) - .arrangeShape(fontSize: baseLength * 0.55, - fontWeight: .ultraLight) - } - } -} - -struct Earth_Previews: PreviewProvider { - static var previews: some View { - Earth(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/WorldPeace/Entity/CharacterAppearance.swift b/SFSymbolsArtCollection/ArtWorks/WorldPeace/Entity/CharacterAppearance.swift deleted file mode 100644 index 1b98621..0000000 --- a/SFSymbolsArtCollection/ArtWorks/WorldPeace/Entity/CharacterAppearance.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// CharacterAppearance.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/07. -// - -import SwiftUI - -struct CharacterAppearance: Hashable { - let alphabet: SFAlphabet.Alphabet - let color: Color - let offsetX: CGFloat -} diff --git a/SFSymbolsArtCollection/ArtWorks/WorldPeace/Entity/CharactersType.swift b/SFSymbolsArtCollection/ArtWorks/WorldPeace/Entity/CharactersType.swift deleted file mode 100644 index 24bd3c7..0000000 --- a/SFSymbolsArtCollection/ArtWorks/WorldPeace/Entity/CharactersType.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// CharactersType.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/08. -// - -import CoreGraphics - -enum CharactersType { - case world - case peace - - func characterAppearances(with baseLength: CGFloat) -> [CharacterAppearance] { - switch self { - case .world: - return [ - CharacterAppearance(alphabet: .w, - color: .red, - offsetX: 0), - CharacterAppearance(alphabet: .o, - color: .yellow, - offsetX: baseLength * -0.05), - CharacterAppearance(alphabet: .r, - color: .green, - offsetX: baseLength * -0.1), - CharacterAppearance(alphabet: .l, - color: .blue, - offsetX: baseLength * -0.15), - CharacterAppearance(alphabet: .d, - color: .purple, - offsetX: baseLength * -0.2) - ] - case .peace: - return [ - CharacterAppearance(alphabet: .p, - color: .cyan, - offsetX: 0), - CharacterAppearance(alphabet: .e, - color: .pink, - offsetX: baseLength * -0.05), - CharacterAppearance(alphabet: .a, - color: .mint, - offsetX: baseLength * -0.1), - CharacterAppearance(alphabet: .c, - color: .indigo, - offsetX: baseLength * -0.15), - CharacterAppearance(alphabet: .e, - color: .orange, - offsetX: baseLength * -0.2) - ] - } - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/WorldPeace/FiveCharactersView.swift b/SFSymbolsArtCollection/ArtWorks/WorldPeace/FiveCharactersView.swift deleted file mode 100644 index be3c93d..0000000 --- a/SFSymbolsArtCollection/ArtWorks/WorldPeace/FiveCharactersView.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// FiveCharactersView.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/08. -// - -import SwiftUI - -// MARK: - Initializer -extension FiveCharactersView { - - init(type: CharactersType, baseLength: CGFloat) { - self.baseLength = baseLength - characters = type.characterAppearances(with: baseLength) - } -} - -struct FiveCharactersView: View { - - let baseLength: CGFloat - let characters: [CharacterAppearance] - - var body: some View { - ZStack { - HStack(spacing: 0) { - ForEach(characters, id: \.self) { character in - SFAlphabet(character.alphabet, - fontSize: baseLength * 0.175, - fontWeight: .bold, - offsetX: character.offsetX) - } - } - .offset(x: baseLength * 0.12, - y: 0) - - HStack(spacing: 0) { - ForEach(characters, id: \.self) { character in - SFAlphabet(character.alphabet, - color: character.color, - fontSize: baseLength * 0.175, - fontWeight: .bold, - offsetX: character.offsetX, - offsetY: 0) - } - } - .offset(x: baseLength * 0.1125, - y: 0) - } - } -} - -struct FiveCharactersView_Previews: PreviewProvider { - static var previews: some View { - FiveCharactersView(type: .world, - baseLength: 400) - FiveCharactersView(type: .peace, - baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/WorldPeace/SFAlphabet.swift b/SFSymbolsArtCollection/ArtWorks/WorldPeace/SFAlphabet.swift deleted file mode 100644 index bd052dc..0000000 --- a/SFSymbolsArtCollection/ArtWorks/WorldPeace/SFAlphabet.swift +++ /dev/null @@ -1,155 +0,0 @@ -// -// SFCharacter.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI -import SFUserFriendlySymbols - -extension SFAlphabet { - - init(_ alphabet: Alphabet, - color: Color = .black, - frameColor: Color = .white, - fontSize: CGFloat, - fontWeight: Font.Weight = .regular, - flipType: FlipType = .none, - rotationDegrees: CGFloat = 0, - offsetX: CGFloat = 0, - offsetY: CGFloat = 0) { - self.alphabet = alphabet - self.color = color - self.frameColor = frameColor - self.fontSize = fontSize - self.fontWeight = fontWeight - self.flipType = flipType - self.rotationDegrees = rotationDegrees - self.offsetX = offsetX - self.offsetY = offsetY - } -} - -struct SFAlphabet: View { - - enum Alphabet: String { - - case a = "a.circle" - case b = "b.circle" - case c = "c.circle" - case d = "d.circle" - case e = "e.circle" - case f = "f.circle" - case g = "g.circle" - case h = "h.circle" - case i = "i.circle" - case j = "j.circle" - case k = "k.circle" - case l = "l.circle" - case m = "m.circle" - case n = "n.circle" - case o = "o.circle" - case p = "p.circle" - case q = "q.circle" - case r = "r.circle" - case s = "s.circle" - case t = "t.circle" - case u = "u.circle" - case v = "v.circle" - case w = "w.circle" - case x = "x.circle" - case y = "y.circle" - case z = "z.circle" - - var symbolInCircle: SFSymbols { - return SFSymbols(rawValue: self.rawValue) ?? .xmark - } - } - - private let alphabet: Alphabet - private let color: Color - /// Circle-frame color - private let frameColor: Color - private let fontSize: CGFloat - private let fontWeight: Font.Weight - private let flipType: FlipType - private let rotationDegrees: CGFloat - private let offsetX: CGFloat - private let offsetY: CGFloat - - var body: some View { - ZStack { - - Image(symbol: alphabet.symbolInCircle) - .arrangeShape(color: color, - fontSize: fontSize, - fontWeight: fontWeight, - flipType: flipType, - rotationDegrees: rotationDegrees, - offsetX: offsetX, - offsetY: offsetY) - - // Hide Circle-Frame - Group { - - Image(symbol: .circle) - .arrangeShape(color: frameColor, - fontSize: fontSize * 1.1, - fontWeight: fontWeight, - flipType: flipType, - rotationDegrees: rotationDegrees, - offsetX: offsetX, - offsetY: offsetY) - - Image(symbol: .circle) - .arrangeShape(color: frameColor, - fontSize: fontSize * 1.05, - fontWeight: fontWeight, - flipType: flipType, - rotationDegrees: rotationDegrees, - offsetX: offsetX, - offsetY: offsetY) - - Image(symbol: .circle) - .arrangeShape(color: frameColor, - fontSize: fontSize, - fontWeight: fontWeight, - flipType: flipType, - rotationDegrees: rotationDegrees, - offsetX: offsetX, - offsetY: offsetY) - - Image(symbol: .circle) - .arrangeShape(color: frameColor, - fontSize: fontSize * 0.95, - fontWeight: fontWeight, - flipType: flipType, - rotationDegrees: rotationDegrees, - offsetX: offsetX, - offsetY: offsetY) - - Image(symbol: .circle) - .arrangeShape(color: frameColor, - fontSize: fontSize * 0.9, - fontWeight: fontWeight, - flipType: flipType, - rotationDegrees: rotationDegrees, - offsetX: offsetX, - offsetY: offsetY) - } - } - } -} - -struct SFCharacter_Previews: PreviewProvider { - static var previews: some View { - VStack { - SFAlphabet(.a, fontSize: 200) - SFAlphabet(.h, fontSize: 100) - SFAlphabet(.a, fontSize: 25, fontWeight: .black) - SFAlphabet(.a, fontSize: 10, fontWeight: .black) - SFAlphabet(.a, fontSize: 1, fontWeight: .black) - } - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/WorldPeace/WorldPeace.swift b/SFSymbolsArtCollection/ArtWorks/WorldPeace/WorldPeace.swift deleted file mode 100644 index 71a9a32..0000000 --- a/SFSymbolsArtCollection/ArtWorks/WorldPeace/WorldPeace.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// ColorfulAlphabets.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct WorldPeace: View { - var body: some View { - - GeometryReader { proxy in - - let baseLength = proxy.baseLength - - VStack { - - FiveCharactersView(type: .world, - baseLength: baseLength) - ZStack { - Earth(baseLength: baseLength) - - Image(symbol: .peacesign) - .arrangeShape(color: .white, - fontSize: baseLength * 0.52, - fontWeight: .thin) - } - - FiveCharactersView(type: .peace, - baseLength: baseLength) - } - .position(proxy.localCenter) - } - } -} - -struct WorldPeace_Previews: PreviewProvider { - static var previews: some View { - WorldPeace() - } -} From 5a9b5e372e6f5040548f5ff70e8c3af2b7fe1b1b Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 10:30:24 +0900 Subject: [PATCH 059/108] WIP: PartyAnimalsArt --- .../project.pbxproj | 16 + .../ArtWorks/PartyAnimals/PartyAnimals.swift | 1 + .../PartyAnimals/PartyAnimalsArtView.swift | 414 ++++++++++++++++++ .../PartyAnimalsPreviewView.swift | 325 ++++++++++++++ .../WorldPeace/WorldPeaceArtView.swift | 2 +- 5 files changed, 757 insertions(+), 1 deletion(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 1979ccf..ea02529 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -40,6 +40,8 @@ 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */; }; 9767DEFE2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */; }; 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */; }; + 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */; }; + 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -106,6 +108,8 @@ 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeacePreviewView.swift; sourceTree = ""; }; 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeace+CharacterPosition.swift"; sourceTree = ""; }; 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeaceArtView.swift; sourceTree = ""; }; + 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsPreviewView.swift; sourceTree = ""; }; + 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsArtView.swift; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -297,6 +301,15 @@ path = WorldPeace; sourceTree = ""; }; + 9767DF012B759AFC00457DA1 /* PartyAnimals */ = { + isa = PBXGroup; + children = ( + 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */, + 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */, + ); + path = PartyAnimals; + sourceTree = ""; + }; 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */ = { isa = PBXGroup; children = ( @@ -343,6 +356,7 @@ 97EF43962B7332FB003648F5 /* Magician */, 97EF439F2B74CA22003648F5 /* CrayonBoy */, 9767DEF82B751C1300457DA1 /* WorldPeace */, + 9767DF012B759AFC00457DA1 /* PartyAnimals */, 97AD531E2B70E2770034FB5D /* AfroBoy */, 97EF43892B725DE7003648F5 /* Nosebleed */, 97EF43912B72D3AF003648F5 /* ImWearingPants */, @@ -597,9 +611,11 @@ 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */, 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */, 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */, + 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */, 9748BE352893CB67006DF0BE /* Lion.swift in Sources */, 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, 97AD53222B70E3FA0034FB5D /* AnimatableSymbolView.swift in Sources */, + 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */, 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/PartyAnimals.swift b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/PartyAnimals.swift index 1159664..158d397 100644 --- a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/PartyAnimals.swift +++ b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/PartyAnimals.swift @@ -70,5 +70,6 @@ struct PartyAnimals: View { struct PartyAnimals_Previews: PreviewProvider { static var previews: some View { PartyAnimals() + .scaleEffect(0.7) } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift new file mode 100644 index 0000000..8e3036d --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift @@ -0,0 +1,414 @@ +// +// PartyAnimalsArtView.swift +// SFSymbolsArtCollection +// +// Created by 平岡修 on 2024/02/09. +// + +import SwiftUI + +extension PartyAnimalsArtView { + + enum PawPosition: String, CaseIterable, Identifiable { + case first + case second + case third + case fourth + + struct Value { + let color: Color + let rotationDegrees: CGFloat + let horizontalOffsetRatio: CGFloat + let verticalOffsetRatio: CGFloat + } + + var id: String { self.rawValue } + + var value: Value { + switch self { + case .first: + Value(color: .red, + rotationDegrees: 24, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: -0.5) + case .second: + Value(color: .orange, + rotationDegrees: -24, + horizontalOffsetRatio: -0.14, + verticalOffsetRatio: -0.36) + case .third: + Value(color: .teal, + rotationDegrees: 30, + horizontalOffsetRatio: -0.3, + verticalOffsetRatio: 0.26) + case .fourth: + Value(color: .blue, + rotationDegrees: -14, + horizontalOffsetRatio: -0.14, + verticalOffsetRatio: 0.44) + } + } + } +} + +struct PartyAnimalsArtView: View { + + @Environment(ArtWorkModel.self) var model + @State private var isAnimating = false + + var body: some View { + + ZStack { + bear() + flog() + lion() + + // MARK: - 􀾟 Paw + ForEach(PawPosition.allCases) { + + AnimatableSymbolView( + name: "pawprint.fill", + initialPosition: .third(.first), + primaryColor: $0.value.color, + widthRatio: 0.13, + heightRatio: 0.13, + rotationDegrees: $0.value.rotationDegrees, + horizontalOffsetRatio: $0.value.horizontalOffsetRatio, + verticalOffsetRatio: $0.value.verticalOffsetRatio, + isAnimating: isAnimating, + symbolCountToWaitFor: 3 + ) + } + } + .navigationTitle("Party animals") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + } + + // MARK: - Bear + private func bear() -> some View { + ZStack { + // MARK: - 􀀁 Bear ear + AnimatableSymbolView( + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .brown, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.08, + verticalOffsetRatio: -0.37, + isAnimating: isAnimating, + symbolCountToWaitFor: 3 + ) + + AnimatableSymbolView( + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .brown, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.32, + verticalOffsetRatio: -0.37, + isAnimating: isAnimating, + symbolCountToWaitFor: 3 + ) + + // MARK: - 􀩹 Bear Inside ear + AnimatableSymbolView( + name: "button.roundedtop.horizontal.fill", + initialPosition: .third(.fourth), + primaryColor: .palePink, + widthRatio: 0.06, + heightRatio: 0.06, + rotationDegrees: -20, + horizontalOffsetRatio: 0.08, + verticalOffsetRatio: -0.37, + isAnimating: isAnimating, + symbolCountToWaitFor: 4 + ) + + AnimatableSymbolView( + name: "button.roundedtop.horizontal.fill", + initialPosition: .third(.fourth), + primaryColor: .palePink, + widthRatio: 0.06, + heightRatio: 0.06, + rotationDegrees: 20, + horizontalOffsetRatio: 0.32, + verticalOffsetRatio: -0.37, + isAnimating: isAnimating, + symbolCountToWaitFor: 4 + ) + + // MARK: - 􀲟 Bear outline + AnimatableSymbolView( + name: "oval.fill", + initialPosition: .third(.fifth), + primaryColor: .brown, + widthRatio: 0.4, + heightRatio: 0.325, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: -0.2, + isAnimating: isAnimating, + symbolCountToWaitFor: 5 + ) + + // MARK: - 􀢚 Bear Eye + AnimatableSymbolView( + name: "record.circle.fill", + initialPosition: .third(.sixth), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: 0.13, + verticalOffsetRatio: -0.23, + isAnimating: isAnimating, + symbolCountToWaitFor: 6 + ) + + AnimatableSymbolView( + name: "record.circle.fill", + initialPosition: .third(.sixth), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: 0.27, + verticalOffsetRatio: -0.23, + isAnimating: isAnimating, + symbolCountToWaitFor: 6 + ) + + // MARK: - 􀁹 Bear mouth + AnimatableSymbolView( + name: "arrow.down.circle.fill", + initialPosition: .third(.sixth), + primaryColor: .black, + secondaryColor: .white, + widthRatio: 0.125, + heightRatio: 0.125, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: -0.15, + isAnimating: isAnimating, + symbolCountToWaitFor: 7 + ) + + // MARK: - 􀆼 Bear Nose + AnimatableSymbolView( + name: "moon.circle.fill", + initialPosition: .third(.seventh), + primaryColor: .white, + secondaryColor: .red, + widthRatio: 0.04, + heightRatio: 0.04, + rotationDegrees: 170, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: -0.17, + isAnimating: isAnimating, + symbolCountToWaitFor: 8 + ) + } + } + + // MARK: - Flog + private func flog() -> some View { + ZStack { + // MARK: - 􀀁 Flog eye + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .green, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) + ) + + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .green, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) + ) + + // MARK: - 􀢚 Flog Eye + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) + ) + + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) + ) + + // MARK: - 􀲟 Flog outline + Image(systemName: "oval.fill") + .arrangeShape( + primaryColor: .green, + width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.325, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0, forPreview: true) + ) + + // MARK: - 􀆈 Flog outline + Image(systemName: "chevron.down") + .arrangeShape( + fontWeight: .bold, + width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.025, forPreview: true) + ) + } + } + + // MARK: - Lion + private func lion() -> some View { + ZStack { + + // MARK: - Lion mane + Image(systemName: "seal.fill") + .arrangeShape( + primaryColor: .orange, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), + rotationDegrees: 20, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) + ) + + Image(systemName: "seal.fill") + .arrangeShape( + primaryColor: .orange, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) + ) + + // MARK: - 􀀁 Bear ear + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) + ) + + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) + ) + + // MARK: - 􀲟 Lion outline + Image(systemName: "oval.fill") + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.29, forPreview: true) + ) + + // MARK: - 􀢚 Lion Eye + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) + ) + + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) + ) + + // MARK: - Lion whiskers + Image(systemName: "rays") + .arrangeShape( + primaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.175, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.235, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.33, forPreview: true) + ) + + Image(systemName: "rays") + .arrangeShape( + primaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.175, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.165, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.33, forPreview: true) + ) + + // MARK: - 􀁹 Lion mouth + Image(systemName: "arrow.down.circle.fill") + .arrangeShape( + primaryColor: .black, + secondaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.34, forPreview: true) + ) + + // MARK: - 􀆼 Lion Nose + Image(systemName: "moon.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .darkBrown, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + rotationDegrees: 170, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true) + ) + } + } +} + +#Preview { + NavigationStack { + PartyAnimalsArtView() + .environment(ArtWorkModel.preview) + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift new file mode 100644 index 0000000..b1b1b88 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift @@ -0,0 +1,325 @@ +// +// PartyAnimalsPreviewView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct PartyAnimalsPreviewView: View { + + @Environment(ArtWorkModel.self) var model + + var body: some View { + + ZStack { + bear() + flog() + lion() + + // MARK: - 􀾟 Paw + ForEach(PartyAnimalsArtView.PawPosition.allCases) { + + Image(systemName: "pawprint.fill") + .arrangeShape( + primaryColor: $0.value.color, + width: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), + rotationDegrees: $0.value.rotationDegrees, + horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) + ) + } + } + } + + // MARK: - Bear + private func bear() -> some View { + ZStack { + // MARK: - 􀀁 Bear ear + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .brown, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.37, forPreview: true) + ) + + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .brown, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.37, forPreview: true) + ) + + // MARK: - 􀩹 Bear Inside ear + Image(systemName: "button.roundedtop.horizontal.fill") + .arrangeShape( + primaryColor: .palePink, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + rotationDegrees: -20, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.37, forPreview: true) + ) + + Image(systemName: "button.roundedtop.horizontal.fill") + .arrangeShape( + primaryColor: .palePink, + width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + rotationDegrees: 20, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.37, forPreview: true) + ) + + // MARK: - 􀲟 Bear outline + Image(systemName: "oval.fill") + .arrangeShape( + primaryColor: .brown, + width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.325, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true) + ) + + // MARK: - 􀢚 Bear Eye + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.23, forPreview: true) + ) + + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.23, forPreview: true) + ) + + // MARK: - 􀁹 Bear mouth + Image(systemName: "arrow.down.circle.fill") + .arrangeShape( + primaryColor: .black, + secondaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.15, forPreview: true) + ) + + // MARK: - 􀆼 Bear Nose + Image(systemName: "moon.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .red, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + rotationDegrees: 170, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.17, forPreview: true) + ) + } + } + + // MARK: - Flog + private func flog() -> some View { + ZStack { + // MARK: - 􀀁 Flog eye + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .green, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) + ) + + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .green, + width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) + ) + + // MARK: - 􀢚 Flog Eye + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) + ) + + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) + ) + + // MARK: - 􀲟 Flog outline + Image(systemName: "oval.fill") + .arrangeShape( + primaryColor: .green, + width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.325, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0, forPreview: true) + ) + + // MARK: - 􀆈 Flog outline + Image(systemName: "chevron.down") + .arrangeShape( + fontWeight: .bold, + width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.025, forPreview: true) + ) + } + } + + // MARK: - Lion + private func lion() -> some View { + ZStack { + + // MARK: - Lion mane + Image(systemName: "seal.fill") + .arrangeShape( + primaryColor: .orange, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), + rotationDegrees: 20, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) + ) + + Image(systemName: "seal.fill") + .arrangeShape( + primaryColor: .orange, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) + ) + + // MARK: - 􀀁 Bear ear + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) + ) + + Image(systemName: "circle.fill") + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) + ) + + // MARK: - 􀲟 Lion outline + Image(systemName: "oval.fill") + .arrangeShape( + primaryColor: .yellow, + width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.29, forPreview: true) + ) + + // MARK: - 􀢚 Lion Eye + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) + ) + + Image(systemName: "record.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) + ) + + // MARK: - Lion whiskers + Image(systemName: "rays") + .arrangeShape( + primaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.175, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.235, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.33, forPreview: true) + ) + + Image(systemName: "rays") + .arrangeShape( + primaryColor: .darkBrown, + width: model.calculatingProportionalValue(withRatio: 0.175, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.165, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.33, forPreview: true) + ) + + // MARK: - 􀁹 Lion mouth + Image(systemName: "arrow.down.circle.fill") + .arrangeShape( + primaryColor: .black, + secondaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.34, forPreview: true) + ) + + // MARK: - 􀆼 Lion Nose + Image(systemName: "moon.circle.fill") + .arrangeShape( + primaryColor: .white, + secondaryColor: .darkBrown, + fontWeight: .ultraLight, + width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), + rotationDegrees: 170, + horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), + verticalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true) + ) + } + } +} + +#Preview { + PartyAnimalsPreviewView() + .environment(ArtWorkModel.init(screenSize: .init(width: 4600, height: 4600))) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift index 8e8b921..f069b8d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift @@ -17,7 +17,7 @@ struct WorldPeaceArtView: View { ZStack { // MARK: - Characters black shadow - ForEach(WorldPeaceArtView.CharacterPosition.allCases) { + ForEach(CharacterPosition.allCases) { AnimatableSymbolView( name: "\($0.value.character).circle", From e8c904d0f2f9f72606405317cb044a000b895e06 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 11:17:02 +0900 Subject: [PATCH 060/108] Refactor PawPositon --- .../project.pbxproj | 4 + .../PartyAnimalsArtView+RawPosition.swift | 53 +++ .../PartyAnimals/PartyAnimalsArtView.swift | 423 +++++++++--------- .../PartyAnimalsPreviewView.swift | 9 +- 4 files changed, 280 insertions(+), 209 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+RawPosition.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index ea02529..8b8ba09 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -42,6 +42,7 @@ 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */; }; 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */; }; 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */; }; + 9767DF092B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -110,6 +111,7 @@ 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeaceArtView.swift; sourceTree = ""; }; 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsPreviewView.swift; sourceTree = ""; }; 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsArtView.swift; sourceTree = ""; }; + 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PartyAnimalsArtView+RawPosition.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -306,6 +308,7 @@ children = ( 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */, 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */, + 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */, ); path = PartyAnimals; sourceTree = ""; @@ -587,6 +590,7 @@ 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, 9748BE6428A3936E006DF0BE /* ArtWorkView.swift in Sources */, 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */, + 9767DF092B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift in Sources */, 9748BE5F289F194E006DF0BE /* RocketFirework.swift in Sources */, 9748BE2E2893C688006DF0BE /* AnimalOutline.swift in Sources */, 9748BE322893C91F006DF0BE /* AnimalEye.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+RawPosition.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+RawPosition.swift new file mode 100644 index 0000000..d93bbe4 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+RawPosition.swift @@ -0,0 +1,53 @@ +// +// PartyAnimalsArtView+RawPosition.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension PartyAnimalsArtView { + + enum PawPosition: String, CaseIterable, Identifiable { + case first + case second + case third + case fourth + + struct Value { + let color: Color + let rotationDegrees: CGFloat + let horizontalOffsetRatio: CGFloat + let verticalOffsetRatio: CGFloat + } + + var id: String { self.rawValue } + + var value: Value { + switch self { + case .first: + Value(color: .red, + rotationDegrees: 24, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: -0.5) + case .second: + Value(color: .orange, + rotationDegrees: -24, + horizontalOffsetRatio: -0.14, + verticalOffsetRatio: -0.36) + case .third: + Value(color: .teal, + rotationDegrees: 30, + horizontalOffsetRatio: -0.3, + verticalOffsetRatio: 0.26) + case .fourth: + Value(color: .blue, + rotationDegrees: -14, + horizontalOffsetRatio: -0.14, + verticalOffsetRatio: 0.44) + } + } + } +} + diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift index 8e3036d..5d6ac94 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift @@ -2,55 +2,11 @@ // PartyAnimalsArtView.swift // SFSymbolsArtCollection // -// Created by 平岡修 on 2024/02/09. +// Created by Lil Ossa // import SwiftUI -extension PartyAnimalsArtView { - - enum PawPosition: String, CaseIterable, Identifiable { - case first - case second - case third - case fourth - - struct Value { - let color: Color - let rotationDegrees: CGFloat - let horizontalOffsetRatio: CGFloat - let verticalOffsetRatio: CGFloat - } - - var id: String { self.rawValue } - - var value: Value { - switch self { - case .first: - Value(color: .red, - rotationDegrees: 24, - horizontalOffsetRatio: -0.34, - verticalOffsetRatio: -0.5) - case .second: - Value(color: .orange, - rotationDegrees: -24, - horizontalOffsetRatio: -0.14, - verticalOffsetRatio: -0.36) - case .third: - Value(color: .teal, - rotationDegrees: 30, - horizontalOffsetRatio: -0.3, - verticalOffsetRatio: 0.26) - case .fourth: - Value(color: .blue, - rotationDegrees: -14, - horizontalOffsetRatio: -0.14, - verticalOffsetRatio: 0.44) - } - } - } -} - struct PartyAnimalsArtView: View { @Environment(ArtWorkModel.self) var model @@ -76,7 +32,7 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: $0.value.horizontalOffsetRatio, verticalOffsetRatio: $0.value.verticalOffsetRatio, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 2 ) } } @@ -108,7 +64,7 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: 0.08, verticalOffsetRatio: -0.37, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 1 ) AnimatableSymbolView( @@ -120,7 +76,7 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: 0.32, verticalOffsetRatio: -0.37, isAnimating: isAnimating, - symbolCountToWaitFor: 3 + symbolCountToWaitFor: 1 ) // MARK: - 􀩹 Bear Inside ear @@ -134,7 +90,7 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: 0.08, verticalOffsetRatio: -0.37, isAnimating: isAnimating, - symbolCountToWaitFor: 4 + symbolCountToWaitFor: 0 ) AnimatableSymbolView( @@ -147,7 +103,7 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: 0.32, verticalOffsetRatio: -0.37, isAnimating: isAnimating, - symbolCountToWaitFor: 4 + symbolCountToWaitFor: 0 ) // MARK: - 􀲟 Bear outline @@ -160,12 +116,13 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: 0.2, verticalOffsetRatio: -0.2, isAnimating: isAnimating, - symbolCountToWaitFor: 5 + symbolCountToWaitFor: 8 ) // MARK: - 􀢚 Bear Eye AnimatableSymbolView( name: "record.circle.fill", + initialPrimaryColor: .systemBackground, initialPosition: .third(.sixth), primaryColor: .white, secondaryColor: .darkBrown, @@ -174,11 +131,12 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: 0.13, verticalOffsetRatio: -0.23, isAnimating: isAnimating, - symbolCountToWaitFor: 6 + symbolCountToWaitFor: 7 ) AnimatableSymbolView( name: "record.circle.fill", + initialPrimaryColor: .systemBackground, initialPosition: .third(.sixth), primaryColor: .white, secondaryColor: .darkBrown, @@ -187,13 +145,14 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: 0.27, verticalOffsetRatio: -0.23, isAnimating: isAnimating, - symbolCountToWaitFor: 6 + symbolCountToWaitFor: 7 ) // MARK: - 􀁹 Bear mouth AnimatableSymbolView( name: "arrow.down.circle.fill", - initialPosition: .third(.sixth), + initialPrimaryColor: .systemBackground, + initialPosition: .second(.third), primaryColor: .black, secondaryColor: .white, widthRatio: 0.125, @@ -201,12 +160,13 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: 0.2, verticalOffsetRatio: -0.15, isAnimating: isAnimating, - symbolCountToWaitFor: 7 + symbolCountToWaitFor: 5 ) // MARK: - 􀆼 Bear Nose AnimatableSymbolView( name: "moon.circle.fill", + initialPrimaryColor: .systemBackground, initialPosition: .third(.seventh), primaryColor: .white, secondaryColor: .red, @@ -216,7 +176,7 @@ struct PartyAnimalsArtView: View { horizontalOffsetRatio: 0.2, verticalOffsetRatio: -0.17, isAnimating: isAnimating, - symbolCountToWaitFor: 8 + symbolCountToWaitFor: 6 ) } } @@ -224,63 +184,82 @@ struct PartyAnimalsArtView: View { // MARK: - Flog private func flog() -> some View { ZStack { - // MARK: - 􀀁 Flog eye - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .green, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) - ) + // MARK: - 􀀁 Flog eye outline + AnimatableSymbolView( + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .green, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.32, + verticalOffsetRatio: -0.18, + isAnimating: isAnimating, + symbolCountToWaitFor: 1 + ) - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .green, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) - ) + AnimatableSymbolView( + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .green, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.08, + verticalOffsetRatio: -0.18, + isAnimating: isAnimating, + symbolCountToWaitFor: 1 + ) // MARK: - 􀢚 Flog Eye - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) - ) + AnimatableSymbolView( + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: -0.32, + verticalOffsetRatio: -0.18, + isAnimating: isAnimating, + symbolCountToWaitFor: 7 + ) - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) - ) + AnimatableSymbolView( + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: -0.08, + verticalOffsetRatio: -0.18, + isAnimating: isAnimating, + symbolCountToWaitFor: 7 + ) // MARK: - 􀲟 Flog outline - Image(systemName: "oval.fill") - .arrangeShape( - primaryColor: .green, - width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.325, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0, forPreview: true) - ) + AnimatableSymbolView( + name: "oval.fill", + initialPosition: .third(.fifth), + primaryColor: .green, + widthRatio: 0.4, + heightRatio: 0.325, + horizontalOffsetRatio: -0.2, + isAnimating: isAnimating, + symbolCountToWaitFor: 8 + ) - // MARK: - 􀆈 Flog outline - Image(systemName: "chevron.down") - .arrangeShape( - fontWeight: .bold, - width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.025, forPreview: true) - ) + // MARK: - 􀆈 Flog mouth + AnimatableSymbolView( + name: "chevron.down", + initialPosition: .second(.first), + fontWeight: .bold, + widthRatio: 0.1, + heightRatio: 0.05, + horizontalOffsetRatio: -0.2, + verticalOffsetRatio: 0.025, + isAnimating: isAnimating, + symbolCountToWaitFor: 3 + ) } } @@ -289,119 +268,155 @@ struct PartyAnimalsArtView: View { ZStack { // MARK: - Lion mane - Image(systemName: "seal.fill") - .arrangeShape( - primaryColor: .orange, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), - rotationDegrees: 20, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) - ) + AnimatableSymbolView( + name: "seal.fill", + initialPosition: .third(.second), + primaryColor: .orange, + fontWeight: .ultraLight, + widthRatio: 0.52, + heightRatio: 0.52, + rotationDegrees: 20, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.26, + isAnimating: isAnimating, + symbolCountToWaitFor: 9 + ) - Image(systemName: "seal.fill") - .arrangeShape( - primaryColor: .orange, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) - ) + AnimatableSymbolView( + name: "seal.fill", + initialPosition: .third(.second), + primaryColor: .orange, + fontWeight: .ultraLight, + widthRatio: 0.52, + heightRatio: 0.52, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.26, + isAnimating: isAnimating, + symbolCountToWaitFor: 9 + ) - // MARK: - 􀀁 Bear ear - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) - ) + // MARK: - 􀀁 Lion ear + AnimatableSymbolView( + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .yellow, + widthRatio: 0.12, + heightRatio: 0.12, + horizontalOffsetRatio: 0.08, + verticalOffsetRatio: 0.17, + isAnimating: isAnimating, + symbolCountToWaitFor: 1 + ) - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) - ) + AnimatableSymbolView( + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .yellow, + widthRatio: 0.12, + heightRatio: 0.12, + horizontalOffsetRatio: 0.32, + verticalOffsetRatio: 0.17, + isAnimating: isAnimating, + symbolCountToWaitFor: 1 + ) // MARK: - 􀲟 Lion outline - Image(systemName: "oval.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.29, forPreview: true) - ) + AnimatableSymbolView( + name: "oval.fill", + initialPosition: .third(.fifth), + primaryColor: .yellow, + widthRatio: 0.3, + heightRatio: 0.26, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.29, + isAnimating: isAnimating, + symbolCountToWaitFor: 8 + ) // MARK: - 􀢚 Lion Eye - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) - ) + AnimatableSymbolView( + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: 0.13, + verticalOffsetRatio: 0.26, + isAnimating: isAnimating, + symbolCountToWaitFor: 7 + ) - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) - ) + AnimatableSymbolView( + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: 0.27, + verticalOffsetRatio: 0.26, + isAnimating: isAnimating, + symbolCountToWaitFor: 7 + ) // MARK: - Lion whiskers - Image(systemName: "rays") - .arrangeShape( - primaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.175, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.235, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.33, forPreview: true) - ) + AnimatableSymbolView( + name: "rays", + initialPosition: .second(.second), + primaryColor: .darkBrown, + widthRatio: 0.175, + heightRatio: 0.06, + horizontalOffsetRatio: 0.235, + verticalOffsetRatio: 0.33, + isAnimating: isAnimating, + symbolCountToWaitFor: 4 + ) - Image(systemName: "rays") - .arrangeShape( - primaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.175, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.165, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.33, forPreview: true) - ) + AnimatableSymbolView( + name: "rays", + initialPosition: .second(.second), + primaryColor: .darkBrown, + widthRatio: 0.175, + heightRatio: 0.06, + horizontalOffsetRatio: 0.165, + verticalOffsetRatio: 0.33, + isAnimating: isAnimating, + symbolCountToWaitFor: 4 + ) // MARK: - 􀁹 Lion mouth - Image(systemName: "arrow.down.circle.fill") - .arrangeShape( - primaryColor: .black, - secondaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.34, forPreview: true) - ) + AnimatableSymbolView( + name: "arrow.down.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .second(.third), + primaryColor: .black, + secondaryColor: .white, + widthRatio: 0.125, + heightRatio: 0.11, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.34, + isAnimating: isAnimating, + symbolCountToWaitFor: 5 + ) // MARK: - 􀆼 Lion Nose - Image(systemName: "moon.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .darkBrown, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - rotationDegrees: 170, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true) - ) + AnimatableSymbolView( + name: "moon.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.seventh), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.04, + heightRatio: 0.04, + rotationDegrees: 170, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.32, + isAnimating: isAnimating, + symbolCountToWaitFor: 6 + ) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift index b1b1b88..3048ecb 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift @@ -137,7 +137,7 @@ struct PartyAnimalsPreviewView: View { // MARK: - Flog private func flog() -> some View { ZStack { - // MARK: - 􀀁 Flog eye + // MARK: - 􀀁 Flog eye outline Image(systemName: "circle.fill") .arrangeShape( primaryColor: .green, @@ -181,11 +181,10 @@ struct PartyAnimalsPreviewView: View { primaryColor: .green, width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), height: model.calculatingProportionalValue(withRatio: 0.325, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0, forPreview: true) + horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true) ) - // MARK: - 􀆈 Flog outline + // MARK: - 􀆈 Flog mouth Image(systemName: "chevron.down") .arrangeShape( fontWeight: .bold, @@ -223,7 +222,7 @@ struct PartyAnimalsPreviewView: View { verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) ) - // MARK: - 􀀁 Bear ear + // MARK: - 􀀁 Lion ear Image(systemName: "circle.fill") .arrangeShape( primaryColor: .yellow, From 4619c57aab09ed3b42cedcd284524f6a899caa63 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 11:18:47 +0900 Subject: [PATCH 061/108] Update ArtGallery --- .../ArtisticWorldOfSFSymbols/ArtGalleryView.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 2d0c2d3..f23624d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -61,6 +61,13 @@ struct ArtGalleryView: View { .galleryGridItemView(length: model.galleryColumnLength) } + NavigationLink { + PartyAnimalsArtView() + } label: { + PartyAnimalsPreviewView() + .galleryGridItemView(length: model.galleryColumnLength) + } + NavigationLink { AfroBoyArtView() } label: { From 137d8bfc64e6c4fc895df3e97a14069eac8efef5 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 11:20:49 +0900 Subject: [PATCH 062/108] Remove old partyAnimal --- .../project.pbxproj | 56 ------------- .../Animals/Animal/AnimalEye.swift | 33 -------- .../Animals/Animal/AnimalNose.swift | 57 ------------- .../Animals/Animal/AnimalOutline.swift | 57 ------------- .../Animals/Animal/AnimalWhiskers.swift | 38 --------- .../ArtWorks/PartyAnimals/Animals/Bear.swift | 46 ----------- .../ArtWorks/PartyAnimals/Animals/Frog.swift | 45 ----------- .../ArtWorks/PartyAnimals/Animals/Lion.swift | 80 ------------------- .../ArtWorks/PartyAnimals/PartyAnimals.swift | 75 ----------------- 9 files changed, 487 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalEye.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalNose.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalOutline.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalWhiskers.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Bear.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Frog.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Lion.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/PartyAnimals/PartyAnimals.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 8b8ba09..5951140 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -11,14 +11,6 @@ 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */; }; 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */; }; 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1F28939B04006DF0BE /* FlipType.swift */; }; - 9748BE2C2893C428006DF0BE /* Bear.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE2B2893C428006DF0BE /* Bear.swift */; }; - 9748BE2E2893C688006DF0BE /* AnimalOutline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE2D2893C688006DF0BE /* AnimalOutline.swift */; }; - 9748BE302893C706006DF0BE /* AnimalNose.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE2F2893C706006DF0BE /* AnimalNose.swift */; }; - 9748BE322893C91F006DF0BE /* AnimalEye.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE312893C91F006DF0BE /* AnimalEye.swift */; }; - 9748BE352893CB67006DF0BE /* Lion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE342893CB67006DF0BE /* Lion.swift */; }; - 9748BE372893D064006DF0BE /* PartyAnimals.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE362893D064006DF0BE /* PartyAnimals.swift */; }; - 9748BE3A2893D0E3006DF0BE /* Frog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE392893D0E3006DF0BE /* Frog.swift */; }; - 9748BE3C2897AA28006DF0BE /* AnimalWhiskers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE3B2897AA28006DF0BE /* AnimalWhiskers.swift */; }; 9748BE3F2897AE68006DF0BE /* ArmHair.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE3E2897AE68006DF0BE /* ArmHair.swift */; }; 9748BE412897CD6C006DF0BE /* Arm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE402897CD6C006DF0BE /* Arm.swift */; }; 9748BE4328980C4D006DF0BE /* Hair.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4228980C4D006DF0BE /* Hair.swift */; }; @@ -79,14 +71,6 @@ 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithFont.swift; sourceTree = ""; }; 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithWidthAndHeight.swift; sourceTree = ""; }; 9748BE1F28939B04006DF0BE /* FlipType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlipType.swift; sourceTree = ""; }; - 9748BE2B2893C428006DF0BE /* Bear.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bear.swift; sourceTree = ""; }; - 9748BE2D2893C688006DF0BE /* AnimalOutline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalOutline.swift; sourceTree = ""; }; - 9748BE2F2893C706006DF0BE /* AnimalNose.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalNose.swift; sourceTree = ""; }; - 9748BE312893C91F006DF0BE /* AnimalEye.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalEye.swift; sourceTree = ""; }; - 9748BE342893CB67006DF0BE /* Lion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Lion.swift; sourceTree = ""; }; - 9748BE362893D064006DF0BE /* PartyAnimals.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimals.swift; sourceTree = ""; }; - 9748BE392893D0E3006DF0BE /* Frog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Frog.swift; sourceTree = ""; }; - 9748BE3B2897AA28006DF0BE /* AnimalWhiskers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalWhiskers.swift; sourceTree = ""; }; 9748BE3E2897AE68006DF0BE /* ArmHair.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArmHair.swift; sourceTree = ""; }; 9748BE402897CD6C006DF0BE /* Arm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Arm.swift; sourceTree = ""; }; 9748BE4228980C4D006DF0BE /* Hair.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Hair.swift; sourceTree = ""; }; @@ -188,26 +172,6 @@ path = Enums; sourceTree = ""; }; - 9748BE2A2893C406006DF0BE /* PartyAnimals */ = { - isa = PBXGroup; - children = ( - 9748BE362893D064006DF0BE /* PartyAnimals.swift */, - 97624C3728C81E90004E1720 /* Animals */, - ); - path = PartyAnimals; - sourceTree = ""; - }; - 9748BE382893D079006DF0BE /* Animal */ = { - isa = PBXGroup; - children = ( - 9748BE312893C91F006DF0BE /* AnimalEye.swift */, - 9748BE2D2893C688006DF0BE /* AnimalOutline.swift */, - 9748BE2F2893C706006DF0BE /* AnimalNose.swift */, - 9748BE3B2897AA28006DF0BE /* AnimalWhiskers.swift */, - ); - path = Animal; - sourceTree = ""; - }; 9748BE3D2897ADBD006DF0BE /* ArmHair */ = { isa = PBXGroup; children = ( @@ -276,23 +240,11 @@ 9748BE55289DCB82006DF0BE /* Fireworks */, 9748BE4428980FE4006DF0BE /* DemonWrestler */, 9748BE3D2897ADBD006DF0BE /* ArmHair */, - 9748BE2A2893C406006DF0BE /* PartyAnimals */, 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */, ); path = ArtWorks; sourceTree = ""; }; - 97624C3728C81E90004E1720 /* Animals */ = { - isa = PBXGroup; - children = ( - 9748BE342893CB67006DF0BE /* Lion.swift */, - 9748BE392893D0E3006DF0BE /* Frog.swift */, - 9748BE2B2893C428006DF0BE /* Bear.swift */, - 9748BE382893D079006DF0BE /* Animal */, - ); - path = Animals; - sourceTree = ""; - }; 9767DEF82B751C1300457DA1 /* WorldPeace */ = { isa = PBXGroup; children = ( @@ -575,25 +527,20 @@ 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, 97AD532D2B717C950034FB5D /* AfroBoyPreviewView.swift in Sources */, 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, - 9748BE372893D064006DF0BE /* PartyAnimals.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, 9767DEFE2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */, 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */, - 9748BE3A2893D0E3006DF0BE /* Frog.swift in Sources */, 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */, 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */, 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */, - 9748BE3C2897AA28006DF0BE /* AnimalWhiskers.swift in Sources */, 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, 9748BE6428A3936E006DF0BE /* ArtWorkView.swift in Sources */, 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */, 9767DF092B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift in Sources */, 9748BE5F289F194E006DF0BE /* RocketFirework.swift in Sources */, - 9748BE2E2893C688006DF0BE /* AnimalOutline.swift in Sources */, - 9748BE322893C91F006DF0BE /* AnimalEye.swift in Sources */, 9748BE59289DCE17006DF0BE /* Fireworks.swift in Sources */, 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, @@ -609,14 +556,12 @@ 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */, 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, - 9748BE2C2893C428006DF0BE /* Bear.swift in Sources */, 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */, 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */, 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */, 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */, 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */, 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */, - 9748BE352893CB67006DF0BE /* Lion.swift in Sources */, 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, 97AD53222B70E3FA0034FB5D /* AnimatableSymbolView.swift in Sources */, 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */, @@ -628,7 +573,6 @@ 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */, 9748BE4628981011006DF0BE /* DemonWrestler.swift in Sources */, - 9748BE302893C706006DF0BE /* AnimalNose.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalEye.swift b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalEye.swift deleted file mode 100644 index dbc145f..0000000 --- a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalEye.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// AnimalEye.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct AnimalEye: View { - - let baseLength: CGFloat - let eyeColor: Color - - var body: some View { - ZStack { - Image(symbol: .circleFill) - .arrangeShape(color: eyeColor, - fontSize: baseLength * 0.05) - - Image(symbol: .circleFill) - .arrangeShape(color: .white, - fontSize: baseLength * 0.02) - } - } -} - -struct AnimalEye_Previews: PreviewProvider { - static var previews: some View { - AnimalEye(baseLength: 400, - eyeColor: Color(uiColor: .brown)) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalNose.swift b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalNose.swift deleted file mode 100644 index ecc9e6c..0000000 --- a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalNose.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// BearNose.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct AnimalNose: View { - - let baseLength: CGFloat - let noseTipColor: Color - let mouthColor: Color - - var body: some View { - ZStack { - Image(symbol: .circleFill) - .arrangeShape(color: .white, - fontSize: baseLength * 0.125) - - Image(symbol: .arrowDown) - .arrangeShape(color: mouthColor, - fontSize: baseLength * 0.09, - offsetY: baseLength * 0.0125) - - // Nose tip - Group { - Image(symbol: .circleFill) - .arrangeShape(color: .white, - fontSize: baseLength * 0.05, - offsetY: baseLength * -0.01) - - Image(symbol: .moonCircleFill) - .arrangeShape(color: noseTipColor, - fontSize: baseLength * 0.05, - fontWeight: .bold, - flipType: .horizontalAndVertical, - offsetY: baseLength * -0.01) - } - } - } -} - -struct AnimalNose_Previews: PreviewProvider { - static var previews: some View { - ZStack { - Rectangle() - .fill(.brown) - .ignoresSafeArea() - - AnimalNose(baseLength: 400, - noseTipColor: .red, - mouthColor: .black) - } - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalOutline.swift b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalOutline.swift deleted file mode 100644 index f668140..0000000 --- a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalOutline.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// BearOutline.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct AnimalOutline: View { - - let baseLength: CGFloat - let faceColor: Color - let earColor: Color - - var body: some View { - ZStack { - Image(symbol: .circleFill) - .arrangeShape(color: faceColor, - fontSize: baseLength * 0.15, - offsetX: baseLength * 0.125, - offsetY: baseLength * -0.15) - - Image(symbol: .rectangleRoundedtopFill) - .arrangeShape(color: earColor, - fontSize: baseLength * 0.06, - rotationDegrees: -20, - offsetX: baseLength * 0.125, - offsetY: baseLength * -0.15) - - Image(symbol: .circleFill) - .arrangeShape(color: faceColor, - fontSize: baseLength * 0.15, - offsetX: baseLength * -0.125, - offsetY: baseLength * -0.15) - - Image(symbol: .rectangleRoundedtopFill) - .arrangeShape(color: earColor, - fontSize: baseLength * 0.06, - rotationDegrees: 20, - offsetX: baseLength * -0.125, - offsetY: baseLength * -0.15) - - Image(symbol: .ovalFill) - .arrangeShape(color: faceColor, - fontSize: baseLength * 0.325) - } - } -} - -struct AnimalOutline_Previews: PreviewProvider { - static var previews: some View { - AnimalOutline(baseLength: 400, - faceColor: .brown, - earColor: .palePink) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalWhiskers.swift b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalWhiskers.swift deleted file mode 100644 index 2acb17b..0000000 --- a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Animal/AnimalWhiskers.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// AnimalWhiskers.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/01. -// - -import SwiftUI - -struct AnimalWhiskers: View { - - let baseLength: CGFloat - let color: Color - let skinColor: Color - - var body: some View { - ZStack { - Image(symbol: .rays) - .arrangeShape(color: color, - width: baseLength * 0.175, - height: baseLength * 0.1) - - Image(symbol: .rectangleFill) - .arrangeShape(color: skinColor, - fontSize: baseLength * 0.15, - rotationDegrees: 90, - offsetX: baseLength * 0.05) - } - } -} - -struct AnimalWhiskers_Previews: PreviewProvider { - static var previews: some View { - AnimalWhiskers(baseLength: 400, - color: .darkBrown, - skinColor: .red) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Bear.swift b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Bear.swift deleted file mode 100644 index 24c9288..0000000 --- a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Bear.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// Bear.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct Bear: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - AnimalOutline(baseLength: baseLength, - faceColor: .brown, - earColor: .palePink) - - // Eyes - Group { - AnimalEye(baseLength: baseLength, - eyeColor: .darkBrown) - .offset(x: baseLength * 0.075, - y: baseLength * -0.04) - - AnimalEye(baseLength: baseLength, - eyeColor: .darkBrown) - .offset(x: baseLength * -0.075, - y: baseLength * -0.04) - } - - AnimalNose(baseLength: baseLength, - noseTipColor: .red, - mouthColor: .black) - .offset(x: 0, - y: baseLength * 0.0375) - } - } -} - -struct Bear_Previews: PreviewProvider { - static var previews: some View { - Bear(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Frog.swift b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Frog.swift deleted file mode 100644 index 7d3691c..0000000 --- a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Frog.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// Frog.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct Frog: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - AnimalOutline(baseLength: baseLength, - faceColor: .green, - earColor: .green) - - // Eyes - Group { - AnimalEye(baseLength: baseLength, - eyeColor: .black) - .offset(x: baseLength * -0.125, - y: baseLength * -0.15) - - AnimalEye(baseLength: baseLength, - eyeColor: .black) - .offset(x: baseLength * 0.125, - y: baseLength * -0.15) - } - - Image(symbol: .chevronDown) - .arrangeShape(fontSize: baseLength * 0.1, - fontWeight: .bold, - offsetY: baseLength * 0.025) - } - } -} - -struct Frog_Previews: PreviewProvider { - static var previews: some View { - Frog(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Lion.swift b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Lion.swift deleted file mode 100644 index 4f710d8..0000000 --- a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/Animals/Lion.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// Lion.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct Lion: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - - // Lion's mane - Group { - Image(symbol: .sealFill) - .arrangeShape(color: .orange, - fontSize: baseLength * 0.575, - fontWeight: .ultraLight) - - Image(symbol: .sealFill) - .arrangeShape(color: .orange, - fontSize: baseLength * 0.575, - fontWeight: .ultraLight, - rotationDegrees: 20) - } - - AnimalOutline(baseLength: baseLength, - faceColor: .yellow, - earColor: .yellow) - .offset(x: 0, - y: baseLength * 0.0375) - - // Whiskers - Group { - AnimalWhiskers(baseLength: baseLength, - color: .darkBrown, - skinColor: .yellow) - .offset(x: baseLength * -0.08, - y: baseLength * 0.075) - - AnimalWhiskers(baseLength: baseLength, - color: .darkBrown, - skinColor: .yellow) - .offset(x: baseLength * -0.08, - y: baseLength * 0.075) - .rotation3DEffect(.degrees(180), - axis: FlipType.horizontal.axis, - anchorZ: 1) - } - - Group { - AnimalEye(baseLength: baseLength, - eyeColor: .darkBrown) - .offset(x: baseLength * -0.075, - y: baseLength * -0.0025) - - AnimalEye(baseLength: baseLength, - eyeColor: .darkBrown) - .offset(x: baseLength * 0.075, - y: baseLength * -0.0025) - } - - AnimalNose(baseLength: baseLength, - noseTipColor: .darkBrown, - mouthColor: .darkBrown) - .offset(x: 0, - y: baseLength * 0.075) - } - } -} - -struct Lion_Previews: PreviewProvider { - static var previews: some View { - Lion(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/PartyAnimals.swift b/SFSymbolsArtCollection/ArtWorks/PartyAnimals/PartyAnimals.swift deleted file mode 100644 index 158d397..0000000 --- a/SFSymbolsArtCollection/ArtWorks/PartyAnimals/PartyAnimals.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// PartyAnimals.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/07/29. -// - -import SwiftUI - -struct PartyAnimals: View { - var body: some View { - - GeometryReader { proxy in - - let baseLength = proxy.baseLength - - VStack { - - HStack { - VStack { - Image(symbol: .pawprintFill) - .arrangeShape(color: .red, - fontSize: baseLength * 0.15, - fontWeight: .regular, - rotationDegrees: 20, - offsetY: baseLength * -0.025) - - Image(symbol: .pawprintFill) - .arrangeShape(color: .blue, - fontSize: baseLength * 0.15, - fontWeight: .regular, - rotationDegrees: -15, - offsetX: baseLength * -0.05, - offsetY: baseLength * -0.025) - } - Bear(baseLength: baseLength) - } - - HStack { - Frog(baseLength: baseLength) - - VStack { - - Image(symbol: .pawprintFill) - .arrangeShape(color: .orange, - fontSize: baseLength * 0.15, - fontWeight: .regular, - rotationDegrees: 15, - offsetY: baseLength * -0.025) - - Image(symbol: .pawprintFill) - .arrangeShape(color: .cyan, - fontSize: baseLength * 0.15, - fontWeight: .regular, - rotationDegrees: -15, - offsetX: baseLength * 0.05, - offsetY: baseLength * -0.025) - } - } - .offset(x: 0, - y: baseLength * 0.025) - - Lion(baseLength: baseLength) - } - .position(proxy.localCenter) - } - } -} - -struct PartyAnimals_Previews: PreviewProvider { - static var previews: some View { - PartyAnimals() - .scaleEffect(0.7) - } -} From 3cb6bfe469fd8106b6dbafffd974fd3c8c8b1e1d Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 13:18:41 +0900 Subject: [PATCH 063/108] Refactor AfroBoy --- .../project.pbxproj | 8 ++ .../ArtWorks/ArtWorkView.swift | 2 +- .../AfroBoy/AfroBoyArtView+Element.swift | 82 +++++++++++++++++++ .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 62 ++++---------- .../ArtWorks/AfroBoy/AfroBoyPreviewView.swift | 59 +++++-------- .../Common/Models/SymbolArtElement.swift | 64 +++++++++++++++ 6 files changed, 191 insertions(+), 86 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+Element.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/SymbolArtElement.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 5951140..5421684 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -35,6 +35,8 @@ 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */; }; 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */; }; 9767DF092B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */; }; + 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */; }; + 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -96,6 +98,8 @@ 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsPreviewView.swift; sourceTree = ""; }; 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsArtView.swift; sourceTree = ""; }; 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PartyAnimalsArtView+RawPosition.swift"; sourceTree = ""; }; + 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtElement.swift; sourceTree = ""; }; + 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AfroBoyArtView+Element.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -301,6 +305,7 @@ children = ( 97EF438E2B726D66003648F5 /* ArtWorkModel */, 97AD53172B70DFF30034FB5D /* AnimationValues.swift */, + 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */, ); path = Models; sourceTree = ""; @@ -323,6 +328,7 @@ isa = PBXGroup; children = ( 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */, + 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */, 97AD532C2B717C950034FB5D /* AfroBoyPreviewView.swift */, ); path = AfroBoy; @@ -519,6 +525,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */, 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */, 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, @@ -566,6 +573,7 @@ 97AD53222B70E3FA0034FB5D /* AnimatableSymbolView.swift in Sources */, 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */, 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, + 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */, 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift b/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift index 40eacb2..63a4cc2 100644 --- a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift +++ b/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift @@ -21,7 +21,7 @@ struct ArtWorkView: View { case .worldPeace: EmptyView() case .partyAnimals: - PartyAnimals() + EmptyView() case .armHair: ArmHair() case .demonWrestler: diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+Element.swift new file mode 100644 index 0000000..af2c949 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+Element.swift @@ -0,0 +1,82 @@ +// +// AfroBoyArtView+Element.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension AfroBoyArtView { + + enum Element: String, CaseIterable, Identifiable { + case hair + case outline + case face + case comb + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .hair: + SymbolArtElement( + symbol: "􁝰", + name: "tree.fill", + initialPosition: .third(.first), + primaryColor: .black, + widthRatio: 0.9, + heightRatio: 0.9, + symbolCountToWaitFor: 0 + ) + case .outline: + SymbolArtElement( + symbol: "􀙧", + name: "shield.fill", + initialPosition: .third(.second), + primaryColor: .paleOrange, + widthRatio: 0.5, + heightRatio: 0.6, + verticalOffsetRatio: 0.17, + symbolCountToWaitFor: 1 + ) + case .face: + SymbolArtElement( + symbol: "􀎽", + name: "faceid", + initialPosition: .third(.third), + primaryColor: .black, + secondaryColor: .paleOrange, + widthRatio: 0.3, + heightRatio: 0.3, + verticalOffsetRatio: 0.16, + symbolCountToWaitFor: 2 + ) + case .comb: + SymbolArtElement( + symbol: "􀦉", + name: "comb.fill", + initialPosition: .third(.fourth), + primaryColor: .red, + widthRatio: 0.2, + heightRatio: 0.2, + horizontalOffsetRatio: -0.2, + verticalOffsetRatio: -0.2, + symbolCountToWaitFor: 3 + ) + } + } + } +} + +#Preview { + NavigationStack { + AfroBoyArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + AfroBoyPreviewView() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift index c44ae3f..6702776 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -9,58 +9,24 @@ import SwiftUI struct AfroBoyArtView: View { - @Environment(ArtWorkModel.self) var model @State private var isAnimating = false var body: some View { ZStack { - - // MARK: - 􁝰 Hair - AnimatableSymbolView( - name: "tree.fill", - initialPosition: .third(.first), - widthRatio: 0.9, - heightRatio: 0.9, - isAnimating: isAnimating, - symbolCountToWaitFor: 0 - ) - - // MARK: - 􀙧 Contour - AnimatableSymbolView( - name: "shield.fill", - initialPosition: .third(.second), - primaryColor: .paleOrange, - widthRatio: 0.5, - heightRatio: 0.6, - verticalOffsetRatio: 0.17, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - // MARK: - 􀎽 Face - AnimatableSymbolView( - name: "faceid", - initialPosition: .third(.third), - secondaryColor: .paleOrange, - widthRatio: 0.3, - heightRatio: 0.3, - verticalOffsetRatio: 0.16, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀦉 Comb - AnimatableSymbolView( - name: "comb.fill", - initialPosition: .third(.fourth), - primaryColor: .red, - widthRatio: 0.2, - heightRatio: 0.2, - horizontalOffsetRatio: -0.2, - verticalOffsetRatio: -0.2, - isAnimating: isAnimating, - symbolCountToWaitFor: 3 - ) + ForEach(Element.allCases) { + AnimatableSymbolView( + name: $0.value.name, + initialPosition: $0.value.initialPosition, + primaryColor: $0.value.primaryColor, + secondaryColor: $0.value.secondaryColor, + widthRatio: $0.value.widthRatio, + heightRatio: $0.value.heightRatio, + horizontalOffsetRatio: $0.value.horizontalOffsetRatio, + verticalOffsetRatio: $0.value.verticalOffsetRatio, + isAnimating: isAnimating, + symbolCountToWaitFor: $0.value.symbolCountToWaitFor + ) + } } .navigationTitle("Afro boy") .navigationBarTitleDisplayMode(.inline) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift index 534e89d..f10f404 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift @@ -10,46 +10,31 @@ import SwiftUI struct AfroBoyPreviewView: View { @Environment(ArtWorkModel.self) var model - @State private var isAnimating = false var body: some View { ZStack { - - // MARK: - 􁝰 Hair - Image(systemName: "tree.fill") - .arrangeShape( - width: model.calculatingProportionalValue(withRatio: 0.9, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.9, forPreview: true) - ) - - // MARK: - 􀙧 Contour - Image(systemName: "shield.fill") - .arrangeShape( - primaryColor: .paleOrange, - width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.6, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) - ) - - // MARK: - 􀎽 Face - Image(systemName: "faceid") - .arrangeShape( - primaryColor: .black, - secondaryColor: .paleOrange, - width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true) - ) - - // MARK: - 􀦉 Comb - Image(systemName: "comb.fill") - .arrangeShape( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true) - ) + ForEach(AfroBoyArtView.Element.allCases) { + Image(systemName: $0.value.name) + .arrangeShape( + primaryColor: $0.value.primaryColor, + secondaryColor: $0.value.secondaryColor, + width: model.calculatingProportionalValue( + withRatio: $0.value.widthRatio, + forPreview: true + ), + height: model.calculatingProportionalValue( + withRatio: $0.value.heightRatio, + forPreview: true + ), + horizontalOffset: model.calculatingProportionalValue( + withRatio: $0.value.horizontalOffsetRatio, + forPreview: true + ), + verticalOffset: model.calculatingProportionalValue( + withRatio: $0.value.verticalOffsetRatio, + forPreview: true) + ) + } } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/SymbolArtElement.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/SymbolArtElement.swift new file mode 100644 index 0000000..8884900 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/SymbolArtElement.swift @@ -0,0 +1,64 @@ +// +// SymbolArtElement.swift +// SFSymbolsArtCollection +// +// Created Lil Ossa +// + +import SwiftUI + +struct SymbolArtElement { + + let symbol: String + let name: String + let initialPrimaryColor: Color + let initialSecondaryColor: Color + let initialPosition: ArtWorkModel.InitialSymbolRow + let primaryColor: Color + let secondaryColor: Color + let fontWeight: Font.Weight + let widthRatio: CGFloat + let heightRatio: CGFloat + let rotationDegrees: CGFloat + var flip: FlipType + let horizontalOffsetRatio: CGFloat + let verticalOffsetRatio: CGFloat + let symbolCountToWaitFor: Int + let zIndex: CGFloat + + init( + symbol: String, + name: String, + initialPrimaryColor: Color = .black, + initialSecondaryColor: Color = .black, + initialPosition: ArtWorkModel.InitialSymbolRow, + primaryColor: Color, + secondaryColor: Color = .black, + fontWeight: Font.Weight = .regular, + widthRatio: CGFloat, + heightRatio: CGFloat, + rotationDegrees: CGFloat = 0, + flip: FlipType = .none, + horizontalOffsetRatio: CGFloat = 0, + verticalOffsetRatio: CGFloat = 0, + symbolCountToWaitFor: Int, + zIndex: CGFloat = 0 + ) { + self.symbol = symbol + self.name = name + self.initialPrimaryColor = initialPrimaryColor + self.initialSecondaryColor = initialSecondaryColor + self.initialPosition = initialPosition + self.primaryColor = primaryColor + self.secondaryColor = secondaryColor + self.fontWeight = fontWeight + self.widthRatio = widthRatio + self.heightRatio = heightRatio + self.rotationDegrees = rotationDegrees + self.flip = flip + self.horizontalOffsetRatio = horizontalOffsetRatio + self.verticalOffsetRatio = verticalOffsetRatio + self.symbolCountToWaitFor = symbolCountToWaitFor + self.zIndex = zIndex + } +} From 826c7387811ebc16f3eff682ffed89d656e7b1b4 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 13:34:05 +0900 Subject: [PATCH 064/108] Add SymbolArtPreviewView --- .../project.pbxproj | 4 ++ .../ArtWorks/AfroBoy/AfroBoyPreviewView.swift | 25 +------- .../SymbolArtPreviewView.swift | 62 +++++++++++++++++++ 3 files changed, 68 insertions(+), 23 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtPreviewView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 5421684..67d0db2 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -37,6 +37,7 @@ 9767DF092B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */; }; 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */; }; 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */; }; + 9767DF0F2B75DFB400457DA1 /* SymbolArtPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -100,6 +101,7 @@ 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PartyAnimalsArtView+RawPosition.swift"; sourceTree = ""; }; 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtElement.swift; sourceTree = ""; }; 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AfroBoyArtView+Element.swift"; sourceTree = ""; }; + 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtPreviewView.swift; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -338,6 +340,7 @@ isa = PBXGroup; children = ( 97AD53212B70E3FA0034FB5D /* AnimatableSymbolView.swift */, + 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */, 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, ); path = AnimatableSymbolView; @@ -577,6 +580,7 @@ 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */, + 9767DF0F2B75DFB400457DA1 /* SymbolArtPreviewView.swift in Sources */, 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift index f10f404..3b8ac1d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift @@ -8,32 +8,11 @@ import SwiftUI struct AfroBoyPreviewView: View { - - @Environment(ArtWorkModel.self) var model - + var body: some View { ZStack { ForEach(AfroBoyArtView.Element.allCases) { - Image(systemName: $0.value.name) - .arrangeShape( - primaryColor: $0.value.primaryColor, - secondaryColor: $0.value.secondaryColor, - width: model.calculatingProportionalValue( - withRatio: $0.value.widthRatio, - forPreview: true - ), - height: model.calculatingProportionalValue( - withRatio: $0.value.heightRatio, - forPreview: true - ), - horizontalOffset: model.calculatingProportionalValue( - withRatio: $0.value.horizontalOffsetRatio, - forPreview: true - ), - verticalOffset: model.calculatingProportionalValue( - withRatio: $0.value.verticalOffsetRatio, - forPreview: true) - ) + SymbolArtPreviewView(element: $0.value) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtPreviewView.swift new file mode 100644 index 0000000..08f74d1 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtPreviewView.swift @@ -0,0 +1,62 @@ +// +// SymbolArtPreviewView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct SymbolArtPreviewView: View { + + @Environment(ArtWorkModel.self) var model + let forPreview: Bool + let element: SymbolArtElement + + init(forPreview: Bool = true, element: SymbolArtElement) { + self.forPreview = forPreview + self.element = element + } + + var body: some View { + Image(systemName: element.name) + .resizable() + .foregroundStyle(element.primaryColor, element.secondaryColor) + .fontWeight(element.fontWeight) + .frame( + width: model.calculatingProportionalValue( + withRatio: element.widthRatio, + forPreview: forPreview + ), + height: model.calculatingProportionalValue( + withRatio: element.heightRatio, + forPreview: forPreview + ) + ) + .rotationEffect(.degrees(element.rotationDegrees)) + .rotation3DEffect(.degrees(180), axis: element.flip.axis) + .offset( + x: model.calculatingProportionalValue( + withRatio: element.horizontalOffsetRatio, + forPreview: forPreview + ), + y: model.calculatingProportionalValue( + withRatio: element.verticalOffsetRatio, + forPreview: forPreview + ) + ) + .zIndex(element.zIndex) + } +} + +#Preview { + VStack { + SymbolArtPreviewView(element: AfroBoyArtView.Element.face.value) + + SymbolArtPreviewView( + forPreview: false, + element: AfroBoyArtView.Element.face.value + ) + } + .environment(ArtWorkModel.preview) +} From 9307b08416ffb1eb506694529ccff700d65341c8 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 13:39:08 +0900 Subject: [PATCH 065/108] Modify AnimatableSymbolView --- .../AnimatableSymbolView.swift | 58 +++++++------------ 1 file changed, 20 insertions(+), 38 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift index f23f304..e5df6ba 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift @@ -9,38 +9,23 @@ import SwiftUI struct AnimatableSymbolView: View { - init( - name: String, - initialPrimaryColor: Color = .black, - initialSecondaryColor: Color = .black, - initialPosition: ArtWorkModel.InitialSymbolRow, - primaryColor: Color = .black, - secondaryColor: Color = .black, - fontWeight: Font.Weight = .regular, - widthRatio: CGFloat, - heightRatio: CGFloat, - rotationDegrees: CGFloat = 0, - flip: FlipType = .none, - horizontalOffsetRatio: CGFloat = 0, - verticalOffsetRatio: CGFloat = 0, - isAnimating: Bool, - symbolCountToWaitFor: Int - ) { - self.name = name - self.initialPrimaryColor = initialPrimaryColor - self.initialSecondaryColor = initialSecondaryColor - self.initialPosition = initialPosition - self.primaryColor = primaryColor - self.secondaryColor = secondaryColor - self.fontWeight = fontWeight - self.widthRatio = widthRatio - self.heightRatio = heightRatio - self.rotationDegrees = rotationDegrees - self.rotationAxis = flip.axis - self.horizontalOffsetRatio = horizontalOffsetRatio - self.verticalOffsetRatio = verticalOffsetRatio + init(element: SymbolArtElement, isAnimating: Bool) { + self.name = element.name + self.initialPrimaryColor = element.initialPrimaryColor + self.initialSecondaryColor = element.initialSecondaryColor + self.initialPosition = element.initialPosition + self.primaryColor = element.primaryColor + self.secondaryColor = element.secondaryColor + self.fontWeight = element.fontWeight + self.widthRatio = element.widthRatio + self.heightRatio = element.heightRatio + self.rotationDegrees = element.rotationDegrees + self.rotationAxis = element.flip.axis + self.horizontalOffsetRatio = element.horizontalOffsetRatio + self.verticalOffsetRatio = element.verticalOffsetRatio + self.zIndex = element.zIndex self.isAnimating = isAnimating - self.symbolCountToWaitFor = symbolCountToWaitFor + self.symbolCountToWaitFor = element.symbolCountToWaitFor } @Environment(ArtWorkModel.self) var model @@ -57,6 +42,7 @@ struct AnimatableSymbolView: View { var rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) let horizontalOffsetRatio: CGFloat let verticalOffsetRatio: CGFloat + let zIndex: CGFloat let isAnimating: Bool let symbolCountToWaitFor: Int @@ -188,18 +174,14 @@ struct AnimatableSymbolView: View { CubicKeyframe(0, duration: model.animationDurationPerSymbol * 0.2) } } + .zIndex(zIndex) } } #Preview { AnimatableSymbolView( - name: "nose", - initialPosition: .third(.first), - primaryColor: .red, - widthRatio: 1, - heightRatio: 1, - isAnimating: true, - symbolCountToWaitFor: 0 + element: AfroBoyArtView.Element.hair.value, + isAnimating: true ) .environment(ArtWorkModel.preview) } From 61fdc6116ab5803e3b510bbe0ad2ef568e1f3fbd Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 13:39:28 +0900 Subject: [PATCH 066/108] Remove unused arrangeShape method --- .../project.pbxproj | 4 --- .../Extensions/Image+arrangeShape.swift | 34 ------------------- 2 files changed, 38 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Image+arrangeShape.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 67d0db2..bc90b18 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -65,7 +65,6 @@ 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */; }; 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439D2B744C4C003648F5 /* Color+.swift */; }; 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43A02B74CA38003648F5 /* CrayonBoyPreviewView.swift */; }; - 97EF43A32B74D9BA003648F5 /* Image+arrangeShape.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43A22B74D9BA003648F5 /* Image+arrangeShape.swift */; }; 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43A42B74F27D003648F5 /* CrayonBoyArtView.swift */; }; /* End PBXBuildFile section */ @@ -129,7 +128,6 @@ 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianPreviewView.swift; sourceTree = ""; }; 97EF439D2B744C4C003648F5 /* Color+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+.swift"; sourceTree = ""; }; 97EF43A02B74CA38003648F5 /* CrayonBoyPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoyPreviewView.swift; sourceTree = ""; }; - 97EF43A22B74D9BA003648F5 /* Image+arrangeShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Image+arrangeShape.swift"; sourceTree = ""; }; 97EF43A42B74F27D003648F5 /* CrayonBoyArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoyArtView.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -400,7 +398,6 @@ children = ( 97EF439D2B744C4C003648F5 /* Color+.swift */, 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */, - 97EF43A22B74D9BA003648F5 /* Image+arrangeShape.swift */, 97AD53112B70DEB60034FB5D /* UIDevice+.swift */, 97AD53192B70E0530034FB5D /* Font.Weight+.swift */, ); @@ -554,7 +551,6 @@ 9748BE59289DCE17006DF0BE /* Fireworks.swift in Sources */, 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, - 97EF43A32B74D9BA003648F5 /* Image+arrangeShape.swift in Sources */, 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Image+arrangeShape.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Image+arrangeShape.swift deleted file mode 100644 index b0cd9c8..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Image+arrangeShape.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Image+arrangeShape.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -extension Image { - - func arrangeShape( - primaryColor: Color = .black, - secondaryColor: Color = .black, - fontWeight: Font.Weight = .regular, - width: CGFloat, - height: CGFloat, - rotationDegrees: CGFloat = 0, - flip: FlipType = .none, - horizontalOffset: CGFloat = 0, - verticalOffset: CGFloat = 0 - ) -> some View { - self - .resizable() - .foregroundStyle(primaryColor, secondaryColor) - .fontWeight(fontWeight) - .frame(width: width, height: height) - .rotationEffect(.degrees(rotationDegrees)) - .rotation3DEffect(.degrees(180), axis: flip.axis) - .offset(x: horizontalOffset, - y: verticalOffset) - } -} - From 2961f770d1fb4b68b8aaaddfe20d6a57915c5861 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 13:41:18 +0900 Subject: [PATCH 067/108] Remove unused views --- .../project.pbxproj | 8 ---- .../ArtWorks/ArtWorkView.swift | 39 --------------- SFSymbolsArtCollection/ContentView.swift | 48 ------------------- 3 files changed, 95 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift delete mode 100644 SFSymbolsArtCollection/ContentView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index bc90b18..fc0b4c6 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -23,7 +23,6 @@ 9748BE59289DCE17006DF0BE /* Fireworks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE58289DCE17006DF0BE /* Fireworks.swift */; }; 9748BE5D289DD696006DF0BE /* Building.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE5C289DD696006DF0BE /* Building.swift */; }; 9748BE5F289F194E006DF0BE /* RocketFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE5E289F194E006DF0BE /* RocketFirework.swift */; }; - 9748BE6428A3936E006DF0BE /* ArtWorkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE6328A3936E006DF0BE /* ArtWorkView.swift */; }; 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE6528A395D5006DF0BE /* ArtWork.swift */; }; 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2928C2BC9A004E1720 /* MediumFirework.swift */; }; 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2B28C2DDAA004E1720 /* Buildings.swift */; }; @@ -52,7 +51,6 @@ 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; - 97E11D522817381100B2AB32 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D512817381100B2AB32 /* ContentView.swift */; }; 97E11D542817381200B2AB32 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97E11D532817381200B2AB32 /* Assets.xcassets */; }; 97E11D572817381200B2AB32 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97E11D562817381200B2AB32 /* Preview Assets.xcassets */; }; 97E11DF028176A0D00B2AB32 /* SFUserFriendlySymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 97E11DEF28176A0D00B2AB32 /* SFUserFriendlySymbols */; }; @@ -86,7 +84,6 @@ 9748BE5C289DD696006DF0BE /* Building.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Building.swift; sourceTree = ""; }; 9748BE5E289F194E006DF0BE /* RocketFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RocketFirework.swift; sourceTree = ""; }; 9748BE62289F4BFB006DF0BE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 9748BE6328A3936E006DF0BE /* ArtWorkView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtWorkView.swift; sourceTree = ""; }; 9748BE6528A395D5006DF0BE /* ArtWork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtWork.swift; sourceTree = ""; }; 97624C2928C2BC9A004E1720 /* MediumFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediumFirework.swift; sourceTree = ""; }; 97624C2B28C2DDAA004E1720 /* Buildings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Buildings.swift; sourceTree = ""; }; @@ -116,7 +113,6 @@ 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SFSymbolsArtCollectionApp.swift; sourceTree = ""; }; - 97E11D512817381100B2AB32 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 97E11D532817381200B2AB32 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97E11D562817381200B2AB32 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedArtView.swift; sourceTree = ""; }; @@ -239,7 +235,6 @@ 97624C3628C74AA0004E1720 /* ArtWorks */ = { isa = PBXGroup; children = ( - 9748BE6328A3936E006DF0BE /* ArtWorkView.swift */, 9748BE6528A395D5006DF0BE /* ArtWork.swift */, 9748BE55289DCB82006DF0BE /* Fireworks */, 9748BE4428980FE4006DF0BE /* DemonWrestler */, @@ -376,7 +371,6 @@ 9748BE62289F4BFB006DF0BE /* Info.plist */, 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */, 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */, - 97E11D512817381100B2AB32 /* ContentView.swift */, 97624C3628C74AA0004E1720 /* ArtWorks */, 971D9DE628C93EB500136A36 /* Common */, 97E11D532817381200B2AB32 /* Assets.xcassets */, @@ -544,7 +538,6 @@ 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */, 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */, 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, - 9748BE6428A3936E006DF0BE /* ArtWorkView.swift in Sources */, 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */, 9767DF092B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift in Sources */, 9748BE5F289F194E006DF0BE /* RocketFirework.swift in Sources */, @@ -556,7 +549,6 @@ 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */, 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */, 9748BE3F2897AE68006DF0BE /* ArmHair.swift in Sources */, - 97E11D522817381100B2AB32 /* ContentView.swift in Sources */, 9748BE412897CD6C006DF0BE /* Arm.swift in Sources */, 9748BE4328980C4D006DF0BE /* Hair.swift in Sources */, 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift b/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift deleted file mode 100644 index 63a4cc2..0000000 --- a/SFSymbolsArtCollection/ArtWorks/ArtWorkView.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// ArtWorkView.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/10. -// - -import SwiftUI - -struct ArtWorkView: View { - - @Binding var artwork: ArtWork - - var body: some View { - - switch artwork { - case .crayonBoy: - EmptyView() - case .magician: - EmptyView() - case .worldPeace: - EmptyView() - case .partyAnimals: - EmptyView() - case .armHair: - ArmHair() - case .demonWrestler: - DemonWrestler() - case .fireworks: - Fireworks() - } - } -} - -struct ArtWorkView_Previews: PreviewProvider { - static var previews: some View { - ArtWorkView(artwork: .constant(.crayonBoy)) - } -} diff --git a/SFSymbolsArtCollection/ContentView.swift b/SFSymbolsArtCollection/ContentView.swift deleted file mode 100644 index b604465..0000000 --- a/SFSymbolsArtCollection/ContentView.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// ContentView.swift -// SFSymbolsArtCollection -// -// - -import SwiftUI - -struct ContentView: View { - - @State private var isPresented = false - @State private var selectedArtWork: ArtWork = .crayonBoy - - var body: some View { - - VStack { - - iOSDCJapan2022Logo() - - List { - ForEach(ArtWork.allCases) { artwork in - Button { - selectedArtWork = artwork - isPresented = true - } label: { - HStack { - Text(artwork.title) - - Spacer() - - Image(symbol: .chevronForward) - .font(.caption.bold()) - } - } - } - } - } - .sheet(isPresented: $isPresented, content: { - ArtWorkView(artwork: $selectedArtWork) - }) - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -} From 29d15ca2db7ce4484a32dfd7b8e941204c453367 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 14:02:14 +0900 Subject: [PATCH 068/108] Refactor MagicianArtView --- .../project.pbxproj | 4 + .../Magician/MagicianArtView+Element.swift | 221 ++++++++++++++++++ .../ArtWorks/Magician/MagicianArtView.swift | 181 +------------- .../Magician/MagicianPreviewView.swift | 137 +---------- 4 files changed, 232 insertions(+), 311 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+Element.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index fc0b4c6..0e73c13 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -37,6 +37,7 @@ 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */; }; 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */; }; 9767DF0F2B75DFB400457DA1 /* SymbolArtPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */; }; + 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -98,6 +99,7 @@ 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtElement.swift; sourceTree = ""; }; 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AfroBoyArtView+Element.swift"; sourceTree = ""; }; 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtPreviewView.swift; sourceTree = ""; }; + 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MagicianArtView+Element.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -429,6 +431,7 @@ isa = PBXGroup; children = ( 97EF43972B733337003648F5 /* MagicianArtView.swift */, + 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */, 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */, ); path = Magician; @@ -568,6 +571,7 @@ 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */, + 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */, 9767DF0F2B75DFB400457DA1 /* SymbolArtPreviewView.swift in Sources */, 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+Element.swift new file mode 100644 index 0000000..f6df052 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+Element.swift @@ -0,0 +1,221 @@ +// +// MagicianArtView+Element.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension MagicianArtView { + + enum Element: String, CaseIterable, Identifiable { + case outline + case hatBand + case hat + case hatBrim + case eyeBrowRight + case eyeBrowLeft + case sunGlassesFrameLeading + case sunGlassesFrameCenter + case sunGlassesFrameTrailing + case sunGlassesLensRight + case sunGlassesLensLeft + case nose + case mouth + case tongue + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .outline: + SymbolArtElement( + symbol: "􀠒", + name: "drop.fill", + initialPosition: .second(.first), + primaryColor: .paleOrange, + widthRatio: 0.5, + heightRatio: 0.75, + rotationDegrees: 180, + verticalOffsetRatio: 0.15, + symbolCountToWaitFor: 0 + ) + case .hatBand: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .second(.second), + primaryColor: .red, + widthRatio: 0.446, + heightRatio: 0.1, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: -0.15, + symbolCountToWaitFor: 1 + ) + case .hat: + SymbolArtElement( + symbol: "􀈮", + name: "archivebox.fill", + initialPosition: .third(.first), + primaryColor: .black, + widthRatio: 0.525, + heightRatio: 0.525, + rotationDegrees: 180, + verticalOffsetRatio: -0.25, + symbolCountToWaitFor: 2 + ) + case .hatBrim: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .second(.second), + primaryColor: .black, + widthRatio: 0.625, + heightRatio: 0.125, + verticalOffsetRatio: -0.05, + symbolCountToWaitFor: 3 + ) + case .eyeBrowRight: + SymbolArtElement( + symbol: "􀆐", + name: "chevron.compact.up", + initialPosition: .third(.second), + primaryColor: .black, + fontWeight: .thin, + widthRatio: 0.1, + heightRatio: 0.04, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: 0.03, + symbolCountToWaitFor: 4 + ) + case .eyeBrowLeft: + SymbolArtElement( + symbol: "􀆐", + name: "chevron.compact.up", + initialPosition: .third(.second), + primaryColor: .black, + fontWeight: .thin, + widthRatio: 0.1, + heightRatio: 0.04, + horizontalOffsetRatio: -0.1, + verticalOffsetRatio: 0.03, + symbolCountToWaitFor: 4 + ) + case .sunGlassesFrameLeading: + SymbolArtElement( + symbol: "􀅽", + name: "minus", + initialPosition: .third(.third), + primaryColor: .black, + fontWeight: .thin, + widthRatio: 0.06, + heightRatio: 0.0125, + verticalOffsetRatio: 0.12, + symbolCountToWaitFor: 5 + ) + case .sunGlassesFrameCenter: + SymbolArtElement( + symbol: "􀅽", + name: "minus", + initialPosition: .third(.third), + primaryColor: .black, + fontWeight: .thin, + widthRatio: 0.06, + heightRatio: 0.0125, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.12, + symbolCountToWaitFor: 5 + ) + case .sunGlassesFrameTrailing: + SymbolArtElement( + symbol: "􀅽", + name: "minus", + initialPosition: .third(.third), + primaryColor: .black, + fontWeight: .thin, + widthRatio: 0.04, + heightRatio: 0.0125, + horizontalOffsetRatio: -0.2, + verticalOffsetRatio: 0.12, + symbolCountToWaitFor: 5 + ) + case .sunGlassesLensRight: + SymbolArtElement( + symbol: "􀆼", + name: "moon.circle.fill", + initialPrimaryColor: .white, + initialPosition: .third(.fourth), + primaryColor: .white, + widthRatio: 0.125, + heightRatio: 0.125, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: 0.12, + symbolCountToWaitFor: 6 + ) + case .sunGlassesLensLeft: + SymbolArtElement( + symbol: "􀆼", + name: "moon.circle.fill", + initialPrimaryColor: .white, + initialPosition: .third(.fourth), + primaryColor: .white, + widthRatio: 0.125, + heightRatio: 0.125, + horizontalOffsetRatio: -0.1, + verticalOffsetRatio: 0.12, + symbolCountToWaitFor: 6 + ) + case .nose: + SymbolArtElement( + symbol: "􀇈", + name: "cloud.heavyrain", + initialPosition: .third(.fifth), + primaryColor: .black, + fontWeight: .light, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: 0.27, + symbolCountToWaitFor: 7 + ) + case .mouth: + SymbolArtElement( + symbol: "􀩻", + name: "button.roundedbottom.horizontal.fill", + initialPosition: .third(.sixth), + primaryColor: .red, + widthRatio: 0.15, + heightRatio: 0.075, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 8 + ) + case .tongue: + SymbolArtElement( + symbol: "􀝷", + name: "capsule.fill", + initialPosition: .third(.seventh), + primaryColor: .orange, + widthRatio: 0.145, + heightRatio: 0.025, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: 0.424, + symbolCountToWaitFor: 9 + ) + } + } + } +} + +#Preview { + NavigationStack { + MagicianArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + MagicianPreviewView() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift index e3284eb..ebd70dc 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift @@ -9,187 +9,14 @@ import SwiftUI struct MagicianArtView: View { - @Environment(ArtWorkModel.self) var model @State private var isAnimating = false var body: some View { ZStack { - - // MARK: - 􀠒 Outline - AnimatableSymbolView( - name: "drop.fill", - initialPosition: .second(.first), - primaryColor: .paleOrange, - widthRatio: 0.5, - heightRatio: 0.75, - rotationDegrees: 180, - verticalOffsetRatio: 0.15, - isAnimating: isAnimating, - symbolCountToWaitFor: 0 - ) - - // MARK: - 􀏄 Hat band - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .second(.second), - primaryColor: .red, - widthRatio: 0.446, - heightRatio: 0.1, - horizontalOffsetRatio: 0.01, - verticalOffsetRatio: -0.15, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - // MARK: - 􀈮 Hat - AnimatableSymbolView( - name: "archivebox.fill", - initialPosition: .third(.first), - widthRatio: 0.525, - heightRatio: 0.525, - rotationDegrees: 180, - verticalOffsetRatio: -0.25, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀏄 Hat brim - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .second(.second), - widthRatio: 0.625, - heightRatio: 0.125, - verticalOffsetRatio: -0.05, - isAnimating: isAnimating, - symbolCountToWaitFor: 3 - ) - - // MARK: - 􀆐 Eyebrow - AnimatableSymbolView( - name: "chevron.compact.up", - initialPosition: .third(.second), - fontWeight: .thin, - widthRatio: 0.1, - heightRatio: 0.04, - horizontalOffsetRatio: 0.1, - verticalOffsetRatio: 0.03, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - - AnimatableSymbolView( - name: "chevron.compact.up", - initialPosition: .third(.second), - fontWeight: .thin, - widthRatio: 0.1, - heightRatio: 0.04, - horizontalOffsetRatio: -0.1, - verticalOffsetRatio: 0.03, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - - // MARK: - 􀅽 Sunglasses frame - AnimatableSymbolView( - name: "minus", - initialPosition: .third(.third), - fontWeight: .thin, - widthRatio: 0.06, - heightRatio: 0.0125, - verticalOffsetRatio: 0.12, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - AnimatableSymbolView( - name: "minus", - initialPosition: .third(.third), - fontWeight: .thin, - widthRatio: 0.06, - heightRatio: 0.0125, - horizontalOffsetRatio: 0.2, - verticalOffsetRatio: 0.12, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - AnimatableSymbolView( - name: "minus", - initialPosition: .third(.third), - fontWeight: .thin, - widthRatio: 0.04, - heightRatio: 0.0125, - horizontalOffsetRatio: -0.2, - verticalOffsetRatio: 0.12, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - // MARK: - 􀆼 Sunglasses lens - AnimatableSymbolView( - name: "moon.circle.fill", - initialPrimaryColor: .white, - initialPosition: .third(.fourth), - primaryColor: .white, - widthRatio: 0.125, - heightRatio: 0.125, - horizontalOffsetRatio: 0.1, - verticalOffsetRatio: 0.12, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - - AnimatableSymbolView( - name: "moon.circle.fill", - initialPrimaryColor: .white, - initialPosition: .third(.fourth), - primaryColor: .white, - widthRatio: 0.125, - heightRatio: 0.125, - horizontalOffsetRatio: -0.1, - verticalOffsetRatio: 0.12, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - - // MARK: - 􀇈 Nose - AnimatableSymbolView( - name: "cloud.heavyrain", - initialPosition: .third(.fifth), - fontWeight: .light, - widthRatio: 0.15, - heightRatio: 0.15, - horizontalOffsetRatio: 0.01, - verticalOffsetRatio: 0.27, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - // MARK: - 􀩻 Inside mouth - AnimatableSymbolView( - name: "button.roundedbottom.horizontal.fill", - initialPosition: .third(.sixth), - primaryColor: .red, - widthRatio: 0.15, - heightRatio: 0.075, - horizontalOffsetRatio: 0.01, - verticalOffsetRatio: 0.4, - isAnimating: isAnimating, - symbolCountToWaitFor: 8 - ) - - // MARK: - 􀝷 Tongue capsule.fill - AnimatableSymbolView( - name: "capsule.fill", - initialPosition: .third(.seventh), - primaryColor: .orange, - widthRatio: 0.145, - heightRatio: 0.025, - horizontalOffsetRatio: 0.01, - verticalOffsetRatio: 0.424, - isAnimating: isAnimating, - symbolCountToWaitFor: 9 - ) + ForEach(Element.allCases) { + AnimatableSymbolView(element: $0.value, + isAnimating: isAnimating) + } } .navigationTitle("Magician") .navigationBarTitleDisplayMode(.inline) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift index 16ea12e..21c947f 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift @@ -9,142 +9,11 @@ import SwiftUI struct MagicianPreviewView: View { - @Environment(ArtWorkModel.self) var model - var body: some View { ZStack { - - // MARK: - 􀠒 Outline - Image(systemName: "drop.fill") - .arrangeShape( - primaryColor: .paleOrange, - width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.75, forPreview: true), - rotationDegrees: 180, - verticalOffset: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true) - ) - - // MARK: - 􀏄 Hat band - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.446, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.15, forPreview: true) - ) - - // MARK: - 􀈮 Hat - Image(systemName: "archivebox.fill") - .arrangeShape( - width: model.calculatingProportionalValue(withRatio: 0.525, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.525, forPreview: true), - rotationDegrees: 180, - verticalOffset: model.calculatingProportionalValue(withRatio: -0.25, forPreview: true) - ) - - // MARK: - 􀏄 Hat brim - Image(systemName: "rectangle.fill") - .arrangeShape( - width: model.calculatingProportionalValue(withRatio: 0.625, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.05, forPreview: true) - ) - - // MARK: - 􀆐 Eyebrow - Image(systemName: "chevron.compact.up") - .arrangeShape( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true) - ) - - Image(systemName: "chevron.compact.up") - .arrangeShape( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true) - ) - - // MARK: - 􀅽 Sunglasses frame - Image(systemName: "minus") - .arrangeShape( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) - ) - - Image(systemName: "minus") - .arrangeShape( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) - ) - - Image(systemName: "minus") - .arrangeShape( - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.0125, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) - ) - - // MARK: - 􀆼 Sunglasses lens - Image(systemName: "moon.circle.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) - ) - - Image(systemName: "moon.circle.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true) - ) - - // MARK: - 􀇈 Nose - Image(systemName: "cloud.heavyrain") - .arrangeShape( - fontWeight: .light, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true) - ) - - // MARK: - 􀩻 Inside mouth - Image(systemName: "button.roundedbottom.horizontal.fill") - .arrangeShape( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.075, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true) - ) - - // MARK: - 􀝷 Tongue capsule.fill - Image(systemName: "capsule.fill") - .arrangeShape( - primaryColor: .orange, - width: model.calculatingProportionalValue(withRatio: 0.145, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.025, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.424, forPreview: true) - ) + ForEach(MagicianArtView.Element.allCases) { + SymbolArtPreviewView(element: $0.value) + } } } } From 618fa271b0935898d5e3f89674b7120cae262faf Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 14:21:42 +0900 Subject: [PATCH 069/108] Refactor CrayonBoy --- .../project.pbxproj | 4 + .../CrayonBoy/CrayonBoyArtView+Element.swift | 243 ++++++++++++++++++ .../ArtWorks/CrayonBoy/CrayonBoyArtView.swift | 203 +-------------- .../CrayonBoy/CrayonBoyPreviewView.swift | 161 +----------- 4 files changed, 255 insertions(+), 356 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+Element.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 0e73c13..b820a32 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -38,6 +38,7 @@ 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */; }; 9767DF0F2B75DFB400457DA1 /* SymbolArtPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */; }; 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */; }; + 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -100,6 +101,7 @@ 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AfroBoyArtView+Element.swift"; sourceTree = ""; }; 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtPreviewView.swift; sourceTree = ""; }; 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MagicianArtView+Element.swift"; sourceTree = ""; }; + 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CrayonBoyArtView+Element.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -441,6 +443,7 @@ isa = PBXGroup; children = ( 97EF43A42B74F27D003648F5 /* CrayonBoyArtView.swift */, + 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */, 97EF43A02B74CA38003648F5 /* CrayonBoyPreviewView.swift */, ); path = CrayonBoy; @@ -528,6 +531,7 @@ 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */, + 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */, 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, 97AD532D2B717C950034FB5D /* AfroBoyPreviewView.swift in Sources */, 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+Element.swift new file mode 100644 index 0000000..aa771a1 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+Element.swift @@ -0,0 +1,243 @@ +// +// CrayonBoyArtView+Element.swift +// SFSymbolsArtCollection +// +// + +import SwiftUI + +extension CrayonBoyArtView { + + enum Element: String, CaseIterable, Identifiable { + case outline + case hair + case hairConcealment + case eyebrowRight + case eyebrowLeft + case eyelidRight + case eyelidLeft + case eyelidConcealmentRight + case eyelidConcealmentLeft + case eyeRight + case eyeLeft + case outlineFrame + case mouth + case mouthFrame + case sideburns + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .outline: + SymbolArtElement( + symbol: "􀇃", + name: "cloud.fill", + initialPosition: .second(.first), + primaryColor: .paleOrange, + fontWeight: .ultraLight, + widthRatio: 0.75, + heightRatio: 0.5, + rotationDegrees: 8, + flip: .horizontal, + symbolCountToWaitFor: 0 + ) + case .hair: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .second(.second), + primaryColor: .black, + widthRatio: 0.44, + heightRatio: 0.25, + horizontalOffsetRatio: 0.05, + verticalOffsetRatio: -0.125, + symbolCountToWaitFor: 2 + ) + case .hairConcealment: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.fifth), + primaryColor: .paleOrange, + widthRatio: 0.4, + heightRatio: 0.25, + horizontalOffsetRatio: 0.033, + verticalOffsetRatio: -0.05, + symbolCountToWaitFor: 3 + ) + case .eyebrowRight: + SymbolArtElement( + symbol: "􀆍", + name: "control", + initialPosition: .third(.sixth), + primaryColor: .black, + fontWeight: .black, + widthRatio: 0.2, + heightRatio: 0.1, + rotationDegrees: 6, + horizontalOffsetRatio: -0.07, + verticalOffsetRatio: -0.14, + symbolCountToWaitFor: 4 + ) + case .eyebrowLeft: + SymbolArtElement( + symbol: "􀆍", + name: "control", + initialPosition: .third(.sixth), + primaryColor: .black, + fontWeight: .black, + widthRatio: 0.2, + heightRatio: 0.1, + rotationDegrees: 6, + horizontalOffsetRatio: 0.14, + verticalOffsetRatio: -0.12, + symbolCountToWaitFor: 4 + ) + case .eyelidRight: + SymbolArtElement( + symbol: "􀀀", + name: "circle", + initialPosition: .second(.third), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.17, + heightRatio: 0.16, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.01, + symbolCountToWaitFor: 5 + ) + case .eyelidLeft: + SymbolArtElement( + symbol: "􀀀", + name: "circle", + initialPosition: .second(.third), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.17, + heightRatio: 0.16, + horizontalOffsetRatio: -0.08, + verticalOffsetRatio: -0.01, + symbolCountToWaitFor: 5 + ) + case .eyelidConcealmentRight: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.fifth), + primaryColor: .paleOrange, + widthRatio: 0.2, + heightRatio: 0.16, + horizontalOffsetRatio: 0.13, + verticalOffsetRatio: 0.06, + symbolCountToWaitFor: 6 + ) + case .eyelidConcealmentLeft: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.fifth), + primaryColor: .paleOrange, + widthRatio: 0.2, + heightRatio: 0.16, + horizontalOffsetRatio: -0.08, + verticalOffsetRatio: 0.06, + symbolCountToWaitFor: 6 + ) + case .eyeRight: + SymbolArtElement( + symbol: "􀢚", + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.seventh), + primaryColor: .white, + widthRatio: 0.14, + heightRatio: 0.14, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: 0.02, + symbolCountToWaitFor: 7 + ) + case .eyeLeft: + SymbolArtElement( + symbol: "􀢚", + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.seventh), + primaryColor: .white, + widthRatio: 0.14, + heightRatio: 0.14, + horizontalOffsetRatio: -0.06, + verticalOffsetRatio: 0.016, + symbolCountToWaitFor: 7 + ) + case .outlineFrame: + SymbolArtElement( + symbol: "􀇂", + name: "cloud", + initialPosition: .third(.first), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.75, + heightRatio: 0.5, + rotationDegrees: 8, + flip: .horizontal, + symbolCountToWaitFor: 1 + ) + case .mouth: + SymbolArtElement( + symbol: "􀧷", + name: "capsule.portrait.fill", + initialPosition: .third(.second), + primaryColor: .red, + fontWeight: .ultraLight, + widthRatio: 0.1, + heightRatio: 0.15, + rotationDegrees: 16, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: 0.225, + symbolCountToWaitFor: 8 + ) + case .mouthFrame: + SymbolArtElement( + symbol: "􀧶", + name: "capsule.portrait", + initialPosition: .third(.third), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.1, + heightRatio: 0.15, + rotationDegrees: 16, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: 0.225, + symbolCountToWaitFor: 8 + ) + case .sideburns: + SymbolArtElement( + symbol: "􁹬", + name: "righttriangle.fill", + initialPosition: .third(.fourth), + primaryColor: .black, + widthRatio: 0.064, + heightRatio: 0.2, + rotationDegrees: 170, + flip: .horizontal, + horizontalOffsetRatio: 0.215, + verticalOffsetRatio: -0.07, + symbolCountToWaitFor: 9 + ) + } + } + } +} + +#Preview { + NavigationStack { + CrayonBoyArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + CrayonBoyPreviewView() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift index f03503c..1c044bb 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift @@ -9,210 +9,15 @@ import SwiftUI struct CrayonBoyArtView: View { - @Environment(ArtWorkModel.self) var model @State private var isAnimating = false var body: some View { ZStack { - // MARK: - 􀇃 Outline - AnimatableSymbolView( - name: "cloud.fill", - initialPosition: .second(.first), - primaryColor: .paleOrange, - fontWeight: .ultraLight, - widthRatio: 0.75, - heightRatio: 0.5, - rotationDegrees: 8, - flip: .horizontal, - isAnimating: isAnimating, - symbolCountToWaitFor: 0 - ) - - // MARK: - 􀀁 Hair top - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .second(.second), - widthRatio: 0.44, - heightRatio: 0.25, - horizontalOffsetRatio: 0.05, - verticalOffsetRatio: -0.125, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀏄 Concealing part for hair - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .third(.fifth), - primaryColor: .paleOrange, - widthRatio: 0.4, - heightRatio: 0.25, - horizontalOffsetRatio: 0.033, - verticalOffsetRatio: -0.05, - isAnimating: isAnimating, - symbolCountToWaitFor: 3 - ) - - // MARK: - 􀆍 Eyebrow - AnimatableSymbolView( - name: "control", - initialPosition: .third(.sixth), - fontWeight: .black, - widthRatio: 0.2, - heightRatio: 0.1, - rotationDegrees: 6, - horizontalOffsetRatio: -0.07, - verticalOffsetRatio: -0.14, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - - AnimatableSymbolView( - name: "control", - initialPosition: .third(.sixth), - fontWeight: .black, - widthRatio: 0.2, - heightRatio: 0.1, - rotationDegrees: 6, - horizontalOffsetRatio: 0.14, - verticalOffsetRatio: -0.12, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - - // MARK: - 􀀀 Eyelid - AnimatableSymbolView( - name: "circle", - initialPosition: .second(.third), - fontWeight: .ultraLight, - widthRatio: 0.17, - heightRatio: 0.16, - horizontalOffsetRatio: 0.12, - verticalOffsetRatio: -0.01, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - AnimatableSymbolView( - name: "circle", - initialPosition: .second(.third), - fontWeight: .ultraLight, - widthRatio: 0.17, - heightRatio: 0.16, - horizontalOffsetRatio: -0.08, - verticalOffsetRatio: -0.01, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - // MARK: - 􀏄 Concealing part for Eyelid - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .third(.fifth), - primaryColor: .paleOrange, - widthRatio: 0.2, - heightRatio: 0.16, - horizontalOffsetRatio: 0.13, - verticalOffsetRatio: 0.06, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .third(.fifth), - primaryColor: .paleOrange, - widthRatio: 0.2, - heightRatio: 0.16, - horizontalOffsetRatio: -0.08, - verticalOffsetRatio: 0.06, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - - // MARK: - 􀢚 Eye - AnimatableSymbolView( - name: "record.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.seventh), - primaryColor: .white, - widthRatio: 0.14, - heightRatio: 0.14, - horizontalOffsetRatio: 0.1, - verticalOffsetRatio: 0.02, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - AnimatableSymbolView( - name: "record.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.seventh), - primaryColor: .white, - widthRatio: 0.14, - heightRatio: 0.14, - horizontalOffsetRatio: -0.06, - verticalOffsetRatio: 0.016, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - // MARK: - 􀇂 Outline frame - AnimatableSymbolView( - name: "cloud", - initialPosition: .third(.first), - fontWeight: .ultraLight, - widthRatio: 0.75, - heightRatio: 0.5, - rotationDegrees: 8, - flip: .horizontal, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - // MARK: - 􀧷 Mouth - AnimatableSymbolView( - name: "capsule.portrait.fill", - initialPosition: .third(.second), - primaryColor: .red, - fontWeight: .ultraLight, - widthRatio: 0.1, - heightRatio: 0.15, - rotationDegrees: 16, - horizontalOffsetRatio: -0.09, - verticalOffsetRatio: 0.225, - isAnimating: isAnimating, - symbolCountToWaitFor: 8 - ) - - // MARK: - 􀧶 Mouth frame - AnimatableSymbolView( - name: "capsule.portrait", - initialPosition: .third(.third), - fontWeight: .ultraLight, - widthRatio: 0.1, - heightRatio: 0.15, - rotationDegrees: 16, - horizontalOffsetRatio: -0.09, - verticalOffsetRatio: 0.225, - isAnimating: isAnimating, - symbolCountToWaitFor: 8 - ) - - // MARK: - 􁹬 Sideburns - AnimatableSymbolView( - name: "righttriangle.fill", - initialPosition: .third(.fourth), - widthRatio: 0.064, - heightRatio: 0.2, - rotationDegrees: 170, - flip: .horizontal, - horizontalOffsetRatio: 0.215, - verticalOffsetRatio: -0.07, - isAnimating: isAnimating, - symbolCountToWaitFor: 9 - ) + ForEach(Element.allCases) { + AnimatableSymbolView(element: $0.value, + isAnimating: isAnimating) + } } .navigationTitle("Crayon boy") .navigationBarTitleDisplayMode(.inline) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift index 1c68be1..edb1c85 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift @@ -8,165 +8,12 @@ import SwiftUI struct CrayonBoyPreviewView: View { - - @Environment(ArtWorkModel.self) var model - - var body: some View { + var body: some View { ZStack { - // MARK: - 􀇃 Outline - Image(systemName: "cloud.fill") - .arrangeShape( - primaryColor: .paleOrange, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.75, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - rotationDegrees: 8, - flip: .horizontal - ) - - // MARK: - 􀀁 Hair top - Image(systemName: "circle.fill") - .arrangeShape( - width: model.calculatingProportionalValue(withRatio: 0.44, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true) - ) - - // MARK: - 􀏄 Concealing part for hair - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .paleOrange, - width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.033, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.05, forPreview: true) - ) - - // MARK: - 􀆍 Eyebrow - Image(systemName: "control") - .arrangeShape( - fontWeight: .black, - width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - rotationDegrees: 6, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.14, forPreview: true) - ) - - Image(systemName: "control") - .arrangeShape( - fontWeight: .black, - width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - rotationDegrees: 6, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.12, forPreview: true) - ) - - // MARK: - 􀀀 Eyelid - Image(systemName: "circle") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true) - ) - - Image(systemName: "circle") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true) - ) - - // MARK: - 􀏄 Concealing part for Eyelid - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .paleOrange, - width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true) - ) - - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .paleOrange, - width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true) - ) - - // MARK: - 􀢚 Eye - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .black, - width: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true) - ) - - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .black, - width: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.06, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.016, forPreview: true) - ) - - // MARK: - 􀇂 Outline frame - Image(systemName: "cloud") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.75, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - rotationDegrees: 8, - flip: .horizontal - ) - - // MARK: - 􀧷 Mouth - Image(systemName: "capsule.portrait.fill") - .arrangeShape( - primaryColor: .red, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.10, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - rotationDegrees: 16, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.225, forPreview: true) - ) - - // MARK: - 􀧶 Mouth frame - Image(systemName: "capsule.portrait") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.10, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - rotationDegrees: 16, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.225, forPreview: true) - ) - - // MARK: - 􁹬 Sideburns - Image(systemName: "righttriangle.fill") - .arrangeShape( - width: model.calculatingProportionalValue(withRatio: 0.064, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - rotationDegrees: 170, - flip: .horizontal, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.215, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true) - ) + ForEach(CrayonBoyArtView.Element.allCases) { + SymbolArtPreviewView(element: $0.value) + } } } } From b784b013cfbb723334a2c6324a994e0010aac076 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 15:05:16 +0900 Subject: [PATCH 070/108] Refactor WorldPeaceArtView --- .../project.pbxproj | 8 +- .../WorldPeace+CharacterPosition.swift | 100 ----- .../WorldPeaceArtView+Element.swift | 360 ++++++++++++++++++ .../WorldPeace/WorldPeaceArtView.swift | 80 +--- .../WorldPeace/WorldPeacePreviewView.swift | 76 +--- 5 files changed, 370 insertions(+), 254 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index b820a32..2773b80 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -29,7 +29,6 @@ 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2E28C2E608004E1720 /* SmallFirework.swift */; }; 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */; }; 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */; }; - 9767DEFE2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */; }; 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */; }; 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */; }; 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */; }; @@ -39,6 +38,7 @@ 9767DF0F2B75DFB400457DA1 /* SymbolArtPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */; }; 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */; }; 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */; }; + 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -92,7 +92,6 @@ 97624C2E28C2E608004E1720 /* SmallFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallFirework.swift; sourceTree = ""; }; 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GeometryProxy+.swift"; sourceTree = ""; }; 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeacePreviewView.swift; sourceTree = ""; }; - 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeace+CharacterPosition.swift"; sourceTree = ""; }; 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeaceArtView.swift; sourceTree = ""; }; 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsPreviewView.swift; sourceTree = ""; }; 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsArtView.swift; sourceTree = ""; }; @@ -102,6 +101,7 @@ 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtPreviewView.swift; sourceTree = ""; }; 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MagicianArtView+Element.swift"; sourceTree = ""; }; 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CrayonBoyArtView+Element.swift"; sourceTree = ""; }; + 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeaceArtView+Element.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -252,8 +252,8 @@ isa = PBXGroup; children = ( 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */, + 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */, 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */, - 9767DEFD2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift */, ); path = WorldPeace; sourceTree = ""; @@ -537,7 +537,7 @@ 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, - 9767DEFE2B752E0400457DA1 /* WorldPeace+CharacterPosition.swift in Sources */, + 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */, 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift deleted file mode 100644 index ca29c2d..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeace+CharacterPosition.swift +++ /dev/null @@ -1,100 +0,0 @@ -// -// WorldPeace+CharacterPosition.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -extension WorldPeaceArtView { - - enum CharacterPosition: String, CaseIterable, Identifiable { - case topFirst - case topSecond - case topThird - case topFourth - case topFifth - case bottomFirst - case bottomSecond - case bottomThird - case bottomFourth - case bottomFifth - - struct Value { - let character: String - let color: Color - let initialPosition: ArtWorkModel.InitialSymbolRow - let horizontalOffsetRatio: CGFloat - let verticalOffsetRatio: CGFloat - } - - var id: String { self.rawValue } - - var value: Value { - switch self { - case .topFirst: - Value(character: "w", - color: .red, - initialPosition: .second(.second), - horizontalOffsetRatio: -0.34, - verticalOffsetRatio: -0.4) - case .topSecond: - Value(character: "o", - color: .yellow, - initialPosition: .third(.sixth), - horizontalOffsetRatio: -0.17, - verticalOffsetRatio: -0.4) - case .topThird: - Value(character: "r", - color: .green, - initialPosition: .second(.first), - - horizontalOffsetRatio: 0, - verticalOffsetRatio: -0.4) - case .topFourth: - Value(character: "l", - color: .blue, - initialPosition: .third(.fifth), - horizontalOffsetRatio: 0.17, - verticalOffsetRatio: -0.4) - case .topFifth: - Value(character: "d", - color: .purple, - initialPosition: .third(.third), - horizontalOffsetRatio: 0.34, - verticalOffsetRatio: -0.4) - case .bottomFirst: - Value(character: "p", - color: .teal, - initialPosition: .third(.seventh), - horizontalOffsetRatio: -0.34, - verticalOffsetRatio: 0.4) - case .bottomSecond: - Value(character: "e", - color: .pink, - initialPosition: .third(.fourth), - horizontalOffsetRatio: -0.17, - verticalOffsetRatio: 0.4) - case .bottomThird: - Value(character: "a", - color: .mint, - initialPosition: .third(.first), - horizontalOffsetRatio: 0, - verticalOffsetRatio: 0.4) - case .bottomFourth: - Value(character: "c", - color: .indigo, - initialPosition: .third(.second), - horizontalOffsetRatio: 0.17, - verticalOffsetRatio: 0.4) - case .bottomFifth: - Value(character: "e", - color: .orange, - initialPosition: .third(.fourth), - horizontalOffsetRatio: 0.34, - verticalOffsetRatio: 0.4) - } - } - } -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift new file mode 100644 index 0000000..c740c60 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift @@ -0,0 +1,360 @@ +// +// WorldPeaceArtView+Element.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import Foundation + +extension WorldPeaceArtView { + + enum Element: String, CaseIterable, Identifiable { + case shadowForW + case shadowForO + case shadowForR + case shadowForL + case shadowForD + case shadowForP + case shadowForFirstE + case shadowForA + case shadowForC + case shadowForSecondE + case characterW + case characterO + case characterR + case characterL + case characterD + case characterP + case characterFirstE + case characterA + case characterC + case characterSecondE + case sea + case earth + case earthFrame + case peaceSign + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .shadowForW: + SymbolArtElement( + symbol: "􀀰", + name: "w.circle", + initialPosition: .second(.second), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 4 + ) + case .shadowForO: + SymbolArtElement( + symbol: "􀀠", + name: "o.circle", + initialPosition: .third(.sixth), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 4 + ) + case .shadowForR: + SymbolArtElement( + symbol: "􀀦", + name: "r.circle", + initialPosition: .second(.first), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 4 + ) + case .shadowForL: + SymbolArtElement( + symbol: "􀀚", + name: "l.circle", + initialPosition: .third(.fifth), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.17, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 4 + ) + case .shadowForD: + SymbolArtElement( + symbol: "􀀊", + name: "d.circle", + initialPosition: .third(.third), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 4 + ) + case .shadowForP: + SymbolArtElement( + symbol: "􀀢", + name: "p.circle", + initialPosition: .third(.seventh), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 4 + ) + case .shadowForFirstE: + SymbolArtElement( + symbol: "􀀌", + name: "e.circle", + initialPosition: .third(.fourth), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 4 + ) + case .shadowForA: + SymbolArtElement( + symbol: "􀀄", + name: "a.circle", + initialPosition: .third(.first), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 5 + ) + case .shadowForC: + SymbolArtElement( + symbol: "􀀈", + name: "c.circle", + initialPosition: .third(.second), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.17, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 4 + ) + case .shadowForSecondE: + SymbolArtElement( + symbol: "􀀌", + name: "e.circle", + initialPosition: .third(.fourth), + primaryColor: .black, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 4 + ) + case .characterW: + SymbolArtElement( + symbol: "􀀰", + name: "w.circle", + initialPosition: .second(.second), + primaryColor: .red, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 4 + ) + case .characterO: + SymbolArtElement( + symbol: "􀀠", + name: "o.circle", + initialPosition: .third(.sixth), + primaryColor: .yellow, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 5 + ) + case .characterR: + SymbolArtElement( + symbol: "􀀦", + name: "r.circle", + initialPosition: .second(.first), + primaryColor: .green, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 5 + ) + case .characterL: + SymbolArtElement( + symbol: "􀀚", + name: "l.circle", + initialPosition: .third(.fifth), + primaryColor: .blue, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.17, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 5 + ) + case .characterD: + SymbolArtElement( + symbol: "􀀊", + name: "d.circle", + initialPosition: .third(.third), + primaryColor: .purple, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 5 + ) + case .characterP: + SymbolArtElement( + symbol: "􀀢", + name: "p.circle", + initialPosition: .third(.seventh), + primaryColor: .teal, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 5 + ) + case .characterFirstE: + SymbolArtElement( + symbol: "􀀌", + name: "e.circle", + initialPosition: .third(.fourth), + primaryColor: .pink, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 5 + ) + case .characterA: + SymbolArtElement( + symbol: "􀀄", + name: "a.circle", + initialPosition: .third(.first), + primaryColor: .mint, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 5 + ) + case .characterC: + SymbolArtElement( + symbol: "􀀈", + name: "c.circle", + initialPosition: .third(.second), + primaryColor: .indigo, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.17, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 5 + ) + case .characterSecondE: + SymbolArtElement( + symbol: "􀀌", + name: "e.circle", + initialPosition: .third(.fourth), + primaryColor: .pink, + secondaryColor: .systemBackground, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: 0.4, + symbolCountToWaitFor: 5 + ) + case .sea: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .second(.third), + primaryColor: .cyan, + widthRatio: 0.55, + heightRatio: 0.55, + symbolCountToWaitFor: 0 + ) + case .earth: + SymbolArtElement( + symbol: "􀵶", + name: "globe.asia.australia.fill", + initialPosition: .second(.fourth), + primaryColor: .green, + fontWeight: .ultraLight, + widthRatio: 0.55, + heightRatio: 0.55, + symbolCountToWaitFor: 1 + ) + case .earthFrame: + SymbolArtElement( + symbol: "􀵵", + name: "globe.asia.australia", + initialPosition: .second(.fifth), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.57, + heightRatio: 0.57, + symbolCountToWaitFor: 2 + ) + case .peaceSign: + SymbolArtElement( + symbol: "􀺎", + name: "peacesign", + initialPosition: .second(.sixth), + primaryColor: .white, + fontWeight: .thin, + widthRatio: 0.535, + heightRatio: 0.535, + symbolCountToWaitFor: 3 + ) + } + } + } +} + +#Preview { + NavigationStack { + WorldPeaceArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + WorldPeacePreviewView() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift index f069b8d..d276e4f 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift @@ -9,90 +9,14 @@ import SwiftUI struct WorldPeaceArtView: View { - @Environment(ArtWorkModel.self) var model @State private var isAnimating = false var body: some View { ZStack { - - // MARK: - Characters black shadow - ForEach(CharacterPosition.allCases) { - - AnimatableSymbolView( - name: "\($0.value.character).circle", - initialPosition: $0.value.initialPosition, - secondaryColor: .systemBackground, - widthRatio: 0.15, - heightRatio: 0.15, - horizontalOffsetRatio: $0.value.horizontalOffsetRatio, - verticalOffsetRatio: $0.value.verticalOffsetRatio, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - } - - // MARK: - Colored Characters - ForEach(WorldPeaceArtView.CharacterPosition.allCases) { - AnimatableSymbolView( - name: "\($0.value.character).circle", - initialPosition: $0.value.initialPosition, - primaryColor: $0.value.color, - secondaryColor: .systemBackground, - widthRatio: 0.15, - heightRatio: 0.15, - horizontalOffsetRatio: $0.value.horizontalOffsetRatio - 0.006, - verticalOffsetRatio: $0.value.verticalOffsetRatio, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) + ForEach(Element.allCases) { + AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } - - // MARK: - 􀀁 Sea - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .second(.third), - primaryColor: .cyan, - widthRatio: 0.55, - heightRatio: 0.55, - isAnimating: isAnimating, - symbolCountToWaitFor: 0 - ) - - // MARK: - 􀵶 Earth - AnimatableSymbolView( - name: "globe.asia.australia.fill", - initialPosition: .second(.fourth), - primaryColor: .green, - fontWeight: .ultraLight, - widthRatio: 0.55, - heightRatio: 0.55, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - // MARK: - 􀵵 Earth frame - AnimatableSymbolView( - name: "globe.asia.australia", - initialPosition: .second(.fifth), - fontWeight: .ultraLight, - widthRatio: 0.57, - heightRatio: 0.57, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀺎 Peace sign - AnimatableSymbolView( - name: "peacesign", - initialPosition: .second(.sixth), - primaryColor: .white, - fontWeight: .thin, - widthRatio: 0.535, - heightRatio: 0.535, - isAnimating: isAnimating, - symbolCountToWaitFor: 3 - ) } .navigationTitle("World Peace") .navigationBarTitleDisplayMode(.inline) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift index 7f3b83e..e446d90 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift @@ -8,86 +8,18 @@ import SwiftUI struct WorldPeacePreviewView: View { - - @Environment(ArtWorkModel.self) var model - + var body: some View { ZStack { - - // MARK: - Characters black shadow - ForEach(WorldPeaceArtView.CharacterPosition.allCases) { - Image(systemName: "\($0.value.character).circle") - .arrangeShape( - secondaryColor: .systemBackground, - fontWeight: .bold, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) - ) - } - - // MARK: - Colored Characters - ForEach(WorldPeaceArtView.CharacterPosition.allCases) { - Image(systemName: "\($0.value.character).circle") - .arrangeShape( - primaryColor: $0.value.color, - secondaryColor: .systemBackground, - fontWeight: .bold, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio - 0.006, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) - ) + ForEach(WorldPeaceArtView.Element.allCases) { + SymbolArtPreviewView(element: $0.value) } - - // MARK: - 􀀁 Sea - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .cyan, - width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) - ) - - // MARK: - 􀀁 Sea - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .cyan, - width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) - ) - - // MARK: - 􀵶 Earth - Image(systemName: "globe.asia.australia.fill") - .arrangeShape( - primaryColor: .green, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.55, forPreview: true) - ) - - // MARK: - 􀵵 Earth frame - Image(systemName: "globe.asia.australia") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.57, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.57, forPreview: true) - ) - - // MARK: - 􀺎 Peace sign - Image(systemName: "peacesign") - .arrangeShape( - primaryColor: .white, - fontWeight: .thin, - width: model.calculatingProportionalValue(withRatio: 0.535, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.535, forPreview: true) - ) } } } #Preview { WorldPeacePreviewView() - .environment(ArtWorkModel.init(screenSize: .init(width: 4600, height: 4600))) + .environment(ArtWorkModel.preview) } From 9bf4e2b1d98f206fd16ca22caa8658dde3163a45 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 15:36:26 +0900 Subject: [PATCH 071/108] Refactor PartyAnimalsArt --- .../project.pbxproj | 8 +- .../PartyAnimalsArtView+Element.swift | 456 ++++++++++++++++++ .../PartyAnimalsArtView+RawPosition.swift | 53 -- .../PartyAnimals/PartyAnimalsArtView.swift | 391 +-------------- .../PartyAnimalsPreviewView.swift | 308 +----------- 5 files changed, 466 insertions(+), 750 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+Element.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+RawPosition.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 2773b80..a32606b 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -32,13 +32,13 @@ 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */; }; 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */; }; 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */; }; - 9767DF092B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */; }; 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */; }; 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */; }; 9767DF0F2B75DFB400457DA1 /* SymbolArtPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */; }; 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */; }; 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */; }; 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */; }; + 9767DF172B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF162B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -95,13 +95,13 @@ 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeaceArtView.swift; sourceTree = ""; }; 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsPreviewView.swift; sourceTree = ""; }; 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsArtView.swift; sourceTree = ""; }; - 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PartyAnimalsArtView+RawPosition.swift"; sourceTree = ""; }; 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtElement.swift; sourceTree = ""; }; 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AfroBoyArtView+Element.swift"; sourceTree = ""; }; 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtPreviewView.swift; sourceTree = ""; }; 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MagicianArtView+Element.swift"; sourceTree = ""; }; 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CrayonBoyArtView+Element.swift"; sourceTree = ""; }; 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeaceArtView+Element.swift"; sourceTree = ""; }; + 9767DF162B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PartyAnimalsArtView+Element.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -262,8 +262,8 @@ isa = PBXGroup; children = ( 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */, + 9767DF162B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift */, 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */, - 9767DF082B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift */, ); path = PartyAnimals; sourceTree = ""; @@ -525,6 +525,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 9767DF172B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift in Sources */, 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */, 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */, 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, @@ -546,7 +547,6 @@ 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */, 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */, - 9767DF092B75C0B500457DA1 /* PartyAnimalsArtView+RawPosition.swift in Sources */, 9748BE5F289F194E006DF0BE /* RocketFirework.swift in Sources */, 9748BE59289DCE17006DF0BE /* Fireworks.swift in Sources */, 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+Element.swift new file mode 100644 index 0000000..39dd52e --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+Element.swift @@ -0,0 +1,456 @@ +// +// PartyAnimalsArtView+Element.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension PartyAnimalsArtView { + + enum Element: String, CaseIterable, Identifiable { + case bearEarRight + case bearEarLeft + case bearEarInsideRight + case bearEarInsideLeft + case bearOutline + case bearEyeRight + case bearEyeLeft + case bearMouth + case bearNose + case flogEyeOutlineRight + case flogEyeOutlineLeft + case flogEyeRight + case flogEyeLeft + case flogOutline + case flogMouth + case lionManeFirst + case lionManeSecond + case lionEarRight + case lionEarLeft + case lionOutline + case lionEyeRight + case lionEyeLeft + case lionWhiskersRight + case lionWhiskersLeft + case lionMouth + case lionNose + case pawFirst + case pawSecond + case pawThird + case pawFourth + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .bearEarRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .brown, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.08, + verticalOffsetRatio: -0.37, + symbolCountToWaitFor: 1 + ) + case .bearEarLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .brown, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.32, + verticalOffsetRatio: -0.37, + symbolCountToWaitFor: 1 + ) + case .bearEarInsideRight: + SymbolArtElement( + symbol: "􀩹", + name: "button.roundedtop.horizontal.fill", + initialPosition: .third(.fourth), + primaryColor: .palePink, + widthRatio: 0.06, + heightRatio: 0.06, + rotationDegrees: -20, + horizontalOffsetRatio: 0.08, + verticalOffsetRatio: -0.37, + symbolCountToWaitFor: 0 + ) + case .bearEarInsideLeft: + SymbolArtElement( + symbol: "􀩹", + name: "button.roundedtop.horizontal.fill", + initialPosition: .third(.fourth), + primaryColor: .palePink, + widthRatio: 0.06, + heightRatio: 0.06, + rotationDegrees: 20, + horizontalOffsetRatio: 0.32, + verticalOffsetRatio: -0.37, + symbolCountToWaitFor: 0 + ) + case .bearOutline: + SymbolArtElement( + symbol: "􀲟", + name: "oval.fill", + initialPosition: .third(.fifth), + primaryColor: .brown, + widthRatio: 0.4, + heightRatio: 0.325, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: -0.2, + symbolCountToWaitFor: 8 + ) + case .bearEyeRight: + SymbolArtElement( + symbol: "􀢚", + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: 0.13, + verticalOffsetRatio: -0.23, + symbolCountToWaitFor: 7 + ) + + case .bearEyeLeft: + SymbolArtElement( + symbol: "􀢚", + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: 0.27, + verticalOffsetRatio: -0.23, + symbolCountToWaitFor: 7 + ) + case .bearMouth: + SymbolArtElement( + symbol: "􀁹", + name: "arrow.down.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .second(.third), + primaryColor: .black, + secondaryColor: .white, + widthRatio: 0.125, + heightRatio: 0.125, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: -0.15, + symbolCountToWaitFor: 5 + ) + case .bearNose: + SymbolArtElement( + symbol: "􀆼", + name: "moon.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.seventh), + primaryColor: .white, + secondaryColor: .red, + widthRatio: 0.04, + heightRatio: 0.04, + rotationDegrees: 170, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: -0.17, + symbolCountToWaitFor: 6 + ) + case .flogEyeOutlineRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .green, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.32, + verticalOffsetRatio: -0.18, + symbolCountToWaitFor: 1 + ) + case .flogEyeOutlineLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .green, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.08, + verticalOffsetRatio: -0.18, + symbolCountToWaitFor: 1 + ) + case .flogEyeRight: + SymbolArtElement( + symbol: "􀢚", + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: -0.32, + verticalOffsetRatio: -0.18, + symbolCountToWaitFor: 7 + ) + case .flogEyeLeft: + SymbolArtElement( + symbol: "􀢚", + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: -0.08, + verticalOffsetRatio: -0.18, + symbolCountToWaitFor: 7 + ) + case .flogOutline: + SymbolArtElement( + symbol: "􀲟", + name: "oval.fill", + initialPosition: .third(.fifth), + primaryColor: .green, + widthRatio: 0.4, + heightRatio: 0.325, + horizontalOffsetRatio: -0.2, + symbolCountToWaitFor: 8 + ) + case .flogMouth: + SymbolArtElement( + symbol: "􀆈", + name: "chevron.down", + initialPosition: .second(.first), + primaryColor: .black, + fontWeight: .bold, + widthRatio: 0.1, + heightRatio: 0.05, + horizontalOffsetRatio: -0.2, + verticalOffsetRatio: 0.025, + symbolCountToWaitFor: 3 + ) + case .lionManeFirst: + // MARK: - Lion mane + SymbolArtElement( + symbol: "􀟇", + name: "seal.fill", + initialPosition: .third(.second), + primaryColor: .orange, + fontWeight: .ultraLight, + widthRatio: 0.52, + heightRatio: 0.52, + rotationDegrees: 20, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.26, + symbolCountToWaitFor: 9 + ) + case .lionManeSecond: + SymbolArtElement( + symbol: "􀟇", + name: "seal.fill", + initialPosition: .third(.second), + primaryColor: .orange, + fontWeight: .ultraLight, + widthRatio: 0.52, + heightRatio: 0.52, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.26, + symbolCountToWaitFor: 9 + ) + case .lionEarRight: + // MARK: - 􀀁 Lion ear + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .yellow, + widthRatio: 0.12, + heightRatio: 0.12, + horizontalOffsetRatio: 0.08, + verticalOffsetRatio: 0.17, + symbolCountToWaitFor: 1 + ) + case .lionEarLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.third), + primaryColor: .yellow, + widthRatio: 0.12, + heightRatio: 0.12, + horizontalOffsetRatio: 0.32, + verticalOffsetRatio: 0.17, + symbolCountToWaitFor: 1 + ) + case .lionOutline: + // MARK: - Lion outline + SymbolArtElement( + symbol: "􀲟", + name: "oval.fill", + initialPosition: .third(.fifth), + primaryColor: .yellow, + widthRatio: 0.3, + heightRatio: 0.26, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.29, + symbolCountToWaitFor: 8 + ) + case .lionEyeRight: + SymbolArtElement( + symbol: "􀢚", + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: 0.13, + verticalOffsetRatio: 0.26, + symbolCountToWaitFor: 7 + ) + case .lionEyeLeft: + SymbolArtElement( + symbol: "􀢚", + name: "record.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.sixth), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: 0.27, + verticalOffsetRatio: 0.26, + symbolCountToWaitFor: 7 + ) + case .lionWhiskersRight: + SymbolArtElement( + symbol: "􀇯", + name: "rays", + initialPosition: .second(.second), + primaryColor: .darkBrown, + widthRatio: 0.175, + heightRatio: 0.06, + horizontalOffsetRatio: 0.235, + verticalOffsetRatio: 0.33, + symbolCountToWaitFor: 4 + ) + case .lionWhiskersLeft: + SymbolArtElement( + symbol: "􀇯", + name: "rays", + initialPosition: .second(.second), + primaryColor: .darkBrown, + widthRatio: 0.175, + heightRatio: 0.06, + horizontalOffsetRatio: 0.165, + verticalOffsetRatio: 0.33, + symbolCountToWaitFor: 4 + ) + case .lionMouth: + SymbolArtElement( + symbol: "􀁹", + name: "arrow.down.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .second(.third), + primaryColor: .black, + secondaryColor: .white, + widthRatio: 0.125, + heightRatio: 0.11, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.34, + symbolCountToWaitFor: 5 + ) + case .lionNose: + SymbolArtElement( + symbol: "􀆼", + name: "moon.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.seventh), + primaryColor: .white, + secondaryColor: .darkBrown, + widthRatio: 0.04, + heightRatio: 0.04, + rotationDegrees: 170, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: 0.32, + symbolCountToWaitFor: 6 + ) + case .pawFirst: + SymbolArtElement( + symbol: "􀾟", + name: "pawprint.fill", + initialPosition: .third(.first), + primaryColor: .red, + widthRatio: 0.13, + heightRatio: 0.13, + rotationDegrees: 24, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: -0.5, + symbolCountToWaitFor: 2 + ) + case .pawSecond: + SymbolArtElement( + symbol: "􀾟", + name: "pawprint.fill", + initialPosition: .third(.first), + primaryColor: .orange, + widthRatio: 0.13, + heightRatio: 0.13, + rotationDegrees: -24, + horizontalOffsetRatio: -0.14, + verticalOffsetRatio: -0.36, + symbolCountToWaitFor: 2 + ) + case .pawThird: + SymbolArtElement( + symbol: "􀾟", + name: "pawprint.fill", + initialPosition: .third(.first), + primaryColor: .teal, + widthRatio: 0.13, + heightRatio: 0.13, + rotationDegrees: 30, + horizontalOffsetRatio: -0.3, + verticalOffsetRatio: 0.26, + symbolCountToWaitFor: 2 + ) + case .pawFourth: + SymbolArtElement( + symbol: "􀾟", + name: "pawprint.fill", + initialPosition: .third(.first), + primaryColor: .blue, + widthRatio: 0.13, + heightRatio: 0.13, + rotationDegrees: -14, + horizontalOffsetRatio: -0.14, + verticalOffsetRatio: 0.44, + symbolCountToWaitFor: 2 + ) + } + } + } +} + +#Preview { + NavigationStack { + PartyAnimalsArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + PartyAnimalsPreviewView() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+RawPosition.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+RawPosition.swift deleted file mode 100644 index d93bbe4..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+RawPosition.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// PartyAnimalsArtView+RawPosition.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -extension PartyAnimalsArtView { - - enum PawPosition: String, CaseIterable, Identifiable { - case first - case second - case third - case fourth - - struct Value { - let color: Color - let rotationDegrees: CGFloat - let horizontalOffsetRatio: CGFloat - let verticalOffsetRatio: CGFloat - } - - var id: String { self.rawValue } - - var value: Value { - switch self { - case .first: - Value(color: .red, - rotationDegrees: 24, - horizontalOffsetRatio: -0.34, - verticalOffsetRatio: -0.5) - case .second: - Value(color: .orange, - rotationDegrees: -24, - horizontalOffsetRatio: -0.14, - verticalOffsetRatio: -0.36) - case .third: - Value(color: .teal, - rotationDegrees: 30, - horizontalOffsetRatio: -0.3, - verticalOffsetRatio: 0.26) - case .fourth: - Value(color: .blue, - rotationDegrees: -14, - horizontalOffsetRatio: -0.14, - verticalOffsetRatio: 0.44) - } - } - } -} - diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift index 5d6ac94..97202ab 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift @@ -9,31 +9,13 @@ import SwiftUI struct PartyAnimalsArtView: View { - @Environment(ArtWorkModel.self) var model @State private var isAnimating = false var body: some View { ZStack { - bear() - flog() - lion() - - // MARK: - 􀾟 Paw - ForEach(PawPosition.allCases) { - - AnimatableSymbolView( - name: "pawprint.fill", - initialPosition: .third(.first), - primaryColor: $0.value.color, - widthRatio: 0.13, - heightRatio: 0.13, - rotationDegrees: $0.value.rotationDegrees, - horizontalOffsetRatio: $0.value.horizontalOffsetRatio, - verticalOffsetRatio: $0.value.verticalOffsetRatio, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) + ForEach(Element.allCases) { + AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } } .navigationTitle("Party animals") @@ -50,375 +32,6 @@ struct PartyAnimalsArtView: View { } }) } - - // MARK: - Bear - private func bear() -> some View { - ZStack { - // MARK: - 􀀁 Bear ear - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .third(.third), - primaryColor: .brown, - widthRatio: 0.15, - heightRatio: 0.15, - horizontalOffsetRatio: 0.08, - verticalOffsetRatio: -0.37, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .third(.third), - primaryColor: .brown, - widthRatio: 0.15, - heightRatio: 0.15, - horizontalOffsetRatio: 0.32, - verticalOffsetRatio: -0.37, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - // MARK: - 􀩹 Bear Inside ear - AnimatableSymbolView( - name: "button.roundedtop.horizontal.fill", - initialPosition: .third(.fourth), - primaryColor: .palePink, - widthRatio: 0.06, - heightRatio: 0.06, - rotationDegrees: -20, - horizontalOffsetRatio: 0.08, - verticalOffsetRatio: -0.37, - isAnimating: isAnimating, - symbolCountToWaitFor: 0 - ) - - AnimatableSymbolView( - name: "button.roundedtop.horizontal.fill", - initialPosition: .third(.fourth), - primaryColor: .palePink, - widthRatio: 0.06, - heightRatio: 0.06, - rotationDegrees: 20, - horizontalOffsetRatio: 0.32, - verticalOffsetRatio: -0.37, - isAnimating: isAnimating, - symbolCountToWaitFor: 0 - ) - - // MARK: - 􀲟 Bear outline - AnimatableSymbolView( - name: "oval.fill", - initialPosition: .third(.fifth), - primaryColor: .brown, - widthRatio: 0.4, - heightRatio: 0.325, - horizontalOffsetRatio: 0.2, - verticalOffsetRatio: -0.2, - isAnimating: isAnimating, - symbolCountToWaitFor: 8 - ) - - // MARK: - 􀢚 Bear Eye - AnimatableSymbolView( - name: "record.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.sixth), - primaryColor: .white, - secondaryColor: .darkBrown, - widthRatio: 0.05, - heightRatio: 0.05, - horizontalOffsetRatio: 0.13, - verticalOffsetRatio: -0.23, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - AnimatableSymbolView( - name: "record.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.sixth), - primaryColor: .white, - secondaryColor: .darkBrown, - widthRatio: 0.05, - heightRatio: 0.05, - horizontalOffsetRatio: 0.27, - verticalOffsetRatio: -0.23, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - // MARK: - 􀁹 Bear mouth - AnimatableSymbolView( - name: "arrow.down.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .second(.third), - primaryColor: .black, - secondaryColor: .white, - widthRatio: 0.125, - heightRatio: 0.125, - horizontalOffsetRatio: 0.2, - verticalOffsetRatio: -0.15, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - // MARK: - 􀆼 Bear Nose - AnimatableSymbolView( - name: "moon.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.seventh), - primaryColor: .white, - secondaryColor: .red, - widthRatio: 0.04, - heightRatio: 0.04, - rotationDegrees: 170, - horizontalOffsetRatio: 0.2, - verticalOffsetRatio: -0.17, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - } - } - - // MARK: - Flog - private func flog() -> some View { - ZStack { - // MARK: - 􀀁 Flog eye outline - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .third(.third), - primaryColor: .green, - widthRatio: 0.15, - heightRatio: 0.15, - horizontalOffsetRatio: -0.32, - verticalOffsetRatio: -0.18, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .third(.third), - primaryColor: .green, - widthRatio: 0.15, - heightRatio: 0.15, - horizontalOffsetRatio: -0.08, - verticalOffsetRatio: -0.18, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - // MARK: - 􀢚 Flog Eye - AnimatableSymbolView( - name: "record.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.sixth), - primaryColor: .white, - widthRatio: 0.05, - heightRatio: 0.05, - horizontalOffsetRatio: -0.32, - verticalOffsetRatio: -0.18, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - AnimatableSymbolView( - name: "record.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.sixth), - primaryColor: .white, - widthRatio: 0.05, - heightRatio: 0.05, - horizontalOffsetRatio: -0.08, - verticalOffsetRatio: -0.18, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - // MARK: - 􀲟 Flog outline - AnimatableSymbolView( - name: "oval.fill", - initialPosition: .third(.fifth), - primaryColor: .green, - widthRatio: 0.4, - heightRatio: 0.325, - horizontalOffsetRatio: -0.2, - isAnimating: isAnimating, - symbolCountToWaitFor: 8 - ) - - // MARK: - 􀆈 Flog mouth - AnimatableSymbolView( - name: "chevron.down", - initialPosition: .second(.first), - fontWeight: .bold, - widthRatio: 0.1, - heightRatio: 0.05, - horizontalOffsetRatio: -0.2, - verticalOffsetRatio: 0.025, - isAnimating: isAnimating, - symbolCountToWaitFor: 3 - ) - } - } - - // MARK: - Lion - private func lion() -> some View { - ZStack { - - // MARK: - Lion mane - AnimatableSymbolView( - name: "seal.fill", - initialPosition: .third(.second), - primaryColor: .orange, - fontWeight: .ultraLight, - widthRatio: 0.52, - heightRatio: 0.52, - rotationDegrees: 20, - horizontalOffsetRatio: 0.2, - verticalOffsetRatio: 0.26, - isAnimating: isAnimating, - symbolCountToWaitFor: 9 - ) - - AnimatableSymbolView( - name: "seal.fill", - initialPosition: .third(.second), - primaryColor: .orange, - fontWeight: .ultraLight, - widthRatio: 0.52, - heightRatio: 0.52, - horizontalOffsetRatio: 0.2, - verticalOffsetRatio: 0.26, - isAnimating: isAnimating, - symbolCountToWaitFor: 9 - ) - - // MARK: - 􀀁 Lion ear - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .third(.third), - primaryColor: .yellow, - widthRatio: 0.12, - heightRatio: 0.12, - horizontalOffsetRatio: 0.08, - verticalOffsetRatio: 0.17, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .third(.third), - primaryColor: .yellow, - widthRatio: 0.12, - heightRatio: 0.12, - horizontalOffsetRatio: 0.32, - verticalOffsetRatio: 0.17, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - - // MARK: - 􀲟 Lion outline - AnimatableSymbolView( - name: "oval.fill", - initialPosition: .third(.fifth), - primaryColor: .yellow, - widthRatio: 0.3, - heightRatio: 0.26, - horizontalOffsetRatio: 0.2, - verticalOffsetRatio: 0.29, - isAnimating: isAnimating, - symbolCountToWaitFor: 8 - ) - - // MARK: - 􀢚 Lion Eye - AnimatableSymbolView( - name: "record.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.sixth), - primaryColor: .white, - secondaryColor: .darkBrown, - widthRatio: 0.05, - heightRatio: 0.05, - horizontalOffsetRatio: 0.13, - verticalOffsetRatio: 0.26, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - AnimatableSymbolView( - name: "record.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.sixth), - primaryColor: .white, - secondaryColor: .darkBrown, - widthRatio: 0.05, - heightRatio: 0.05, - horizontalOffsetRatio: 0.27, - verticalOffsetRatio: 0.26, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - // MARK: - Lion whiskers - AnimatableSymbolView( - name: "rays", - initialPosition: .second(.second), - primaryColor: .darkBrown, - widthRatio: 0.175, - heightRatio: 0.06, - horizontalOffsetRatio: 0.235, - verticalOffsetRatio: 0.33, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - - AnimatableSymbolView( - name: "rays", - initialPosition: .second(.second), - primaryColor: .darkBrown, - widthRatio: 0.175, - heightRatio: 0.06, - horizontalOffsetRatio: 0.165, - verticalOffsetRatio: 0.33, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - - // MARK: - 􀁹 Lion mouth - AnimatableSymbolView( - name: "arrow.down.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .second(.third), - primaryColor: .black, - secondaryColor: .white, - widthRatio: 0.125, - heightRatio: 0.11, - horizontalOffsetRatio: 0.2, - verticalOffsetRatio: 0.34, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - // MARK: - 􀆼 Lion Nose - AnimatableSymbolView( - name: "moon.circle.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.seventh), - primaryColor: .white, - secondaryColor: .darkBrown, - widthRatio: 0.04, - heightRatio: 0.04, - rotationDegrees: 170, - horizontalOffsetRatio: 0.2, - verticalOffsetRatio: 0.32, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - } - } } #Preview { diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift index 3048ecb..46aa9fb 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift @@ -8,317 +8,17 @@ import SwiftUI struct PartyAnimalsPreviewView: View { - - @Environment(ArtWorkModel.self) var model - - var body: some View { + var body: some View { ZStack { - bear() - flog() - lion() - - // MARK: - 􀾟 Paw - ForEach(PartyAnimalsArtView.PawPosition.allCases) { - - Image(systemName: "pawprint.fill") - .arrangeShape( - primaryColor: $0.value.color, - width: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), - rotationDegrees: $0.value.rotationDegrees, - horizontalOffset: model.calculatingProportionalValue(withRatio: $0.value.horizontalOffsetRatio, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: $0.value.verticalOffsetRatio, forPreview: true) - ) + ForEach(PartyAnimalsArtView.Element.allCases) { + SymbolArtPreviewView(element: $0.value) } } } - - // MARK: - Bear - private func bear() -> some View { - ZStack { - // MARK: - 􀀁 Bear ear - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .brown, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.37, forPreview: true) - ) - - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .brown, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.37, forPreview: true) - ) - - // MARK: - 􀩹 Bear Inside ear - Image(systemName: "button.roundedtop.horizontal.fill") - .arrangeShape( - primaryColor: .palePink, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - rotationDegrees: -20, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.37, forPreview: true) - ) - - Image(systemName: "button.roundedtop.horizontal.fill") - .arrangeShape( - primaryColor: .palePink, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - rotationDegrees: 20, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.37, forPreview: true) - ) - - // MARK: - 􀲟 Bear outline - Image(systemName: "oval.fill") - .arrangeShape( - primaryColor: .brown, - width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.325, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true) - ) - - // MARK: - 􀢚 Bear Eye - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.23, forPreview: true) - ) - - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.23, forPreview: true) - ) - - // MARK: - 􀁹 Bear mouth - Image(systemName: "arrow.down.circle.fill") - .arrangeShape( - primaryColor: .black, - secondaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.15, forPreview: true) - ) - - // MARK: - 􀆼 Bear Nose - Image(systemName: "moon.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .red, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - rotationDegrees: 170, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.17, forPreview: true) - ) - } - } - - // MARK: - Flog - private func flog() -> some View { - ZStack { - // MARK: - 􀀁 Flog eye outline - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .green, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) - ) - - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .green, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) - ) - - // MARK: - 􀢚 Flog Eye - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) - ) - - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.18, forPreview: true) - ) - - // MARK: - 􀲟 Flog outline - Image(systemName: "oval.fill") - .arrangeShape( - primaryColor: .green, - width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.325, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true) - ) - - // MARK: - 􀆈 Flog mouth - Image(systemName: "chevron.down") - .arrangeShape( - fontWeight: .bold, - width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.025, forPreview: true) - ) - } - } - - // MARK: - Lion - private func lion() -> some View { - ZStack { - - // MARK: - Lion mane - Image(systemName: "seal.fill") - .arrangeShape( - primaryColor: .orange, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), - rotationDegrees: 20, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) - ) - - Image(systemName: "seal.fill") - .arrangeShape( - primaryColor: .orange, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.52, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) - ) - - // MARK: - 􀀁 Lion ear - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) - ) - - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.17, forPreview: true) - ) - - // MARK: - 􀲟 Lion outline - Image(systemName: "oval.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.29, forPreview: true) - ) - - // MARK: - 􀢚 Lion Eye - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) - ) - - Image(systemName: "record.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.27, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.26, forPreview: true) - ) - - // MARK: - Lion whiskers - Image(systemName: "rays") - .arrangeShape( - primaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.175, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.235, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.33, forPreview: true) - ) - - Image(systemName: "rays") - .arrangeShape( - primaryColor: .darkBrown, - width: model.calculatingProportionalValue(withRatio: 0.175, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.165, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.33, forPreview: true) - ) - - // MARK: - 􀁹 Lion mouth - Image(systemName: "arrow.down.circle.fill") - .arrangeShape( - primaryColor: .black, - secondaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.125, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.34, forPreview: true) - ) - - // MARK: - 􀆼 Lion Nose - Image(systemName: "moon.circle.fill") - .arrangeShape( - primaryColor: .white, - secondaryColor: .darkBrown, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - rotationDegrees: 170, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.32, forPreview: true) - ) - } - } } #Preview { PartyAnimalsPreviewView() - .environment(ArtWorkModel.init(screenSize: .init(width: 4600, height: 4600))) + .environment(ArtWorkModel.preview) } From 34beaceea990cc6cdd8140425b2641daefab8970 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 15:53:27 +0900 Subject: [PATCH 072/108] Refactor Nosebleed --- .../project.pbxproj | 4 + .../Nosebleed/NosebleedArtView+Element.swift | 235 ++++++++++++++++++ .../ArtWorks/Nosebleed/NosebleedArtView.swift | 200 +-------------- .../Nosebleed/NosebleedPreviewView.swift | 153 +----------- 4 files changed, 249 insertions(+), 343 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+Element.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index a32606b..efb9790 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -39,6 +39,7 @@ 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */; }; 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */; }; 9767DF172B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF162B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift */; }; + 9767DF192B76032600457DA1 /* NosebleedArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF182B76032600457DA1 /* NosebleedArtView+Element.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -102,6 +103,7 @@ 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CrayonBoyArtView+Element.swift"; sourceTree = ""; }; 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeaceArtView+Element.swift"; sourceTree = ""; }; 9767DF162B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PartyAnimalsArtView+Element.swift"; sourceTree = ""; }; + 9767DF182B76032600457DA1 /* NosebleedArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NosebleedArtView+Element.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -406,6 +408,7 @@ isa = PBXGroup; children = ( 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */, + 9767DF182B76032600457DA1 /* NosebleedArtView+Element.swift */, 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */, ); path = Nosebleed; @@ -525,6 +528,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 9767DF192B76032600457DA1 /* NosebleedArtView+Element.swift in Sources */, 9767DF172B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift in Sources */, 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */, 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+Element.swift new file mode 100644 index 0000000..581ae64 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+Element.swift @@ -0,0 +1,235 @@ +// +// NosebleedArtView+Element.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension NosebleedArtView { + + enum Element: String, CaseIterable, Identifiable { + case outline + case nosebleedBottom + case nosebleedBottomConcealment + case mouth + case mouthConcealment + case nosebleedTop + case nosebleedTopConcealmentRight + case nosebleedTopConcealmentLeft + case eyeRight + case eyeLeft + case tissue + case tissueFrame + case nose + case noseConcealment + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .outline: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .awesomeYellow, + widthRatio: 0.65, + heightRatio: 0.65, + symbolCountToWaitFor: 3 + ) + case .nosebleedBottom: + SymbolArtElement( + symbol: "􀭧", + name: "cellularbars", + initialPosition: .third(.second), + primaryColor: .red, + fontWeight: .ultraLight, + widthRatio: 0.2, + heightRatio: 0.5, + rotationDegrees: 180, + horizontalOffsetRatio: 0.09, + verticalOffsetRatio: 0.074, + symbolCountToWaitFor: 1 + ) + case .nosebleedBottomConcealment: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.1, + heightRatio: 0.14, + horizontalOffsetRatio: 0.09, + verticalOffsetRatio: 0.15, + symbolCountToWaitFor: 2 + ) + case .mouth: + SymbolArtElement( + symbol: "􀓩", + name: "lasso", + initialPosition: .third(.fourth), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.4, + heightRatio: 0.3, + rotationDegrees: 170, + horizontalOffsetRatio: 0.01, + verticalOffsetRatio: 0.05, + symbolCountToWaitFor: 0 + ) + case .mouthConcealment: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.5, + heightRatio: 0.3, + rotationDegrees: 176, + verticalOffsetRatio: -0.03, + symbolCountToWaitFor: 2 + ) + case .nosebleedTop: + SymbolArtElement( + symbol: "􀭧", + name: "cellularbars", + initialPosition: .third(.second), + primaryColor: .red, + fontWeight: .ultraLight, + widthRatio: 0.2, + heightRatio: 0.12, + rotationDegrees: 180, + horizontalOffsetRatio: 0.033, + verticalOffsetRatio: 0.096, + symbolCountToWaitFor: 1 + ) + case .nosebleedTopConcealmentRight: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.1, + heightRatio: 0.1, + horizontalOffsetRatio: 0.09, + verticalOffsetRatio: 0.06, + symbolCountToWaitFor: 2 + ) + case .nosebleedTopConcealmentLeft: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.04, + heightRatio: 0.14, + horizontalOffsetRatio: -0.047, + verticalOffsetRatio: 0.09, + symbolCountToWaitFor: 2 + ) + case .eyeRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .black, + widthRatio: 0.06, + heightRatio: 0.06, + horizontalOffsetRatio: 0.117, + verticalOffsetRatio: -0.176, + symbolCountToWaitFor: 3 + ) + case .eyeLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .black, + widthRatio: 0.06, + heightRatio: 0.06, + horizontalOffsetRatio: -0.113, + verticalOffsetRatio: -0.17, + symbolCountToWaitFor: 3 + ) + case .tissue: + SymbolArtElement( + symbol: "􀥨", + name: "doc.plaintext.fill", + initialPosition: .third(.fifth), + primaryColor: .white, + fontWeight: .ultraLight, + widthRatio: 0.04, + heightRatio: 0.08, + rotationDegrees: 188, + horizontalOffsetRatio: -0.052, + verticalOffsetRatio: 0.083, + symbolCountToWaitFor: 6 + ) + case .tissueFrame: + SymbolArtElement( + symbol: "􀉆", + name: "doc.plaintext", + initialPosition: .third(.sixth), + primaryColor: .black, + fontWeight: .light, + widthRatio: 0.04, + heightRatio: 0.08, + rotationDegrees: 188, + horizontalOffsetRatio: -0.052, + verticalOffsetRatio: 0.083, + symbolCountToWaitFor: 6 + ) + case .nose: + SymbolArtElement( + symbol: "􀥰", + name: "triangleshape", + initialPosition: .third(.seventh), + primaryColor: .black, + fontWeight: .light, + widthRatio: 0.15, + heightRatio: 0.14, + rotationDegrees: -4, + horizontalOffsetRatio: -0.013, + verticalOffsetRatio: -0.02, + symbolCountToWaitFor: 4 + ) + case .noseConcealment: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.third), + primaryColor: .awesomeYellow, + widthRatio: 0.02, + heightRatio: 0.13, + rotationDegrees: 148, + horizontalOffsetRatio: 0.007, + verticalOffsetRatio: -0.046, + symbolCountToWaitFor: 5 + ) + } + } + + var isNosebleed: Bool { + switch self { + case .nosebleedBottom, .nosebleedTop: + true + default: + false + } + } + } +} + +#Preview { + NavigationStack { + NosebleedArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + NosebleedArtPreviewView() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift index 26c1b13..a43739c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -16,200 +16,12 @@ struct NosebleedArtView: View { var body: some View { ZStack { - - // MARK: - 􀀁 Contour - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .awesomeYellow, - widthRatio: 0.65, - heightRatio: 0.65, - isAnimating: isAnimating, - symbolCountToWaitFor: 3 - ) - - // MARK: - 􀭧 Nosebleed bottom - AnimatableSymbolView( - name: "cellularbars", - initialPosition: .third(.second), - primaryColor: .red, - fontWeight: .ultraLight, - widthRatio: 0.2, - heightRatio: 0.5, - rotationDegrees: 180, - horizontalOffsetRatio: 0.09, - verticalOffsetRatio: 0.074, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - .symbolEffect(.variableColor.hideInactiveLayers, - options: .speed(0.6).repeating, - isActive: isEffectActivated) - - // MARK: - 􀏄 Concealing part for nosebleed bottom - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .third(.third), - primaryColor: .awesomeYellow, - widthRatio: 0.1, - heightRatio: 0.14, - horizontalOffsetRatio: 0.09, - verticalOffsetRatio: 0.15, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀓩 Mouth - AnimatableSymbolView( - name: "lasso", - initialPosition: .third(.fourth), - fontWeight: .ultraLight, - widthRatio: 0.4, - heightRatio: 0.3, - rotationDegrees: 170, - horizontalOffsetRatio: 0.01, - verticalOffsetRatio: 0.05, - isAnimating: isAnimating, - symbolCountToWaitFor: 0 - ) - - // MARK: - 􀏄 Concealing part for Mouth - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .third(.third), - primaryColor: .awesomeYellow, - widthRatio: 0.5, - heightRatio: 0.3, - rotationDegrees: 176, - verticalOffsetRatio: -0.03, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀭧 Nosebleed top - AnimatableSymbolView( - name: "cellularbars", - initialPosition: .third(.second), - primaryColor: .red, - fontWeight: .ultraLight, - widthRatio: 0.2, - heightRatio: 0.12, - rotationDegrees: 180, - horizontalOffsetRatio: 0.033, - verticalOffsetRatio: 0.096, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - .symbolEffect(.variableColor.hideInactiveLayers, - options: .speed(0.6).repeating, - isActive: isEffectActivated) - - // MARK: - 􀏄 Concealing part for nosebleed top right - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .third(.third), - primaryColor: .awesomeYellow, - widthRatio: 0.1, - heightRatio: 0.1, - horizontalOffsetRatio: 0.09, - verticalOffsetRatio: 0.06, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀏄 Concealing part for nosebleed top left - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .third(.third), - primaryColor: .awesomeYellow, - widthRatio: 0.04, - heightRatio: 0.14, - horizontalOffsetRatio: -0.047, - verticalOffsetRatio: 0.09, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀀁 Right eye - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .third(.first), - widthRatio: 0.06, - heightRatio: 0.06, - horizontalOffsetRatio: 0.117, - verticalOffsetRatio: -0.176, - isAnimating: isAnimating, - symbolCountToWaitFor: 3 - ) - - // MARK: - 􀀁 Left eye - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .third(.first), - widthRatio: 0.06, - heightRatio: 0.06, - horizontalOffsetRatio: -0.113, - verticalOffsetRatio: -0.17, - isAnimating: isAnimating, - symbolCountToWaitFor: 3 - ) - - // MARK: - 􀥨 Tissue - AnimatableSymbolView( - name: "doc.plaintext.fill", - initialPosition: .third(.fifth), - primaryColor: .white, - fontWeight: .ultraLight, - widthRatio: 0.04, - heightRatio: 0.08, - rotationDegrees: 188, - horizontalOffsetRatio: -0.052, - verticalOffsetRatio: 0.083, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - - // MARK: - 􀉆 Tissue frame - AnimatableSymbolView( - name: "doc.plaintext", - initialPosition: .third(.sixth), - fontWeight: .light, - widthRatio: 0.04, - heightRatio: 0.08, - rotationDegrees: 188, - horizontalOffsetRatio: -0.052, - verticalOffsetRatio: 0.083, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - - // MARK: - 􀥰 Nose - AnimatableSymbolView( - name: "triangleshape", - initialPosition: .third(.seventh), - fontWeight: .light, - widthRatio: 0.15, - heightRatio: 0.14, - rotationDegrees: -4, - horizontalOffsetRatio: -0.013, - verticalOffsetRatio: -0.02, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - - // MARK: - 􀏄 Concealing part for nose - AnimatableSymbolView( - name: "rectangle.fill", - initialPosition: .third(.third), - primaryColor: .awesomeYellow, - widthRatio: 0.02, - heightRatio: 0.13, - rotationDegrees: 148, - horizontalOffsetRatio: 0.007, - verticalOffsetRatio: -0.046, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) + ForEach(Element.allCases) { + AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) + .symbolEffect(.variableColor.hideInactiveLayers, + options: .speed(0.6).repeating, + isActive: $0.isNosebleed ? isEffectActivated : false) + } } .navigationTitle("Nosebleed") .navigationBarTitleDisplayMode(.inline) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift index d0653b3..c2f6cd4 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift @@ -8,158 +8,13 @@ import SwiftUI struct NosebleedArtPreviewView: View { - - @Environment(ArtWorkModel.self) var model - + var body: some View { ZStack { - - // MARK: - 􀀁 Contour - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.65, forPreview: true) - ) - - // MARK: - 􀭧 Nosebleed bottom - Image(systemName: "cellularbars") - .arrangeShape( - primaryColor: .red, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - rotationDegrees: 180, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.0741, forPreview: true) - ) - - // MARK: - 􀏄 Concealing part for nosebleed bottom - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true) - ) - - // MARK: - 􀓩 Mouth - Image(systemName: "lasso") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - rotationDegrees: 170, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true) - ) - - // MARK: - 􀏄 Concealing part for Mouth - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.5, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - rotationDegrees: 176, - verticalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true) - ) - - // MARK: - 􀭧 Nosebleed top - Image(systemName: "cellularbars") - .arrangeShape( - primaryColor: .red, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.12, forPreview: true), - rotationDegrees: 180, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.033, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.096, forPreview: true) - ) - - // MARK: - 􀏄 Nosebleed top right hide - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true) - ) - - // MARK: - 􀏄 Nosebleed top left hide - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.053, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true) - ) - - // MARK: - 􀀁 Right eye - Image(systemName: "circle.fill") - .arrangeShape( - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.117, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.176, forPreview: true) - ) - - // MARK: - 􀀁 Left eye - Image(systemName: "circle.fill") - .arrangeShape( - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.113, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.17, forPreview: true) - ) - - // MARK: - 􀥨 Tissue - Image(systemName: "doc.plaintext.fill") - .arrangeShape( - primaryColor: .white, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), - rotationDegrees: 188, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true) - ) - - // MARK: - 􀉆 Tissue frame - Image(systemName: "doc.plaintext") - .arrangeShape( - fontWeight: .light, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), - rotationDegrees: 188, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.052, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.083, forPreview: true) - ) - - // MARK: - 􀥰 Nose - Image(systemName: "triangleshape") - .arrangeShape( - fontWeight: .light, - width: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - rotationDegrees: -4, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.013, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.02, forPreview: true) - ) - - // MARK: - 􀏄 Nose hide - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .awesomeYellow, - width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.13, forPreview: true), - rotationDegrees: 148, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.007, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.046, forPreview: true) - ) + ForEach(NosebleedArtView.Element.allCases) { + SymbolArtPreviewView(element: $0.value) + } } } } From b458cf89b263abd12ade5e2271c8f8dc4241d5d0 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 17:15:33 +0900 Subject: [PATCH 073/108] Import SwiftUI at WorldPeaceArtView --- .../ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift index c740c60..62b03e8 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift @@ -5,7 +5,7 @@ // Created by Lil Ossa // -import Foundation +import SwiftUI extension WorldPeaceArtView { From 383f0c73ea7f18330a0167590f9b000aeecf735b Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 19:06:33 +0900 Subject: [PATCH 074/108] Refactor I am wearing pants --- .../project.pbxproj | 20 + .../ImWearingPantsArtView+FaceElement.swift | 330 ++++++++++ ...earingPantsArtView+FinishPoseElement.swift | 368 +++++++++++ .../Element/ImWearingPantsArtView+Pose.swift | 100 +++ .../ImWearingPantsArtView.swift | 603 +----------------- .../ImWearingPantsPreviewView.swift | 452 +------------ .../ArtWorkModel+InitialSymbolRow.swift | 3 + .../Models/ArtWorkModel/ArtWorkModel.swift | 2 + 8 files changed, 843 insertions(+), 1035 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index efb9790..7dee390 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -40,6 +40,9 @@ 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */; }; 9767DF172B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF162B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift */; }; 9767DF192B76032600457DA1 /* NosebleedArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF182B76032600457DA1 /* NosebleedArtView+Element.swift */; }; + 9767DF1B2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF1A2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift */; }; + 9767DF1D2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF1C2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift */; }; + 9767DF1F2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF1E2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -104,6 +107,9 @@ 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeaceArtView+Element.swift"; sourceTree = ""; }; 9767DF162B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PartyAnimalsArtView+Element.swift"; sourceTree = ""; }; 9767DF182B76032600457DA1 /* NosebleedArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NosebleedArtView+Element.swift"; sourceTree = ""; }; + 9767DF1A2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ImWearingPantsArtView+FinishPoseElement.swift"; sourceTree = ""; }; + 9767DF1C2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ImWearingPantsArtView+Pose.swift"; sourceTree = ""; }; + 9767DF1E2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ImWearingPantsArtView+FaceElement.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -270,6 +276,16 @@ path = PartyAnimals; sourceTree = ""; }; + 9767DF202B762EF300457DA1 /* Element */ = { + isa = PBXGroup; + children = ( + 9767DF1E2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift */, + 9767DF1A2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift */, + 9767DF1C2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift */, + ); + path = Element; + sourceTree = ""; + }; 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */ = { isa = PBXGroup; children = ( @@ -427,6 +443,7 @@ isa = PBXGroup; children = ( 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */, + 9767DF202B762EF300457DA1 /* Element */, 97EF43922B72D3E2003648F5 /* ImWearingPantsPreviewView.swift */, ); path = ImWearingPants; @@ -565,12 +582,15 @@ 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */, 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, + 9767DF1D2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift in Sources */, 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */, 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */, 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */, 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */, + 9767DF1B2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift in Sources */, 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */, 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */, + 9767DF1F2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift in Sources */, 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, 97AD53222B70E3FA0034FB5D /* AnimatableSymbolView.swift in Sources */, 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift new file mode 100644 index 0000000..0bf64a1 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift @@ -0,0 +1,330 @@ +// +// ImWearingPantsArtView+FaceElement.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension ImWearingPantsArtView { + enum FaceElement: String, CaseIterable, Identifiable { + case musicFirst + case musicSecond + case faceBackground + case face + case joe + case nose + case eyebrowRight + case eyebrowLeft + case eyebrowConcealmentRight + case eyebrowConcealmentLeft + case eyeFrameRight + case eyeFrameLeft + case eyeRight + case eyeLeft + case mouthTop + case mouthBottom + case teethRight + case teethLeft + case hairTop + case hairRight + case hairLeft + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .musicFirst: + SymbolArtElement( + symbol: "􀑪", + name: "music.note", + initialPosition: .second(.first), + primaryColor: .black, + widthRatio: 0.1, + heightRatio: 0.15, + horizontalOffsetRatio: 0.35, + verticalOffsetRatio: -0.5, + symbolCountToWaitFor: 0 + ) + case .musicSecond: + SymbolArtElement( + symbol: "􀫀", + name: "music.quarternote.3", + initialPosition: .second(.second), + primaryColor: .black, + widthRatio: 0.2, + heightRatio: 0.15, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: -0.38, + symbolCountToWaitFor: 1 + ) + case .faceBackground: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .second(.third), + primaryColor: .systemBackground, + widthRatio: 0.2, + heightRatio: 0.2, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 2 + ) + case .face: + SymbolArtElement( + symbol: "􀧷", + name: "capsule.portrait.fill", + initialPosition: .second(.fourth), + primaryColor: .yellow, + fontWeight: .ultraLight, + widthRatio: 0.16, + heightRatio: 0.22, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 2 + ) + case .joe: + SymbolArtElement( + symbol: "􀧷", + name: "capsule.portrait.fill", + initialPosition: .second(.fourth), + primaryColor: .yellow, + widthRatio: 0.1, + heightRatio: 0.16, + verticalOffsetRatio: -0.35, + symbolCountToWaitFor: 2 + ) + case .nose: + SymbolArtElement( + symbol: "􀨯", + name: "nose", + initialPosition: .second(.fifth), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.045, + heightRatio: 0.06, + verticalOffsetRatio: -0.38, + symbolCountToWaitFor: 3 + ) + case .eyebrowRight: + SymbolArtElement( + symbol: "􀦭", + name: "eyebrow", + initialPosition: .second(.sixth), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.04, + heightRatio: 0.04, + horizontalOffsetRatio: 0.03, + verticalOffsetRatio: -0.41, + symbolCountToWaitFor: 4 + ) + case .eyebrowLeft: + SymbolArtElement( + symbol: "􀦭", + name: "eyebrow", + initialPosition: .second(.sixth), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.045, + heightRatio: 0.04, + flip: .horizontal, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.408, + symbolCountToWaitFor: 4 + ) + case .eyebrowConcealmentRight: + SymbolArtElement( + symbol: "􀧷", + name: "capsule.portrait.fill", + initialPosition: .second(.fourth), + primaryColor: .yellow, + widthRatio: 0.05, + heightRatio: 0.02, + rotationDegrees: -10, + horizontalOffsetRatio: -0.035, + verticalOffsetRatio: -0.396, + symbolCountToWaitFor: 5 + ) + case .eyebrowConcealmentLeft: + SymbolArtElement( + symbol: "􀧷", + name: "capsule.portrait.fill", + initialPosition: .second(.fourth), + primaryColor: .yellow, + widthRatio: 0.05, + heightRatio: 0.02, + rotationDegrees: 10, + horizontalOffsetRatio: 0.035, + verticalOffsetRatio: -0.396, + symbolCountToWaitFor: 5 + ) + case .eyeFrameRight: + SymbolArtElement( + symbol: "􀋭", + name: "eye", + initialPosition: .second(.seventh), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.04, + heightRatio: 0.02, + horizontalOffsetRatio: 0.03, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 5 + ) + case .eyeFrameLeft: + SymbolArtElement( + symbol: "􀋭", + name: "eye", + initialPosition: .second(.seventh), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.04, + heightRatio: 0.02, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 5 + ) + case .eyeRight: + SymbolArtElement( + symbol: "􀋮", + name: "eye.fill", + initialPosition: .third(.seventh), + primaryColor: .white, + widthRatio: 0.04, + heightRatio: 0.02, + horizontalOffsetRatio: 0.03, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 5 + ) + case .eyeLeft: + SymbolArtElement( + symbol: "􀋮", + name: "eye.fill", + initialPosition: .third(.seventh), + primaryColor: .white, + widthRatio: 0.04, + heightRatio: 0.02, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 5 + ) + case .mouthTop: + SymbolArtElement( + symbol: "􀦪", + name: "mouth.fill", + initialPosition: .third(.third), + primaryColor: .red, + widthRatio: 0.06, + heightRatio: 0.02, + verticalOffsetRatio: -0.32, + symbolCountToWaitFor: 6 + ) + case .mouthBottom: + SymbolArtElement( + symbol: "􀦪", + name: "mouth.fill", + initialPosition: .third(.third), + primaryColor: .red, + widthRatio: 0.06, + heightRatio: 0.02, + verticalOffsetRatio: -0.33, + symbolCountToWaitFor: 6 + ) + case .teethRight: + SymbolArtElement( + symbol: "􁒀", + name: "window.casement.closed", + initialSecondaryColor: .clear, + initialPosition: .third(.fourth), + primaryColor: .black, + secondaryColor: .white, + fontWeight: .ultraLight, + widthRatio: 0.015, + heightRatio: 0.029, + rotationDegrees: 90, + horizontalOffsetRatio: 0.013, + verticalOffsetRatio: -0.328, + symbolCountToWaitFor: 7 + ) + case .teethLeft: + SymbolArtElement( + symbol: "􁒀", + name: "window.casement.closed", + initialSecondaryColor: .clear, + initialPosition: .third(.fourth), + primaryColor: .black, + secondaryColor: .white, + fontWeight: .ultraLight, + widthRatio: 0.015, + heightRatio: 0.029, + rotationDegrees: 90, + horizontalOffsetRatio: -0.014, + verticalOffsetRatio: -0.328, + symbolCountToWaitFor: 7 + ) + case .hairTop: + SymbolArtElement( + symbol: "􀲟", + name: "oval.fill", + initialPosition: .third(.fifth), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.14, + heightRatio: 0.057, + horizontalOffsetRatio: -0.001, + verticalOffsetRatio: -0.49, + symbolCountToWaitFor: 8 + ) + case .hairRight: + SymbolArtElement( + symbol: "􀠒", + name: "drop.fill", + initialPosition: .third(.sixth), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.05, + heightRatio: 0.06, + rotationDegrees: -65, + horizontalOffsetRatio: 0.04, + verticalOffsetRatio: -0.48, + symbolCountToWaitFor: 9 + ) + case .hairLeft: + SymbolArtElement( + symbol: "􀠒", + name: "drop.fill", + initialPosition: .third(.sixth), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.05, + heightRatio: 0.1, + rotationDegrees: 95, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.47, + symbolCountToWaitFor: 9 + ) + } + } + + var isMusic: Bool { + switch self { + case .musicFirst, .musicSecond: + true + default: + false + } + } + } +} + +#Preview { + NavigationStack { + ImWearingPantsArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + ImWearingPantsPreviewView() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift new file mode 100644 index 0000000..1574cbb --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift @@ -0,0 +1,368 @@ +// +// ImWearingPantsArtView+FinishPoseElement.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension ImWearingPantsArtView { + + enum FinishPoseElement: String, CaseIterable, Identifiable { + case body + case chestShadowRight + case chestShadowLeft + case handConcealmentRight + case handConcealmentLeft + case neck + case neckShapingConcealmentRight + case neckShapingConcealmentLeft + case chestRight + case chestLeft + case armRight + case armLeft + case pants + case pantsHoleConcealment + case pantsPatternFirst + case pantsPatternSecond + case pantsPatternThird + case pantsPatternFourth + case pantsConcealmentRight + case pantsConcealmentLeft + case abdomen + case bellyButton + case nippleRight + case nippleLeft + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .body: + SymbolArtElement( + symbol: "􁗅", + name: "figure.arms.open", + initialPosition: .none, + primaryColor: .yellow, + widthRatio: 0.6, + heightRatio: 1, + symbolCountToWaitFor: 0 + ) + case .chestShadowRight: + SymbolArtElement( + symbol: "􀆹", + name: "moon", + initialPosition: .none, + primaryColor: .black.opacity(0.6), + fontWeight: .ultraLight, + widthRatio: 0.06, + heightRatio: 0.015, + rotationDegrees: -10, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: -0.125, + symbolCountToWaitFor: 0 + ) + case .chestShadowLeft: + SymbolArtElement( + symbol: "􀆹", + name: "moon", + initialPosition: .none, + primaryColor: .black.opacity(0.6), + fontWeight: .ultraLight, + widthRatio: 0.06, + heightRatio: 0.015, + rotationDegrees: -10, + flip: .horizontal, + horizontalOffsetRatio: 0.085, + verticalOffsetRatio: -0.125, + symbolCountToWaitFor: 0 + ) + case .handConcealmentRight: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .none, + primaryColor: .systemBackground, + fontWeight: .black, + widthRatio: 0.3, + heightRatio: 0.4, + horizontalOffsetRatio: -0.25, + verticalOffsetRatio: -0.1, + symbolCountToWaitFor: 0 + ) + case .handConcealmentLeft: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .none, + primaryColor: .systemBackground, + fontWeight: .black, + widthRatio: 0.3, + heightRatio: 0.4, + horizontalOffsetRatio: 0.25, + verticalOffsetRatio: -0.1, + symbolCountToWaitFor: 0 + ) + case .neck: + SymbolArtElement( + symbol: "􀊡", + name: "speaker.fill", + initialPosition: .none, + primaryColor: .yellow, + widthRatio: 0.2, + heightRatio: 0.38, + rotationDegrees: 90, + horizontalOffsetRatio: -0.005, + verticalOffsetRatio: -0.27, + symbolCountToWaitFor: 0 + ) + case .neckShapingConcealmentRight: + SymbolArtElement( + symbol: "􀂓", + name: "square.fill", + initialPosition: .none, + primaryColor: .systemBackground, + widthRatio: 0.2, + heightRatio: 0.2, + rotationDegrees: 90, + horizontalOffsetRatio: 0.14, + verticalOffsetRatio: -0.385, + symbolCountToWaitFor: 0 + ) + case .neckShapingConcealmentLeft: + SymbolArtElement( + symbol: "􀂓", + name: "square.fill", + initialPosition: .none, + primaryColor: .systemBackground, + widthRatio: 0.2, + heightRatio: 0.2, + rotationDegrees: 90, + horizontalOffsetRatio: -0.14, + verticalOffsetRatio: -0.385, + symbolCountToWaitFor: 0 + ) + case .chestRight: + SymbolArtElement( + symbol: "􀆺", + name: "moon.fill", + initialPosition: .none, + primaryColor: .yellow, + widthRatio: 0.06, + heightRatio: 0.04, + rotationDegrees: -10, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: -0.138, + symbolCountToWaitFor: 0 + ) + case .chestLeft: + SymbolArtElement( + symbol: "􀆺", + name: "moon.fill", + initialPosition: .none, + primaryColor: .yellow, + widthRatio: 0.06, + heightRatio: 0.04, + rotationDegrees: -10, + flip: .horizontal, + horizontalOffsetRatio: 0.085, + verticalOffsetRatio: -0.138, + symbolCountToWaitFor: 0 + ) + case .armRight: + SymbolArtElement( + symbol: "􀆊", + name: "chevron.right", + initialPosition: .none, + primaryColor: .yellow, + fontWeight: .black, + widthRatio: 0.2, + heightRatio: 0.3, + horizontalOffsetRatio: 0.2, + verticalOffsetRatio: -0.08, + symbolCountToWaitFor: 0 + ) + case .armLeft: + SymbolArtElement( + symbol: "􀆉", + name: "chevron.left", + initialPosition: .none, + primaryColor: .yellow, + fontWeight: .black, + widthRatio: 0.2, + heightRatio: 0.3, + horizontalOffsetRatio: -0.2, + verticalOffsetRatio: -0.08, + symbolCountToWaitFor: 0 + ) + // UnderLayer + case .pants: + SymbolArtElement( + symbol: "􁉨", + name: "parkingsign.steeringwheel", + initialPosition: .third(.first), + primaryColor: .palePink, + fontWeight: .ultraLight, + widthRatio: 0.35, + heightRatio: 0.2, + horizontalOffsetRatio: -0.07, + verticalOffsetRatio: 0.03, + symbolCountToWaitFor: 16 + ) + case .pantsHoleConcealment: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .none, + primaryColor: .palePink, + widthRatio: 0.06, + heightRatio: 0.06, + horizontalOffsetRatio: -0.01, + verticalOffsetRatio: 0.04, + symbolCountToWaitFor: 0 + ) + case .pantsPatternFirst: + SymbolArtElement( + symbol: "􁁌", + name: "fan.fill", + initialPosition: .none, + primaryColor: .white, + widthRatio: 0.04, + heightRatio: 0.04, + horizontalOffsetRatio: -0.01, + verticalOffsetRatio: 0.04, + symbolCountToWaitFor: 0 + ) + case .pantsPatternSecond: + SymbolArtElement( + symbol: "􁁌", + name: "fan.fill", + initialPosition: .none, + primaryColor: .white, + widthRatio: 0.04, + heightRatio: 0.04, + horizontalOffsetRatio: -0.08, + verticalOffsetRatio: 0.02, + symbolCountToWaitFor: 0 + ) + case .pantsPatternThird: + SymbolArtElement( + symbol: "􁁌", + name: "fan.fill", + initialPosition: .none, + primaryColor: .white, + widthRatio: 0.04, + heightRatio: 0.04, + horizontalOffsetRatio: 0.08, + verticalOffsetRatio: 0.02, + symbolCountToWaitFor: 0 + ) + case .pantsPatternFourth: + SymbolArtElement( + symbol: "􁁌", + name: "fan.fill", + initialPosition: .none, + primaryColor: .white, + widthRatio: 0.04, + heightRatio: 0.04, + verticalOffsetRatio: 0.099, + symbolCountToWaitFor: 0 + ) + case .pantsConcealmentRight: + SymbolArtElement( + symbol: "􀲟", + name: "oval.fill", + initialPosition: .none, + primaryColor: .yellow, + widthRatio: 0.11, + heightRatio: 0.03, + rotationDegrees: 45, + horizontalOffsetRatio: -0.07, + verticalOffsetRatio: 0.09, + symbolCountToWaitFor: 0 + ) + case .pantsConcealmentLeft: + SymbolArtElement( + symbol: "􀲟", + name: "oval.fill", + initialPosition: .none, + primaryColor: .yellow, + widthRatio: 0.11, + heightRatio: 0.03, + rotationDegrees: -47, + horizontalOffsetRatio: 0.06, + verticalOffsetRatio: 0.089, + symbolCountToWaitFor: 0 + ) + case .abdomen: + SymbolArtElement( + symbol: "􁎘", + name: "visionpro.fill", + initialPosition: .none, + primaryColor: .yellow, + fontWeight: .ultraLight, + widthRatio: 0.25, + heightRatio: 0.15, + rotationDegrees: 180, + verticalOffsetRatio: -0.045, + symbolCountToWaitFor: 0 + ) + case .bellyButton: + SymbolArtElement( + symbol: "􀥤", + name: "poweron", + initialPosition: .none, + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.02, + heightRatio: 0.002, + rotationDegrees: 180, + symbolCountToWaitFor: 0 + ) + case .nippleRight: + SymbolArtElement( + symbol: "􀕩", + name: "smallcircle.filled.circle.fill", + initialPosition: .none, + primaryColor: .yellow, + secondaryColor: .brown, + fontWeight: .ultraLight, + widthRatio: 0.02, + heightRatio: 0.01, + rotationDegrees: 15, + horizontalOffsetRatio: 0.09, + verticalOffsetRatio: -0.138, + symbolCountToWaitFor: 0 + ) + case .nippleLeft: + SymbolArtElement( + symbol: "􀕩", + name: "smallcircle.filled.circle.fill", + initialPosition: .none, + primaryColor: .yellow, + secondaryColor: .brown, + fontWeight: .ultraLight, + widthRatio: 0.02, + heightRatio: 0.01, + rotationDegrees: -15, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: -0.14, + symbolCountToWaitFor: 0 + ) + } + } + } +} + +#Preview { + NavigationStack { + ImWearingPantsArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + ImWearingPantsPreviewView() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift new file mode 100644 index 0000000..9903937 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift @@ -0,0 +1,100 @@ +// +// ImWearingPantsArtView+Pose.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension ImWearingPantsArtView { + + enum Pose: String { + case walk = "figure.walk" + case discSport = "figure.disc.sports" + case martialArts = "figure.martial.arts" + case strengthTraining = "figure.strengthtraining.traditional" + case football = "figure.australian.football" + case intervalTraining = "figure.highintensity.intervaltraining" + case finish = "" + + var element: SymbolArtElement { + SymbolArtElement( + symbol: symbol, + name: rawValue, + initialPosition: .third(.second), + primaryColor: .yellow, + widthRatio: 0.6, + heightRatio: 1, + symbolCountToWaitFor: 10 + ) + } + + var symbol: String { + switch self { + case .walk: + "􀝢" + case .discSport: + "􁔣" + case .martialArts: + "􁔳" + case .strengthTraining: + "􁐃" + case .football: + "􁒒" + case .intervalTraining: + "􁌎" + case .finish: + "" + } + } + + var next: Pose { + switch self { + case .walk: + .discSport + case .discSport: + .martialArts + case .martialArts: + .strengthTraining + case .strengthTraining: + .football + case .football: + .intervalTraining + case .intervalTraining: + .finish + case .finish: + .finish + } + } + + var isFinished: Bool { + self == .finish + } + + var offsetXRatio: CGFloat { + switch self { + case .walk, .discSport, .strengthTraining, .finish: + 0 + case .martialArts: + 0.04 + case .football: + -0.1 + case .intervalTraining: + -0.01 + } + } + } +} + +#Preview { + NavigationStack { + ImWearingPantsArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + ImWearingPantsPreviewView() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index aaa690c..d07557f 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -9,48 +9,6 @@ import SwiftUI struct ImWearingPantsArtView: View { - enum Pose: String { - case walk = "figure.walk" - case discSport = "figure.disc.sports" - case martialArts = "figure.martial.arts" - case strengthTraining = "figure.strengthtraining.traditional" - case football = "figure.australian.football" - case intervalTraining = "figure.highintensity.intervaltraining" - case finish = "" - - var next: Pose { - switch self { - case .walk: - .discSport - case .discSport: - .martialArts - case .martialArts: - .strengthTraining - case .strengthTraining: - .football - case .football: - .intervalTraining - case .intervalTraining: - .finish - case .finish: - .finish - } - } - - var offsetXRatio: CGFloat { - switch self { - case .walk, .discSport, .strengthTraining, .finish: - 0 - case .martialArts: - 0.04 - case .football: - -0.1 - case .intervalTraining: - -0.01 - } - } - } - @Environment(ArtWorkModel.self) var model @State private var isAnimating = false @State private var isChangingPose = false @@ -64,559 +22,24 @@ struct ImWearingPantsArtView: View { ZStack { // MARK: - Current pose - AnimatableSymbolView( - name: currentPose.rawValue, - initialPosition: .third(.second), - primaryColor: .yellow, - widthRatio: 0.6, - heightRatio: 1, - isAnimating: isAnimating, - symbolCountToWaitFor: 10 - ) - .contentTransition(isChangingPose ? .symbolEffect(.replace) : .identity) - .offset(x: model.calculatingProportionalValue(withRatio: currentPose.offsetXRatio)) - - // MARK: - 􁉨 Pants - AnimatableSymbolView( - name: "parkingsign.steeringwheel", - initialPosition: .third(.first), - primaryColor: .palePink, - fontWeight: .ultraLight, - widthRatio: 0.35, - heightRatio: 0.2, - horizontalOffsetRatio: -0.07, - verticalOffsetRatio: 0.03, - isAnimating: isAnimating, - symbolCountToWaitFor: 16 - ) - .zIndex(0.1) + AnimatableSymbolView(element: currentPose.element, isAnimating: isAnimating) + .contentTransition(isChangingPose ? .symbolEffect(.replace) : .identity) + .offset(x: model.calculatingProportionalValue(withRatio: currentPose.offsetXRatio)) - if currentPose == .finish { + ForEach(FinishPoseElement.allCases) { - Group { - - // MARK: - 􁗅 Pose - Image(systemName: "figure.arms.open") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.6), - height: model.calculatingProportionalValue(withRatio: 1) - ) - - // MARK: - 􀆹 Chest shadow - Image(systemName: "moon") - .arrangeShape( - primaryColor: .black.opacity(0.6), - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.015), - rotationDegrees: -10, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.125) - ) - - Image(systemName: "moon") - .arrangeShape( - primaryColor: .black.opacity(0.6), - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.015), - rotationDegrees: -10, - flip: .horizontal, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.085), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.125) - ) - - // MARK: - 􀏄 Parts for shaping - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .systemBackground, - fontWeight: .black, - width: model.calculatingProportionalValue(withRatio: 0.3), - height: model.calculatingProportionalValue(withRatio: 0.4), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.25), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.1) - ) - - Image(systemName: "rectangle.fill") - .arrangeShape( - primaryColor: .systemBackground, - fontWeight: .black, - width: model.calculatingProportionalValue(withRatio: 0.3), - height: model.calculatingProportionalValue(withRatio: 0.4), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.25), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.1) - ) - - // MARK: - 􀊡 Neck - Image(systemName: "speaker.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.38), - rotationDegrees: 90, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.005), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.27) - ) - - // MARK: - 􀂓 Parts for shaping - Image(systemName: "square.fill") - .arrangeShape( - primaryColor: .systemBackground, - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.2), - rotationDegrees: 90, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.14), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.385) - ) - - Image(systemName: "square.fill") - .arrangeShape( - primaryColor: .systemBackground, - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.2), - rotationDegrees: 90, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.14), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.385) - ) - - // MARK: - 􀆺 Chest - Image(systemName: "moon.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.04), - rotationDegrees: -10, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.138) - ) - - Image(systemName: "moon.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.04), - rotationDegrees: -10, - flip: .horizontal, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.085), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.138) - ) - - // MARK: - 􀆉 Left arm - Image(systemName: "chevron.left") - .arrangeShape( - primaryColor: .yellow, - fontWeight: .black, - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.3), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.08) - ) - - // MARK: - 􀆊 Right artm - Image(systemName: "chevron.right") - .arrangeShape( - primaryColor: .yellow, - fontWeight: .black, - width: model.calculatingProportionalValue(withRatio: 0.2), - height: model.calculatingProportionalValue(withRatio: 0.3), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.08) - ) + if $0 == .pants { + AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) + } else if currentPose.isFinished { + SymbolArtPreviewView(forPreview: false, element: $0.value) + .transition(.symbolEffect(.appear)) } - .transition(.symbolEffect(.appear)) - - Group { - // MARK: - 􀀁 Pant center hole cover - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .palePink, - width: model.calculatingProportionalValue(withRatio: 0.06), - height: model.calculatingProportionalValue(withRatio: 0.06), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.01), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.04) - ) - - // MARK: - 􁁌 Patterns on pants - Image(systemName: "fan.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.04), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.01), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.04) - ) - - Image(systemName: "fan.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.04), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.02) - ) - - Image(systemName: "fan.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.04), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.02) - ) - - Image(systemName: "fan.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04), - height: model.calculatingProportionalValue(withRatio: 0.04), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.099) - ) - - // MARK: - 􀲟 Concealing part for pants - Image(systemName: "oval.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.11), - height: model.calculatingProportionalValue(withRatio: 0.03), - rotationDegrees: 45, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.07), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.09) - ) - - Image(systemName: "oval.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.11), - height: model.calculatingProportionalValue(withRatio: 0.03), - rotationDegrees: -47, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.06), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.089) - ) - - // MARK: - 􁎘 Abdomen - Image(systemName: "visionpro.fill") - .arrangeShape( - primaryColor: .yellow, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.25), - height: model.calculatingProportionalValue(withRatio: 0.15), - rotationDegrees: 180, - verticalOffset: model.calculatingProportionalValue(withRatio: -0.045) - ) - - // MARK: - 􀥤 Belly button - Image(systemName: "poweron") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.02), - height: model.calculatingProportionalValue(withRatio: 0.002), - rotationDegrees: 180 - ) - - // MARK: - 􀕩 Niple - Image(systemName: "smallcircle.filled.circle.fill") - .arrangeShape( - primaryColor: .yellow, - secondaryColor: .brown, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.02), - height: model.calculatingProportionalValue(withRatio: 0.01), - rotationDegrees: 15, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.138) - ) - - Image(systemName: "smallcircle.filled.circle.fill") - .arrangeShape( - primaryColor: .yellow, - secondaryColor: .brown, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.02), - height: model.calculatingProportionalValue(withRatio: 0.01), - rotationDegrees: -15, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.14) - ) - } - .zIndex(0.2) - .transition(.symbolEffect(.appear)) } - // MARK: - 􀑪 Music - AnimatableSymbolView( - name: "music.note", - initialPosition: .second(.first), - widthRatio: 0.1, - heightRatio: 0.15, - horizontalOffsetRatio: 0.35, - verticalOffsetRatio: -0.5, - isAnimating: isAnimating, - symbolCountToWaitFor: 0 - ) - .symbolEffect(.bounce, value: musicCount) - - // MARK: - 􀫀 Music 3 - AnimatableSymbolView( - name: "music.quarternote.3", - initialPosition: .second(.second), - widthRatio: 0.2, - heightRatio: 0.15, - horizontalOffsetRatio: -0.34, - verticalOffsetRatio: -0.38, - isAnimating: isAnimating, - symbolCountToWaitFor: 1 - ) - .symbolEffect(.bounce, value: musicCount) - - // MARK: - 􀀁 Face background - AnimatableSymbolView( - name: "circle.fill", - initialPosition: .second(.third), - primaryColor: .systemBackground, - widthRatio: 0.2, - heightRatio: 0.2, - verticalOffsetRatio: -0.4, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀧷 Contour - AnimatableSymbolView( - name: "capsule.portrait.fill", - initialPosition: .second(.fourth), - primaryColor: .yellow, - fontWeight: .ultraLight, - widthRatio: 0.16, - heightRatio: 0.22, - verticalOffsetRatio: -0.4, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀧷 Contour bottom - AnimatableSymbolView( - name: "capsule.portrait.fill", - initialPosition: .second(.fourth), - primaryColor: .yellow, - widthRatio: 0.1, - heightRatio: 0.16, - verticalOffsetRatio: -0.35, - isAnimating: isAnimating, - symbolCountToWaitFor: 2 - ) - - // MARK: - 􀨯 nose - AnimatableSymbolView( - name: "nose", - initialPosition: .second(.fifth), - fontWeight: .ultraLight, - widthRatio: 0.045, - heightRatio: 0.06, - verticalOffsetRatio: -0.38, - isAnimating: isAnimating, - symbolCountToWaitFor: 3 - ) - - // MARK: - 􀦭 Right eyebrow - AnimatableSymbolView( - name: "eyebrow", - initialPosition: .second(.sixth), - fontWeight: .ultraLight, - widthRatio: 0.04, - heightRatio: 0.04, - horizontalOffsetRatio: 0.03, - verticalOffsetRatio: -0.41, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - - // MARK: - 􀦭 Left eyebrow - AnimatableSymbolView( - name: "eyebrow", - initialPosition: .second(.sixth), - fontWeight: .ultraLight, - widthRatio: 0.045, - heightRatio: 0.04, - flip: .horizontal, - horizontalOffsetRatio: -0.03, - verticalOffsetRatio: -0.408, - isAnimating: isAnimating, - symbolCountToWaitFor: 4 - ) - - // MARK: - 􀧷 Concealing part for eyebrow - AnimatableSymbolView( - name: "capsule.portrait.fill", - initialPosition: .second(.fourth), - primaryColor: .yellow, - widthRatio: 0.05, - heightRatio: 0.02, - rotationDegrees: -10, - horizontalOffsetRatio: -0.035, - verticalOffsetRatio: -0.396, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - AnimatableSymbolView( - name: "capsule.portrait.fill", - initialPosition: .second(.fourth), - primaryColor: .yellow, - widthRatio: 0.05, - heightRatio: 0.02, - rotationDegrees: 10, - horizontalOffsetRatio: 0.035, - verticalOffsetRatio: -0.396, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - // MARK: - 􀋭 Right eye - AnimatableSymbolView( - name: "eye", - initialPosition: .second(.seventh), - fontWeight: .ultraLight, - widthRatio: 0.04, - heightRatio: 0.02, - horizontalOffsetRatio: 0.03, - verticalOffsetRatio: -0.4, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - // MARK: - 􀋭 Left eye - AnimatableSymbolView( - name: "eye", - initialPosition: .second(.seventh), - fontWeight: .ultraLight, - widthRatio: 0.04, - heightRatio: 0.02, - horizontalOffsetRatio: -0.03, - verticalOffsetRatio: -0.4, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - // MARK: - 􀋮 Right eye.fill - AnimatableSymbolView( - name: "eye.fill", - initialPosition: .third(.seventh), - primaryColor: .white, - widthRatio: 0.04, - heightRatio: 0.02, - horizontalOffsetRatio: 0.03, - verticalOffsetRatio: -0.4, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - // MARK: - 􀋮 Left eye.fill - AnimatableSymbolView( - name: "eye.fill", - initialPosition: .third(.seventh), - primaryColor: .white, - widthRatio: 0.04, - heightRatio: 0.02, - horizontalOffsetRatio: -0.03, - verticalOffsetRatio: -0.4, - isAnimating: isAnimating, - symbolCountToWaitFor: 5 - ) - - // MARK: - 􀦪 Mouth - AnimatableSymbolView( - name: "mouth.fill", - initialPosition: .third(.third), - primaryColor: .red, - widthRatio: 0.06, - heightRatio: 0.02, - verticalOffsetRatio: -0.32, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - - AnimatableSymbolView( - name: "mouth.fill", - initialPosition: .third(.third), - primaryColor: .red, - widthRatio: 0.06, - heightRatio: 0.02, - verticalOffsetRatio: -0.33, - isAnimating: isAnimating, - symbolCountToWaitFor: 6 - ) - - // MARK: - 􁒀 Teeth - AnimatableSymbolView( - name: "window.casement.closed", - initialSecondaryColor: .clear, - initialPosition: .third(.fourth), - secondaryColor: .white, - fontWeight: .ultraLight, - widthRatio: 0.015, - heightRatio: 0.029, - rotationDegrees: 90, - horizontalOffsetRatio: 0.013, - verticalOffsetRatio: -0.328, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - AnimatableSymbolView( - name: "window.casement.closed", - initialSecondaryColor: .clear, - initialPosition: .third(.fourth), - secondaryColor: .white, - fontWeight: .ultraLight, - widthRatio: 0.015, - heightRatio: 0.029, - rotationDegrees: 90, - horizontalOffsetRatio: -0.014, - verticalOffsetRatio: -0.328, - isAnimating: isAnimating, - symbolCountToWaitFor: 7 - ) - - // MARK: - 􀲟 Hair - AnimatableSymbolView( - name: "oval.fill", - initialPosition: .third(.fifth), - fontWeight: .ultraLight, - widthRatio: 0.14, - heightRatio: 0.057, - horizontalOffsetRatio: -0.001, - verticalOffsetRatio: -0.49, - isAnimating: isAnimating, - symbolCountToWaitFor: 8 - ) - - // MARK: - 􀠒 Hair - AnimatableSymbolView( - name: "drop.fill", - initialPosition: .third(.sixth), - fontWeight: .ultraLight, - widthRatio: 0.05, - heightRatio: 0.06, - rotationDegrees: -65, - horizontalOffsetRatio: 0.04, - verticalOffsetRatio: -0.48, - isAnimating: isAnimating, - symbolCountToWaitFor: 9 - ) - - AnimatableSymbolView( - name: "drop.fill", - initialPosition: .third(.sixth), - fontWeight: .ultraLight, - widthRatio: 0.05, - heightRatio: 0.1, - rotationDegrees: 95, - horizontalOffsetRatio: -0.03, - verticalOffsetRatio: -0.47, - isAnimating: isAnimating, - symbolCountToWaitFor: 9 - ) + ForEach(FaceElement.allCases) { + AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) + .symbolEffect(.bounce, value: $0.isMusic ? musicCount : 0) + } } .navigationTitle("I'm wearing pants") .navigationBarTitleDisplayMode(.inline) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift index 61d1255..644fa7f 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift @@ -8,454 +8,16 @@ import SwiftUI struct ImWearingPantsPreviewView: View { - - @Environment(ArtWorkModel.self) var model - - var body: some View { + var body: some View { ZStack { + ForEach(ImWearingPantsArtView.FinishPoseElement.allCases) { + SymbolArtPreviewView(element: $0.value) + } - // MARK: - 􀑪 Music - Image(systemName: "music.note") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.35, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.5, forPreview: true)) - - // MARK: - 􀫀 Music 3 - Image(systemName: "music.quarternote.3") - .resizable() - .foregroundStyle(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.34, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.38, forPreview: true)) - - // MARK: - 􁗅 Pose - Image(systemName: "figure.arms.open") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.6, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 1, forPreview: true)) - - // MARK: - 􀆹 Chest shadow - Image(systemName: "moon") - .arrangeShape( - primaryColor: .black.opacity(0.6), - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), - rotationDegrees: -10, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true) - ) - - Image(systemName: "moon") - .arrangeShape( - primaryColor: .black.opacity(0.6), - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), - rotationDegrees: -10, - flip: .horizontal, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.085, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.125, forPreview: true) - ) - - // MARK: - 􀏄 Parts for shaping - Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(Color.systemBackground) - .fontWeight(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.25, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true)) - - Image(systemName: "rectangle.fill") - .resizable() - .foregroundStyle(Color.systemBackground) - .fontWeight(.black) - .frame(width: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.4, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.1, forPreview: true)) - - // MARK: - 􀊡 Neck - Image(systemName: "speaker.fill") - .resizable() - .foregroundStyle(.yellow) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.38, forPreview: true)) - .rotationEffect(.degrees(90)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.005, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.27, forPreview: true)) - - // MARK: - 􀂓 Parts for shaping - Image(systemName: "square.fill") - .resizable() - .foregroundStyle(Color.systemBackground) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.385, forPreview: true)) - - Image(systemName: "square.fill") - .resizable() - .foregroundStyle(Color.systemBackground) - .frame(width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true)) - .offset(x: model.calculatingProportionalValue(withRatio: -0.14, forPreview: true), - y: model.calculatingProportionalValue(withRatio: -0.385, forPreview: true)) - - // MARK: - 􀆺 Chest - Image(systemName: "moon.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - rotationDegrees: -10, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true) - ) - - Image(systemName: "moon.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - rotationDegrees: -10, - flip: .horizontal, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.085, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true) - ) - - // MARK: - 􀆉 Left arm - Image(systemName: "chevron.left") - .arrangeShape( - primaryColor: .yellow, - fontWeight: .black, - width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true) - ) - - // MARK: - 􀆊 Right artm - Image(systemName: "chevron.right") - .arrangeShape( - primaryColor: .yellow, - fontWeight: .black, - width: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.3, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true) - ) - - // MARK: - 􁉨 Pants - Image(systemName: "parkingsign.steeringwheel") - .arrangeShape( - primaryColor: .palePink, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.35, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.2, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true) - ) - - // MARK: - 􀀁 Pant center hole cover - Image(systemName: "circle.fill") - .arrangeShape( - primaryColor: .palePink, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true) - ) - - // MARK: - 􁁌 Patterns on pants - Image(systemName: "fan.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.01, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true) - ) - - Image(systemName: "fan.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true) - ) - - Image(systemName: "fan.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.08, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true) - ) - - Image(systemName: "fan.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.099, forPreview: true) - ) - - // MARK: - 􀲟 Concealing part for pants - Image(systemName: "oval.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - rotationDegrees: 45, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.07, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true) - ) - - Image(systemName: "oval.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.11, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - rotationDegrees: -47, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: 0.089, forPreview: true) - ) - - // MARK: - 􁎘 Abdomen - Image(systemName: "visionpro.fill") - .arrangeShape( - primaryColor: .yellow, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.25, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.15, forPreview: true), - rotationDegrees: 180, - verticalOffset: model.calculatingProportionalValue(withRatio: -0.045, forPreview: true) - ) - - // MARK: - 􀥤 Belly button - Image(systemName: "poweron") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.002, forPreview: true), - rotationDegrees: 180 - ) - - // MARK: - 􀕩 Niple - Image(systemName: "smallcircle.filled.circle.fill") - .arrangeShape( - primaryColor: .yellow, - secondaryColor: .brown, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - rotationDegrees: 15, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.09, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.138, forPreview: true) - ) - - Image(systemName: "smallcircle.filled.circle.fill") - .arrangeShape( - primaryColor: .yellow, - secondaryColor: .brown, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.01, forPreview: true), - rotationDegrees: -15, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.09, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.14, forPreview: true) - ) - - // MARK: - 􀧷 Contour - Image(systemName: "capsule.portrait.fill") - .arrangeShape( - primaryColor: .yellow, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.22, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) - ) - - Image(systemName: "capsule.portrait.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.16, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.35, forPreview: true) - ) - - // MARK: - 􀨯 Nose - Image(systemName: "nose") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.045, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.38, forPreview: true) - ) - - // MARK: - 􀦭 Eyebrow - Image(systemName: "eyebrow") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - rotationDegrees: 10, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.41, forPreview: true) - ) - - Image(systemName: "eyebrow") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.045, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - flip: .horizontal, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.408, forPreview: true) - ) - - // MARK: - 􀧷 Concealing part for eyebrow - Image(systemName: "capsule.portrait.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - rotationDegrees: -10, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.035, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.396, forPreview: true) - ) - - Image(systemName: "capsule.portrait.fill") - .arrangeShape( - primaryColor: .yellow, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - rotationDegrees: 10, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.035, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.396, forPreview: true) - ) - - // MARK: - 􀋭 Eye frame - Image(systemName: "eye") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) - ) - - Image(systemName: "eye") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) - ) - - // MARK: - 􀋮 Eye - Image(systemName: "eye.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.03, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) - ) - - Image(systemName: "eye.fill") - .arrangeShape( - primaryColor: .white, - width: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.4, forPreview: true) - ) - - // MARK: - 􀦪 Mouth - Image(systemName: "mouth.fill") - .arrangeShape( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.32, forPreview: true) - ) - - Image(systemName: "mouth.fill") - .arrangeShape( - primaryColor: .red, - width: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.02, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.33, forPreview: true) - ) - - // MARK: - 􁒀 Teeth - Image(systemName: "window.casement.closed") - .arrangeShape( - primaryColor: .black, - secondaryColor: .white, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.029, forPreview: true), - rotationDegrees: 90, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.013, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.328, forPreview: true) - ) - - Image(systemName: "window.casement.closed") - .arrangeShape( - primaryColor: .black, - secondaryColor: .white, - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.015, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.029, forPreview: true), - rotationDegrees: 90, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.014, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.328, forPreview: true) - ) - - // MARK: - 􀲟 Hair - Image(systemName: "oval.fill") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.14, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.057, forPreview: true), - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.001, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.49, forPreview: true) - ) - - // MARK: - 􀠒 Off-center part hair style - Image(systemName: "drop.fill") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.06, forPreview: true), - rotationDegrees: -65, - horizontalOffset: model.calculatingProportionalValue(withRatio: 0.04, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.48, forPreview: true) - ) - - Image(systemName: "drop.fill") - .arrangeShape( - fontWeight: .ultraLight, - width: model.calculatingProportionalValue(withRatio: 0.05, forPreview: true), - height: model.calculatingProportionalValue(withRatio: 0.1, forPreview: true), - rotationDegrees: 95, - horizontalOffset: model.calculatingProportionalValue(withRatio: -0.03, forPreview: true), - verticalOffset: model.calculatingProportionalValue(withRatio: -0.47, forPreview: true) - ) + ForEach(ImWearingPantsArtView.FaceElement.allCases) { + SymbolArtPreviewView(element: $0.value) + } } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift index 020da5e..dcaea57 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift @@ -11,6 +11,7 @@ import SwiftUI extension ArtWorkModel { enum InitialSymbolRow { + case none case first(InitialSymbolColumn) case second(InitialSymbolColumn) case third(InitialSymbolColumn) @@ -46,6 +47,8 @@ extension ArtWorkModel { var offsetYRatio: CGFloat { switch self { + case .none: + 0 case .first: 0.63 case .second: diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift index 426dce1..6d0a069 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift @@ -44,6 +44,8 @@ class ArtWorkModel { func calculatingInitialOffsetX(forPosition symbolRow: InitialSymbolRow) -> CGFloat { let ratio: CGFloat switch symbolRow { + case .none: + ratio = 0 case let .first(symbolColumn): ratio = symbolColumn.offsetXRatio case let .second(symbolColumn): From ffdb54d0a5a789167873ccecb00fa337af48ddac Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 19:06:53 +0900 Subject: [PATCH 075/108] Fix AfroBoyArt --- .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift index 6702776..965ad47 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -14,18 +14,7 @@ struct AfroBoyArtView: View { var body: some View { ZStack { ForEach(Element.allCases) { - AnimatableSymbolView( - name: $0.value.name, - initialPosition: $0.value.initialPosition, - primaryColor: $0.value.primaryColor, - secondaryColor: $0.value.secondaryColor, - widthRatio: $0.value.widthRatio, - heightRatio: $0.value.heightRatio, - horizontalOffsetRatio: $0.value.horizontalOffsetRatio, - verticalOffsetRatio: $0.value.verticalOffsetRatio, - isAnimating: isAnimating, - symbolCountToWaitFor: $0.value.symbolCountToWaitFor - ) + AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } } .navigationTitle("Afro boy") From cc78ce5e92daa0eab39b68abd93fc0e613e81f02 Mon Sep 17 00:00:00 2001 From: littleossa Date: Fri, 9 Feb 2024 19:11:58 +0900 Subject: [PATCH 076/108] Rename to shouldResizeForCoverImage --- .../project.pbxproj | 8 +++---- .../ArtWorks/AfroBoy/AfroBoyPreviewView.swift | 2 +- .../CrayonBoy/CrayonBoyPreviewView.swift | 2 +- .../ImWearingPantsArtView.swift | 2 +- .../ImWearingPantsPreviewView.swift | 4 ++-- .../Magician/MagicianPreviewView.swift | 2 +- .../Nosebleed/NosebleedPreviewView.swift | 2 +- .../PartyAnimalsPreviewView.swift | 2 +- .../WorldPeace/WorldPeacePreviewView.swift | 2 +- ...wView.swift => SymbolArtDisplayView.swift} | 22 +++++++++---------- 10 files changed, 24 insertions(+), 24 deletions(-) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/{SymbolArtPreviewView.swift => SymbolArtDisplayView.swift} (69%) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 7dee390..c8e9773 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -34,7 +34,7 @@ 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */; }; 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */; }; 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */; }; - 9767DF0F2B75DFB400457DA1 /* SymbolArtPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */; }; + 9767DF0F2B75DFB400457DA1 /* SymbolArtDisplayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0E2B75DFB400457DA1 /* SymbolArtDisplayView.swift */; }; 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */; }; 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */; }; 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */; }; @@ -101,7 +101,7 @@ 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsArtView.swift; sourceTree = ""; }; 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtElement.swift; sourceTree = ""; }; 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AfroBoyArtView+Element.swift"; sourceTree = ""; }; - 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtPreviewView.swift; sourceTree = ""; }; + 9767DF0E2B75DFB400457DA1 /* SymbolArtDisplayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtDisplayView.swift; sourceTree = ""; }; 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MagicianArtView+Element.swift"; sourceTree = ""; }; 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CrayonBoyArtView+Element.swift"; sourceTree = ""; }; 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeaceArtView+Element.swift"; sourceTree = ""; }; @@ -355,7 +355,7 @@ isa = PBXGroup; children = ( 97AD53212B70E3FA0034FB5D /* AnimatableSymbolView.swift */, - 9767DF0E2B75DFB400457DA1 /* SymbolArtPreviewView.swift */, + 9767DF0E2B75DFB400457DA1 /* SymbolArtDisplayView.swift */, 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */, ); path = AnimatableSymbolView; @@ -600,7 +600,7 @@ 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */, 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */, - 9767DF0F2B75DFB400457DA1 /* SymbolArtPreviewView.swift in Sources */, + 9767DF0F2B75DFB400457DA1 /* SymbolArtDisplayView.swift in Sources */, 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift index 3b8ac1d..055179e 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift @@ -12,7 +12,7 @@ struct AfroBoyPreviewView: View { var body: some View { ZStack { ForEach(AfroBoyArtView.Element.allCases) { - SymbolArtPreviewView(element: $0.value) + SymbolArtDisplayView(element: $0.value) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift index edb1c85..4c2828b 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift @@ -12,7 +12,7 @@ struct CrayonBoyPreviewView: View { var body: some View { ZStack { ForEach(CrayonBoyArtView.Element.allCases) { - SymbolArtPreviewView(element: $0.value) + SymbolArtDisplayView(element: $0.value) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index d07557f..9c8aa7d 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -31,7 +31,7 @@ struct ImWearingPantsArtView: View { if $0 == .pants { AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } else if currentPose.isFinished { - SymbolArtPreviewView(forPreview: false, element: $0.value) + SymbolArtDisplayView(shouldResizeForCoverImage: false, element: $0.value) .transition(.symbolEffect(.appear)) } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift index 644fa7f..e5a0a92 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift @@ -12,11 +12,11 @@ struct ImWearingPantsPreviewView: View { var body: some View { ZStack { ForEach(ImWearingPantsArtView.FinishPoseElement.allCases) { - SymbolArtPreviewView(element: $0.value) + SymbolArtDisplayView(element: $0.value) } ForEach(ImWearingPantsArtView.FaceElement.allCases) { - SymbolArtPreviewView(element: $0.value) + SymbolArtDisplayView(element: $0.value) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift index 21c947f..9f8495a 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift @@ -12,7 +12,7 @@ struct MagicianPreviewView: View { var body: some View { ZStack { ForEach(MagicianArtView.Element.allCases) { - SymbolArtPreviewView(element: $0.value) + SymbolArtDisplayView(element: $0.value) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift index c2f6cd4..7ea08ac 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift @@ -13,7 +13,7 @@ struct NosebleedArtPreviewView: View { ZStack { ForEach(NosebleedArtView.Element.allCases) { - SymbolArtPreviewView(element: $0.value) + SymbolArtDisplayView(element: $0.value) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift index 46aa9fb..c985af3 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift @@ -12,7 +12,7 @@ struct PartyAnimalsPreviewView: View { var body: some View { ZStack { ForEach(PartyAnimalsArtView.Element.allCases) { - SymbolArtPreviewView(element: $0.value) + SymbolArtDisplayView(element: $0.value) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift index e446d90..d4df211 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift @@ -13,7 +13,7 @@ struct WorldPeacePreviewView: View { ZStack { ForEach(WorldPeaceArtView.Element.allCases) { - SymbolArtPreviewView(element: $0.value) + SymbolArtDisplayView(element: $0.value) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift similarity index 69% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtPreviewView.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift index 08f74d1..eb1853e 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtPreviewView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift @@ -7,14 +7,14 @@ import SwiftUI -struct SymbolArtPreviewView: View { +struct SymbolArtDisplayView: View { @Environment(ArtWorkModel.self) var model - let forPreview: Bool + let shouldResizeForCoverImage: Bool let element: SymbolArtElement - init(forPreview: Bool = true, element: SymbolArtElement) { - self.forPreview = forPreview + init(shouldResizeForCoverImage: Bool = true, element: SymbolArtElement) { + self.shouldResizeForCoverImage = shouldResizeForCoverImage self.element = element } @@ -26,11 +26,11 @@ struct SymbolArtPreviewView: View { .frame( width: model.calculatingProportionalValue( withRatio: element.widthRatio, - forPreview: forPreview + forPreview: shouldResizeForCoverImage ), height: model.calculatingProportionalValue( withRatio: element.heightRatio, - forPreview: forPreview + forPreview: shouldResizeForCoverImage ) ) .rotationEffect(.degrees(element.rotationDegrees)) @@ -38,11 +38,11 @@ struct SymbolArtPreviewView: View { .offset( x: model.calculatingProportionalValue( withRatio: element.horizontalOffsetRatio, - forPreview: forPreview + forPreview: shouldResizeForCoverImage ), y: model.calculatingProportionalValue( withRatio: element.verticalOffsetRatio, - forPreview: forPreview + forPreview: shouldResizeForCoverImage ) ) .zIndex(element.zIndex) @@ -51,10 +51,10 @@ struct SymbolArtPreviewView: View { #Preview { VStack { - SymbolArtPreviewView(element: AfroBoyArtView.Element.face.value) + SymbolArtDisplayView(element: AfroBoyArtView.Element.face.value) - SymbolArtPreviewView( - forPreview: false, + SymbolArtDisplayView( + shouldResizeForCoverImage: false, element: AfroBoyArtView.Element.face.value ) } From 4a54f0ae55ef396dfeaa285e902662784a62fcd0 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sat, 10 Feb 2024 05:44:42 +0900 Subject: [PATCH 077/108] Refactor calculatingPortionalValue --- .../Common/Models/ArtWorkModel/ArtWorkModel.swift | 11 ++++++++--- .../AnimatableSymbolView/SymbolArtDisplayView.swift | 8 ++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift index 6d0a069..f29dd53 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift @@ -60,10 +60,15 @@ class ArtWorkModel { return calculatingProportionalValue(withRatio: symbolRow.offsetYRatio) } - /// The value calculated from baseLength using the given ratio. - func calculatingProportionalValue(withRatio ratio: CGFloat, forPreview isForPreview: Bool = false) -> CGFloat { + /// Calculates and returns the proportional value based on the provided ratio. + /// + /// - Parameters: + /// - ratio: The ratio used for calculation. + /// - shouldResizeForCoverImage: A Boolean value indicating whether the value should be adjusted for cover images. Default is false. + /// - Returns: The calculated proportional value. + func calculatingProportionalValue(withRatio ratio: CGFloat, shouldResizeForCoverImage: Bool = false) -> CGFloat { - if isForPreview { + if shouldResizeForCoverImage { return (galleryColumnLength - galleryColumnSpacing) * ratio } return baseLength * ratio diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift index eb1853e..13bf7ac 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift @@ -26,11 +26,11 @@ struct SymbolArtDisplayView: View { .frame( width: model.calculatingProportionalValue( withRatio: element.widthRatio, - forPreview: shouldResizeForCoverImage + shouldResizeForCoverImage: shouldResizeForCoverImage ), height: model.calculatingProportionalValue( withRatio: element.heightRatio, - forPreview: shouldResizeForCoverImage + shouldResizeForCoverImage: shouldResizeForCoverImage ) ) .rotationEffect(.degrees(element.rotationDegrees)) @@ -38,11 +38,11 @@ struct SymbolArtDisplayView: View { .offset( x: model.calculatingProportionalValue( withRatio: element.horizontalOffsetRatio, - forPreview: shouldResizeForCoverImage + shouldResizeForCoverImage: shouldResizeForCoverImage ), y: model.calculatingProportionalValue( withRatio: element.verticalOffsetRatio, - forPreview: shouldResizeForCoverImage + shouldResizeForCoverImage: shouldResizeForCoverImage ) ) .zIndex(element.zIndex) From 2ec57487f8d5419eca5b86466049c0c266727700 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sat, 10 Feb 2024 07:33:08 +0900 Subject: [PATCH 078/108] Add ArmHairArt --- .../project.pbxproj | 20 ++ .../ArtGalleryView.swift | 7 + .../ArmHair/ArmHairArtView+CoverArt.swift | 49 +++++ .../ArmHair/ArmHairArtView+Element.swift | 118 ++++++++++++ .../ArtWorks/ArmHair/ArmHairArtView.swift | 173 ++++++++++++++++++ 5 files changed, 367 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+Element.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index c8e9773..125c7b0 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -43,6 +43,9 @@ 9767DF1B2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF1A2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift */; }; 9767DF1D2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF1C2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift */; }; 9767DF1F2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF1E2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift */; }; + 9767DF232B7658E200457DA1 /* ArmHairArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF222B7658E200457DA1 /* ArmHairArtView+CoverArt.swift */; }; + 9767DF252B76C9BE00457DA1 /* ArmHairArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF242B76C9BE00457DA1 /* ArmHairArtView.swift */; }; + 9767DF272B76CCE300457DA1 /* ArmHairArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF262B76CCE300457DA1 /* ArmHairArtView+Element.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -110,6 +113,9 @@ 9767DF1A2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ImWearingPantsArtView+FinishPoseElement.swift"; sourceTree = ""; }; 9767DF1C2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ImWearingPantsArtView+Pose.swift"; sourceTree = ""; }; 9767DF1E2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ImWearingPantsArtView+FaceElement.swift"; sourceTree = ""; }; + 9767DF222B7658E200457DA1 /* ArmHairArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArmHairArtView+CoverArt.swift"; sourceTree = ""; }; + 9767DF242B76C9BE00457DA1 /* ArmHairArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArmHairArtView.swift; sourceTree = ""; }; + 9767DF262B76CCE300457DA1 /* ArmHairArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArmHairArtView+Element.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -286,6 +292,16 @@ path = Element; sourceTree = ""; }; + 9767DF212B7658CB00457DA1 /* ArmHair */ = { + isa = PBXGroup; + children = ( + 9767DF242B76C9BE00457DA1 /* ArmHairArtView.swift */, + 9767DF262B76CCE300457DA1 /* ArmHairArtView+Element.swift */, + 9767DF222B7658E200457DA1 /* ArmHairArtView+CoverArt.swift */, + ); + path = ArmHair; + sourceTree = ""; + }; 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */ = { isa = PBXGroup; children = ( @@ -334,6 +350,7 @@ 97EF439F2B74CA22003648F5 /* CrayonBoy */, 9767DEF82B751C1300457DA1 /* WorldPeace */, 9767DF012B759AFC00457DA1 /* PartyAnimals */, + 9767DF212B7658CB00457DA1 /* ArmHair */, 97AD531E2B70E2770034FB5D /* AfroBoy */, 97EF43892B725DE7003648F5 /* Nosebleed */, 97EF43912B72D3AF003648F5 /* ImWearingPants */, @@ -574,6 +591,7 @@ 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, + 9767DF272B76CCE300457DA1 /* ArmHairArtView+Element.swift in Sources */, 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */, 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */, 9748BE3F2897AE68006DF0BE /* ArmHair.swift in Sources */, @@ -582,6 +600,7 @@ 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */, 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, + 9767DF232B7658E200457DA1 /* ArmHairArtView+CoverArt.swift in Sources */, 9767DF1D2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift in Sources */, 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */, 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */, @@ -601,6 +620,7 @@ 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */, 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */, 9767DF0F2B75DFB400457DA1 /* SymbolArtDisplayView.swift in Sources */, + 9767DF252B76C9BE00457DA1 /* ArmHairArtView.swift in Sources */, 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index f23624d..7edf627 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -68,6 +68,13 @@ struct ArtGalleryView: View { .galleryGridItemView(length: model.galleryColumnLength) } + NavigationLink { + ArmHairArtView() + } label: { + ArmHairArtView.CoverArt() + .galleryGridItemView(length: model.galleryColumnLength) + } + NavigationLink { AfroBoyArtView() } label: { diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift new file mode 100644 index 0000000..e7d3d4f --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift @@ -0,0 +1,49 @@ +// +// ArmHairArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension ArmHairArtView { + + struct CoverArt: View { + + @Environment(ArtWorkModel.self) var model + + var hairOffset: CGSize { + let lowestX = model.calculatingProportionalValue(withRatio: -0.14, shouldResizeForCoverImage: true) + let highestX = model.calculatingProportionalValue(withRatio: 0.246, shouldResizeForCoverImage: true) + let lowestY = model.calculatingProportionalValue(withRatio: -0.075, shouldResizeForCoverImage: true) + let highestY = model.calculatingProportionalValue(withRatio: 0.02, shouldResizeForCoverImage: true) + return CGSize( + width: CGFloat.random(in: lowestX...highestX), + height: CGFloat.random(in: lowestY...highestY) + ) + } + + var body: some View { + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(shouldResizeForCoverImage: true, element: $0.value) + } + + ForEach(0..<250) { _ in + Image(systemName: "alternatingcurrent") + .foregroundStyle(.black) + .font(.system(size: model.calculatingProportionalValue(withRatio: 0.0825, shouldResizeForCoverImage: true))) + .fontWeight(.thin) + .rotationEffect(.degrees(100)) + .offset(hairOffset) + } + } + } + } +} + +#Preview { + ArmHairArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+Element.swift new file mode 100644 index 0000000..4ad1062 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+Element.swift @@ -0,0 +1,118 @@ +// +// ArmHairArtView+Element.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension ArmHairArtView { + + enum Element: String, CaseIterable, Identifiable { + case armFrame + case arm + case handFirst + case handSecond + case handFrame + case handConcealment + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .armFrame: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + fontWeight: .light, + widthRatio: 0.5, + heightRatio: 0.125, + symbolCountToWaitFor: 1 + ) + case .arm: + SymbolArtElement( + symbol: "􀏃", + name: "rectangle", + initialPosition: .third(.second), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.54, + heightRatio: 0.13, + symbolCountToWaitFor: 0 + ) + + case .handFrame: + SymbolArtElement( + symbol: "􀉻", + name: "hand.raised", + initialPosition: .third(.fourth), + primaryColor: .black, + fontWeight: .ultraLight, + widthRatio: 0.225, + heightRatio: 0.225, + rotationDegrees: -90, + horizontalOffsetRatio: -0.24, + verticalOffsetRatio: -0.02, + symbolCountToWaitFor: 2 + ) + + case .handFirst: + SymbolArtElement( + symbol: "􀉼", + name: "hand.raised.fill", + initialPosition: .third(.third), + primaryColor: .paleOrange, + widthRatio: 0.21, + heightRatio: 0.225, + rotationDegrees: -90, + horizontalOffsetRatio: -0.24, + verticalOffsetRatio: -0.02, + symbolCountToWaitFor: 3 + ) + + case .handSecond: + SymbolArtElement( + symbol: "􀉼", + name: "hand.raised.fill", + initialPosition: .third(.third), + primaryColor: .paleOrange, + fontWeight: .black, + widthRatio: 0.188, + heightRatio: 0.225, + rotationDegrees: -90, + horizontalOffsetRatio: -0.236, + verticalOffsetRatio: -0.01, + symbolCountToWaitFor: 3 + ) + + case .handConcealment: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.1, + heightRatio: 0.12, + horizontalOffsetRatio: -0.14, + verticalOffsetRatio: -0.0, + symbolCountToWaitFor: 1 + ) + } + } + } +} + +#Preview { + NavigationStack { + ArmHairArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + ArmHairArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift new file mode 100644 index 0000000..30bc1c5 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift @@ -0,0 +1,173 @@ +// +// ArmHairArtView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct ArmHairArtView: View { + + @Environment(ArtWorkModel.self) var model + @State private var isAnimating = false + + private let hairAnimationDuration = 3.0 + + var hairOffset: CGSize { + let lowestX = model.calculatingProportionalValue(withRatio: -0.14) + let highestX = model.calculatingProportionalValue(withRatio: 0.246) + let lowestY = model.calculatingProportionalValue(withRatio: -0.075) + let highestY = model.calculatingProportionalValue(withRatio: 0.02) + return CGSize( + width: CGFloat.random(in: lowestX...highestX), + height: CGFloat.random(in: lowestY...highestY) + ) + } + + var randomOffsetRatio: CGSize { + let range: ClosedRange = -0.45...0.45 + let offsetX = model.calculatingProportionalValue(withRatio: CGFloat.random(in: range)) + let offsetY = model.calculatingProportionalValue(withRatio: CGFloat.random(in: range)) + return CGSize( + width: offsetX, + height: offsetY + ) + } + + var randomRotationDegrees: CGFloat { + CGFloat.random(in: -720...7200) + } + + var body: some View { + ZStack { + ForEach(ArmHairArtView.Element.allCases) { + AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) + } + + ForEach(0..<250) { _ in + Image(systemName: "alternatingcurrent") + .resizable() + .foregroundStyle(.black) + .keyframeAnimator( + initialValue: AnimationValues( + width: model.initialSymbolLength, + height: model.initialSymbolLength, + offsetX: model.calculatingInitialOffsetX(forPosition: .third(.fifth)), + offsetY: model.calculatingInitialOffsetY(forPosition: .third(.fifth)) + ), + trigger: isAnimating + ) { content, value in + + SymbolNameFrameView( + name: "alternatingcurrent", + length: model.initialSymbolLength, + frameOpacity: value.symbolNameVisibleValue + ) { + + Group { + if value.symbolNameVisibleValue == 1 { + content + .scaledToFit() + } else { + content + } + } + .foregroundStyle( + value.primaryColor, + value.secondaryColor + ) + .fontWeight(value.fontWeight) + .frame( + width: value.width, + height: value.height + ) + .rotationEffect(.degrees(value.rotationDegrees)) + } + .offset(value.offset) + + } keyframes: { value in + + KeyframeTrack(\.fontWeightValue) { + LinearKeyframe( + value.fontWeightValue, + duration: model.waitingTime(forCount: 4) + ) + CubicKeyframe(Font.Weight.thin.animatableValue, duration: hairAnimationDuration) + } + + KeyframeTrack(\.width) { + LinearKeyframe( + value.height, + duration: model.waitingTime(forCount: 4) + ) + CubicKeyframe(model.calculatingProportionalValue(withRatio: 0.08), duration: hairAnimationDuration) + } + + KeyframeTrack(\.height) { + LinearKeyframe( + value.height, + duration: model.waitingTime(forCount: 4) + ) + CubicKeyframe(model.calculatingProportionalValue(withRatio: 0.024), duration: hairAnimationDuration) + } + + KeyframeTrack(\.rotationDegrees) { + LinearKeyframe( + value.rotationDegrees, + duration: model.waitingTime(forCount: 4) + ) + LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) + LinearKeyframe(100, duration: hairAnimationDuration * 0.3) + } + + KeyframeTrack(\.offset) { + LinearKeyframe( + value.offset, + duration: model.waitingTime(forCount: 4) + ) + LinearKeyframe(randomOffsetRatio, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomOffsetRatio, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomOffsetRatio, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomOffsetRatio, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomOffsetRatio, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomOffsetRatio, duration: hairAnimationDuration * 0.1) + LinearKeyframe(randomOffsetRatio, duration: hairAnimationDuration * 0.1) + LinearKeyframe(hairOffset, duration: hairAnimationDuration * 0.3) + } + + KeyframeTrack(\.symbolNameVisibleValue) { + LinearKeyframe(1, duration: model.waitingTime(forCount: 4)) + CubicKeyframe(0, duration: model.animationDurationPerSymbol * 0.2) + } + } + } + } + .navigationTitle("Arm hair") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + } +} + +#Preview { + NavigationStack { + ArmHairArtView() + .environment(ArtWorkModel.preview) + } +} From c9b6fe7f40c344fcd788a1961f87738f77bf99d4 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sat, 10 Feb 2024 07:33:54 +0900 Subject: [PATCH 079/108] Remove old arm hair --- .../project.pbxproj | 20 ------ .../ArtWorks/ArmHair/Arm.swift | 61 ------------------- .../ArtWorks/ArmHair/ArmHair.swift | 41 ------------- .../ArtWorks/ArmHair/Hair.swift | 27 -------- 4 files changed, 149 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtWorks/ArmHair/Arm.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/ArmHair/ArmHair.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/ArmHair/Hair.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 125c7b0..93cf1a0 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -11,9 +11,6 @@ 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */; }; 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */; }; 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1F28939B04006DF0BE /* FlipType.swift */; }; - 9748BE3F2897AE68006DF0BE /* ArmHair.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE3E2897AE68006DF0BE /* ArmHair.swift */; }; - 9748BE412897CD6C006DF0BE /* Arm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE402897CD6C006DF0BE /* Arm.swift */; }; - 9748BE4328980C4D006DF0BE /* Hair.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4228980C4D006DF0BE /* Hair.swift */; }; 9748BE4628981011006DF0BE /* DemonWrestler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4528981011006DF0BE /* DemonWrestler.swift */; }; 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4728981096006DF0BE /* DemonWrestlerFace.swift */; }; 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4928995877006DF0BE /* DemonWrestlerOutline.swift */; }; @@ -80,9 +77,6 @@ 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithFont.swift; sourceTree = ""; }; 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithWidthAndHeight.swift; sourceTree = ""; }; 9748BE1F28939B04006DF0BE /* FlipType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlipType.swift; sourceTree = ""; }; - 9748BE3E2897AE68006DF0BE /* ArmHair.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArmHair.swift; sourceTree = ""; }; - 9748BE402897CD6C006DF0BE /* Arm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Arm.swift; sourceTree = ""; }; - 9748BE4228980C4D006DF0BE /* Hair.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Hair.swift; sourceTree = ""; }; 9748BE4528981011006DF0BE /* DemonWrestler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestler.swift; sourceTree = ""; }; 9748BE4728981096006DF0BE /* DemonWrestlerFace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestlerFace.swift; sourceTree = ""; }; 9748BE4928995877006DF0BE /* DemonWrestlerOutline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestlerOutline.swift; sourceTree = ""; }; @@ -190,16 +184,6 @@ path = Enums; sourceTree = ""; }; - 9748BE3D2897ADBD006DF0BE /* ArmHair */ = { - isa = PBXGroup; - children = ( - 9748BE3E2897AE68006DF0BE /* ArmHair.swift */, - 9748BE402897CD6C006DF0BE /* Arm.swift */, - 9748BE4228980C4D006DF0BE /* Hair.swift */, - ); - path = ArmHair; - sourceTree = ""; - }; 9748BE4428980FE4006DF0BE /* DemonWrestler */ = { isa = PBXGroup; children = ( @@ -256,7 +240,6 @@ 9748BE6528A395D5006DF0BE /* ArtWork.swift */, 9748BE55289DCB82006DF0BE /* Fireworks */, 9748BE4428980FE4006DF0BE /* DemonWrestler */, - 9748BE3D2897ADBD006DF0BE /* ArmHair */, 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */, ); path = ArtWorks; @@ -594,9 +577,6 @@ 9767DF272B76CCE300457DA1 /* ArmHairArtView+Element.swift in Sources */, 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */, 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */, - 9748BE3F2897AE68006DF0BE /* ArmHair.swift in Sources */, - 9748BE412897CD6C006DF0BE /* Arm.swift in Sources */, - 9748BE4328980C4D006DF0BE /* Hair.swift in Sources */, 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */, 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/ArmHair/Arm.swift b/SFSymbolsArtCollection/ArtWorks/ArmHair/Arm.swift deleted file mode 100644 index c9887cd..0000000 --- a/SFSymbolsArtCollection/ArtWorks/ArmHair/Arm.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Arm.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/01. -// - -import SwiftUI - -struct Arm: View { - - let baseLength: CGFloat - let skinColor: Color = .paleOrange - - var body: some View { - HStack(spacing: 0) { - - // Arm - ZStack { - Image(symbol: .rectangleFill) - .arrangeShape(color: skinColor, - width: baseLength * 0.5, - height: baseLength * 0.125, - fontWeight: .light) - - Image(symbol: .rectangle) - .arrangeShape(width: baseLength * 0.5, - height: baseLength * 0.125, - fontWeight: .thin) - } - - ZStack { - - // Hand - ZStack { - Image(symbol: .handRaisedFill) - .arrangeShape(color: skinColor, - fontSize: baseLength * 0.225, - rotationDegrees: -90) - - Image(symbol: .handRaised) - .arrangeShape(fontSize: baseLength * 0.25, - fontWeight: .light, - rotationDegrees: -90) - } - .offset(x: -20, y: 5) - - Image(symbol: .rectangleFill) - .arrangeShape(color: skinColor, - fontSize: baseLength * 0.1, - offsetX: baseLength * -0.125) - } - } - } -} - -struct Arm_Previews: PreviewProvider { - static var previews: some View { - Arm(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/ArmHair/ArmHair.swift b/SFSymbolsArtCollection/ArtWorks/ArmHair/ArmHair.swift deleted file mode 100644 index 92adcfe..0000000 --- a/SFSymbolsArtCollection/ArtWorks/ArmHair/ArmHair.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// ArmHair.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/01. -// - -import SwiftUI - -struct ArmHair: View { - - var body: some View { - - GeometryReader { proxy in - - let baseLength = proxy.baseLength - - let lowestX = Int(baseLength * -0.35) - let highestX = Int(baseLength * 0.1) - let lowestY = Int(baseLength * -0.075) - let highestY = Int(baseLength * 0.02) - - ZStack { - Arm(baseLength: baseLength) - - ForEach(0..<250) { _ in - Hair(baseLength: baseLength) - .offset(x: CGFloat(Int.random(in: lowestX...highestX)), - y: CGFloat(Int.random(in: lowestY...highestY))) - } - } - .position(proxy.localCenter) - } - } -} - -struct ArmHair_Previews: PreviewProvider { - static var previews: some View { - ArmHair() - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/ArmHair/Hair.swift b/SFSymbolsArtCollection/ArtWorks/ArmHair/Hair.swift deleted file mode 100644 index 37d14d6..0000000 --- a/SFSymbolsArtCollection/ArtWorks/ArmHair/Hair.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// Hair.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/01. -// - -import SwiftUI - -struct Hair: View { - - let baseLength: CGFloat - - var body: some View { - - Image(symbol: .alternatingcurrent) - .arrangeShape(fontSize: baseLength * 0.0825, - fontWeight: .thin, - rotationDegrees: 100) - } -} - -struct Hair_Previews: PreviewProvider { - static var previews: some View { - Hair(baseLength: 400) - } -} From 8ff7fd74ab317c44fa712419239584aef6c5e113 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sat, 10 Feb 2024 07:42:05 +0900 Subject: [PATCH 080/108] Update armHair animation --- .../ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift | 2 +- .../ArtWorks/ArmHair/ArmHairArtView.swift | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift index e7d3d4f..c6e5d7f 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift @@ -30,7 +30,7 @@ extension ArmHairArtView { SymbolArtDisplayView(shouldResizeForCoverImage: true, element: $0.value) } - ForEach(0..<250) { _ in + ForEach(0..<260) { _ in Image(systemName: "alternatingcurrent") .foregroundStyle(.black) .font(.system(size: model.calculatingProportionalValue(withRatio: 0.0825, shouldResizeForCoverImage: true))) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift index 30bc1c5..3f942a0 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift @@ -36,7 +36,7 @@ struct ArmHairArtView: View { } var randomRotationDegrees: CGFloat { - CGFloat.random(in: -720...7200) + CGFloat.random(in: -720...720) } var body: some View { @@ -45,7 +45,7 @@ struct ArmHairArtView: View { AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } - ForEach(0..<250) { _ in + ForEach(0..<260) { _ in Image(systemName: "alternatingcurrent") .resizable() .foregroundStyle(.black) @@ -124,7 +124,8 @@ struct ArmHairArtView: View { LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) - LinearKeyframe(100, duration: hairAnimationDuration * 0.3) + LinearKeyframe(randomRotationDegrees, duration: hairAnimationDuration * 0.1) + LinearKeyframe(100, duration: hairAnimationDuration * 0.1) } KeyframeTrack(\.offset) { From 9d52832c52fb2669498254adf074cea74195a728 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sat, 10 Feb 2024 07:42:55 +0900 Subject: [PATCH 081/108] Remove unused zIndex property --- .../Views/AnimatableSymbolView/AnimatableSymbolView.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift index e5df6ba..87486fd 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/AnimatableSymbolView.swift @@ -23,7 +23,6 @@ struct AnimatableSymbolView: View { self.rotationAxis = element.flip.axis self.horizontalOffsetRatio = element.horizontalOffsetRatio self.verticalOffsetRatio = element.verticalOffsetRatio - self.zIndex = element.zIndex self.isAnimating = isAnimating self.symbolCountToWaitFor = element.symbolCountToWaitFor } @@ -42,7 +41,6 @@ struct AnimatableSymbolView: View { var rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) let horizontalOffsetRatio: CGFloat let verticalOffsetRatio: CGFloat - let zIndex: CGFloat let isAnimating: Bool let symbolCountToWaitFor: Int @@ -174,7 +172,6 @@ struct AnimatableSymbolView: View { CubicKeyframe(0, duration: model.animationDurationPerSymbol * 0.2) } } - .zIndex(zIndex) } } From ab9374e536f7e62df21da83852e20d099c8e2426 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sat, 10 Feb 2024 07:54:21 +0900 Subject: [PATCH 082/108] Refactor CoverArt --- .../project.pbxproj | 56 +++++++++---------- .../ArtGalleryView.swift | 14 ++--- .../AfroBoy/AfroBoyArtView+CoverArt.swift | 27 +++++++++ .../AfroBoy/AfroBoyArtView+Element.swift | 2 +- .../ArtWorks/AfroBoy/AfroBoyPreviewView.swift | 24 -------- .../CrayonBoy/CrayonBoyArtView+CoverArt.swift | 27 +++++++++ .../CrayonBoy/CrayonBoyArtView+Element.swift | 2 +- .../CrayonBoy/CrayonBoyPreviewView.swift | 24 -------- .../ImWearingPantsArtView+FaceElement.swift | 2 +- ...earingPantsArtView+FinishPoseElement.swift | 2 +- .../Element/ImWearingPantsArtView+Pose.swift | 2 +- .../ImWearingPantsArtView+CoverArt.swift | 31 ++++++++++ .../ImWearingPantsPreviewView.swift | 28 ---------- .../Magician/MagicianArtView+CoverArt.swift | 27 +++++++++ .../Magician/MagicianArtView+Element.swift | 2 +- .../Magician/MagicianPreviewView.swift | 24 -------- .../Nosebleed/NosebleedArtView+CoverArt.swift | 28 ++++++++++ .../Nosebleed/NosebleedArtView+Element.swift | 2 +- .../Nosebleed/NosebleedPreviewView.swift | 25 --------- .../PartyAnimalsArtView+CoverArt.swift | 27 +++++++++ .../PartyAnimalsArtView+Element.swift | 2 +- .../PartyAnimalsPreviewView.swift | 24 -------- .../WorldPeaceArtView+CoverArt.swift | 28 ++++++++++ .../WorldPeaceArtView+Element.swift | 2 +- .../WorldPeace/WorldPeacePreviewView.swift | 25 --------- 25 files changed, 239 insertions(+), 218 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+CoverArt.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+CoverArt.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+CoverArt.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+CoverArt.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+CoverArt.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+CoverArt.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+CoverArt.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 93cf1a0..371bc03 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -25,9 +25,9 @@ 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2B28C2DDAA004E1720 /* Buildings.swift */; }; 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2E28C2E608004E1720 /* SmallFirework.swift */; }; 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */; }; - 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */; }; + 9767DEFA2B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEF92B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift */; }; 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */; }; - 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */; }; + 9767DF032B759B2D00457DA1 /* PartyAnimalsArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF022B759B2D00457DA1 /* PartyAnimalsArtView+CoverArt.swift */; }; 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */; }; 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */; }; 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */; }; @@ -52,7 +52,7 @@ 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53232B70E48F0034FB5D /* PlayButton.swift */; }; 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53282B7100670034FB5D /* ArtWorkModel.swift */; }; 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */; }; - 97AD532D2B717C950034FB5D /* AfroBoyPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532C2B717C950034FB5D /* AfroBoyPreviewView.swift */; }; + 97AD532D2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532C2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift */; }; 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53302B71A5130034FB5D /* GalleryGridView.swift */; }; 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; @@ -62,13 +62,13 @@ 97E11DF028176A0D00B2AB32 /* SFUserFriendlySymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 97E11DEF28176A0D00B2AB32 /* SFUserFriendlySymbols */; }; 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */; }; 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */; }; - 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */; }; - 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43922B72D3E2003648F5 /* ImWearingPantsPreviewView.swift */; }; + 97EF43902B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438F2B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift */; }; + 97EF43932B72D3E2003648F5 /* ImWearingPantsArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43922B72D3E2003648F5 /* ImWearingPantsArtView+CoverArt.swift */; }; 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */; }; 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43972B733337003648F5 /* MagicianArtView.swift */; }; - 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */; }; + 97EF439C2B7421A7003648F5 /* MagicianArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439B2B7421A7003648F5 /* MagicianArtView+CoverArt.swift */; }; 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF439D2B744C4C003648F5 /* Color+.swift */; }; - 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43A02B74CA38003648F5 /* CrayonBoyPreviewView.swift */; }; + 97EF43A12B74CA38003648F5 /* CrayonBoyArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43A02B74CA38003648F5 /* CrayonBoyArtView+CoverArt.swift */; }; 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF43A42B74F27D003648F5 /* CrayonBoyArtView.swift */; }; /* End PBXBuildFile section */ @@ -92,9 +92,9 @@ 97624C2B28C2DDAA004E1720 /* Buildings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Buildings.swift; sourceTree = ""; }; 97624C2E28C2E608004E1720 /* SmallFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallFirework.swift; sourceTree = ""; }; 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GeometryProxy+.swift"; sourceTree = ""; }; - 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeacePreviewView.swift; sourceTree = ""; }; + 9767DEF92B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeaceArtView+CoverArt.swift"; sourceTree = ""; }; 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeaceArtView.swift; sourceTree = ""; }; - 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsPreviewView.swift; sourceTree = ""; }; + 9767DF022B759B2D00457DA1 /* PartyAnimalsArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PartyAnimalsArtView+CoverArt.swift"; sourceTree = ""; }; 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartyAnimalsArtView.swift; sourceTree = ""; }; 9767DF0A2B75D1A100457DA1 /* SymbolArtElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolArtElement.swift; sourceTree = ""; }; 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AfroBoyArtView+Element.swift"; sourceTree = ""; }; @@ -119,7 +119,7 @@ 97AD53232B70E48F0034FB5D /* PlayButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayButton.swift; sourceTree = ""; }; 97AD53282B7100670034FB5D /* ArtWorkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtWorkModel.swift; sourceTree = ""; }; 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AfroBoyArtView.swift; sourceTree = ""; }; - 97AD532C2B717C950034FB5D /* AfroBoyPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AfroBoyPreviewView.swift; sourceTree = ""; }; + 97AD532C2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AfroBoyArtView+CoverArt.swift"; sourceTree = ""; }; 97AD53302B71A5130034FB5D /* GalleryGridView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GalleryGridView.swift; sourceTree = ""; }; 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; @@ -129,13 +129,13 @@ 97E11D562817381200B2AB32 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedArtView.swift; sourceTree = ""; }; 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArtWorkModel+InitialSymbolRow.swift"; sourceTree = ""; }; - 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NosebleedPreviewView.swift; sourceTree = ""; }; - 97EF43922B72D3E2003648F5 /* ImWearingPantsPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImWearingPantsPreviewView.swift; sourceTree = ""; }; + 97EF438F2B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NosebleedArtView+CoverArt.swift"; sourceTree = ""; }; + 97EF43922B72D3E2003648F5 /* ImWearingPantsArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ImWearingPantsArtView+CoverArt.swift"; sourceTree = ""; }; 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImWearingPantsArtView.swift; sourceTree = ""; }; 97EF43972B733337003648F5 /* MagicianArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianArtView.swift; sourceTree = ""; }; - 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicianPreviewView.swift; sourceTree = ""; }; + 97EF439B2B7421A7003648F5 /* MagicianArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MagicianArtView+CoverArt.swift"; sourceTree = ""; }; 97EF439D2B744C4C003648F5 /* Color+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+.swift"; sourceTree = ""; }; - 97EF43A02B74CA38003648F5 /* CrayonBoyPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoyPreviewView.swift; sourceTree = ""; }; + 97EF43A02B74CA38003648F5 /* CrayonBoyArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CrayonBoyArtView+CoverArt.swift"; sourceTree = ""; }; 97EF43A42B74F27D003648F5 /* CrayonBoyArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrayonBoyArtView.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -250,7 +250,7 @@ children = ( 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */, 9767DF142B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift */, - 9767DEF92B751C2C00457DA1 /* WorldPeacePreviewView.swift */, + 9767DEF92B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift */, ); path = WorldPeace; sourceTree = ""; @@ -260,7 +260,7 @@ children = ( 9767DF042B75AFE200457DA1 /* PartyAnimalsArtView.swift */, 9767DF162B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift */, - 9767DF022B759B2D00457DA1 /* PartyAnimalsPreviewView.swift */, + 9767DF022B759B2D00457DA1 /* PartyAnimalsArtView+CoverArt.swift */, ); path = PartyAnimals; sourceTree = ""; @@ -346,7 +346,7 @@ children = ( 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */, 9767DF0C2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift */, - 97AD532C2B717C950034FB5D /* AfroBoyPreviewView.swift */, + 97AD532C2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift */, ); path = AfroBoy; sourceTree = ""; @@ -425,7 +425,7 @@ children = ( 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */, 9767DF182B76032600457DA1 /* NosebleedArtView+Element.swift */, - 97EF438F2B72D2E4003648F5 /* NosebleedPreviewView.swift */, + 97EF438F2B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift */, ); path = Nosebleed; sourceTree = ""; @@ -444,7 +444,7 @@ children = ( 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */, 9767DF202B762EF300457DA1 /* Element */, - 97EF43922B72D3E2003648F5 /* ImWearingPantsPreviewView.swift */, + 97EF43922B72D3E2003648F5 /* ImWearingPantsArtView+CoverArt.swift */, ); path = ImWearingPants; sourceTree = ""; @@ -454,7 +454,7 @@ children = ( 97EF43972B733337003648F5 /* MagicianArtView.swift */, 9767DF102B75E8FC00457DA1 /* MagicianArtView+Element.swift */, - 97EF439B2B7421A7003648F5 /* MagicianPreviewView.swift */, + 97EF439B2B7421A7003648F5 /* MagicianArtView+CoverArt.swift */, ); path = Magician; sourceTree = ""; @@ -464,7 +464,7 @@ children = ( 97EF43A42B74F27D003648F5 /* CrayonBoyArtView.swift */, 9767DF122B75EDB700457DA1 /* CrayonBoyArtView+Element.swift */, - 97EF43A02B74CA38003648F5 /* CrayonBoyPreviewView.swift */, + 97EF43A02B74CA38003648F5 /* CrayonBoyArtView+CoverArt.swift */, ); path = CrayonBoy; sourceTree = ""; @@ -548,21 +548,21 @@ 9767DF192B76032600457DA1 /* NosebleedArtView+Element.swift in Sources */, 9767DF172B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift in Sources */, 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */, - 97EF43932B72D3E2003648F5 /* ImWearingPantsPreviewView.swift in Sources */, + 97EF43932B72D3E2003648F5 /* ImWearingPantsArtView+CoverArt.swift in Sources */, 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */, 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */, 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, - 97AD532D2B717C950034FB5D /* AfroBoyPreviewView.swift in Sources */, + 97AD532D2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift in Sources */, 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */, - 9767DEFA2B751C2C00457DA1 /* WorldPeacePreviewView.swift in Sources */, + 9767DEFA2B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift in Sources */, 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */, 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */, 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */, @@ -583,7 +583,7 @@ 9767DF232B7658E200457DA1 /* ArmHairArtView+CoverArt.swift in Sources */, 9767DF1D2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift in Sources */, 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */, - 97EF439C2B7421A7003648F5 /* MagicianPreviewView.swift in Sources */, + 97EF439C2B7421A7003648F5 /* MagicianArtView+CoverArt.swift in Sources */, 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */, 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */, 9767DF1B2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift in Sources */, @@ -592,12 +592,12 @@ 9767DF1F2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift in Sources */, 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, 97AD53222B70E3FA0034FB5D /* AnimatableSymbolView.swift in Sources */, - 9767DF032B759B2D00457DA1 /* PartyAnimalsPreviewView.swift in Sources */, + 9767DF032B759B2D00457DA1 /* PartyAnimalsArtView+CoverArt.swift in Sources */, 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */, - 97EF43A12B74CA38003648F5 /* CrayonBoyPreviewView.swift in Sources */, + 97EF43A12B74CA38003648F5 /* CrayonBoyArtView+CoverArt.swift in Sources */, 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, - 97EF43902B72D2E4003648F5 /* NosebleedPreviewView.swift in Sources */, + 97EF43902B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift in Sources */, 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */, 9767DF0F2B75DFB400457DA1 /* SymbolArtDisplayView.swift in Sources */, 9767DF252B76C9BE00457DA1 /* ArmHairArtView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 7edf627..0a7715c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -43,28 +43,28 @@ struct ArtGalleryView: View { NavigationLink { MagicianArtView() } label: { - MagicianPreviewView() + MagicianArtView.CoverArt() .galleryGridItemView(length: model.galleryColumnLength) } NavigationLink { CrayonBoyArtView() } label: { - CrayonBoyPreviewView() + CrayonBoyArtView.CoverArt() .galleryGridItemView(length: model.galleryColumnLength) } NavigationLink { WorldPeaceArtView() } label: { - WorldPeacePreviewView() + WorldPeaceArtView.CoverArt() .galleryGridItemView(length: model.galleryColumnLength) } NavigationLink { PartyAnimalsArtView() } label: { - PartyAnimalsPreviewView() + PartyAnimalsArtView.CoverArt() .galleryGridItemView(length: model.galleryColumnLength) } @@ -78,21 +78,21 @@ struct ArtGalleryView: View { NavigationLink { AfroBoyArtView() } label: { - AfroBoyPreviewView() + AfroBoyArtView.CoverArt() .galleryGridItemView(length: model.galleryColumnLength) } NavigationLink { NosebleedArtView() } label: { - NosebleedArtPreviewView() + NosebleedArtView.CoverArt() .galleryGridItemView(length: model.galleryColumnLength) } NavigationLink { ImWearingPantsArtView() } label: { - ImWearingPantsPreviewView() + ImWearingPantsArtView.CoverArt() .galleryGridItemView(length: model.galleryColumnLength) } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+CoverArt.swift new file mode 100644 index 0000000..52b8dbd --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+CoverArt.swift @@ -0,0 +1,27 @@ +// +// AfroBoyArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension AfroBoyArtView { + + struct CoverArt: View { + + var body: some View { + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + } + } + } +} + +#Preview { + AfroBoyArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+Element.swift index af2c949..2d40c5f 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+Element.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView+Element.swift @@ -77,6 +77,6 @@ extension AfroBoyArtView { } #Preview { - AfroBoyPreviewView() + AfroBoyArtView.CoverArt() .environment(ArtWorkModel.preview) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift deleted file mode 100644 index 055179e..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyPreviewView.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// AfroBoyPreviewView.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -struct AfroBoyPreviewView: View { - - var body: some View { - ZStack { - ForEach(AfroBoyArtView.Element.allCases) { - SymbolArtDisplayView(element: $0.value) - } - } - } -} - -#Preview { - AfroBoyPreviewView() - .environment(ArtWorkModel.preview) -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+CoverArt.swift new file mode 100644 index 0000000..df3c218 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+CoverArt.swift @@ -0,0 +1,27 @@ +// +// CrayonBoyArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension CrayonBoyArtView { + + struct CoverArt: View { + + var body: some View { + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + } + } + } +} + +#Preview { + CrayonBoyArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+Element.swift index aa771a1..67297e1 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+Element.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+Element.swift @@ -238,6 +238,6 @@ extension CrayonBoyArtView { } #Preview { - CrayonBoyPreviewView() + CrayonBoyArtView.CoverArt() .environment(ArtWorkModel.preview) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift deleted file mode 100644 index 4c2828b..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyPreviewView.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// CrayonBoyPreviewView.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -struct CrayonBoyPreviewView: View { - - var body: some View { - ZStack { - ForEach(CrayonBoyArtView.Element.allCases) { - SymbolArtDisplayView(element: $0.value) - } - } - } -} - -#Preview { - CrayonBoyPreviewView() - .environment(ArtWorkModel.preview) -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift index 0bf64a1..44b67f2 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift @@ -325,6 +325,6 @@ extension ImWearingPantsArtView { } #Preview { - ImWearingPantsPreviewView() + ImWearingPantsArtView.CoverArt() .environment(ArtWorkModel.preview) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift index 1574cbb..0515a40 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift @@ -363,6 +363,6 @@ extension ImWearingPantsArtView { } #Preview { - ImWearingPantsPreviewView() + ImWearingPantsArtView.CoverArt() .environment(ArtWorkModel.preview) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift index 9903937..2781d84 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift @@ -95,6 +95,6 @@ extension ImWearingPantsArtView { } #Preview { - ImWearingPantsPreviewView() + ImWearingPantsArtView.CoverArt() .environment(ArtWorkModel.preview) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+CoverArt.swift new file mode 100644 index 0000000..d545b80 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+CoverArt.swift @@ -0,0 +1,31 @@ +// +// ImWearingPantsArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension ImWearingPantsArtView { + + struct CoverArt: View { + + var body: some View { + ZStack { + ForEach(FinishPoseElement.allCases) { + SymbolArtDisplayView(element: $0.value) + } + + ForEach(FaceElement.allCases) { + SymbolArtDisplayView(element: $0.value) + } + } + } + } +} + +#Preview { + ImWearingPantsArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift deleted file mode 100644 index e5a0a92..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsPreviewView.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ImWearingPantsPreviewView.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -struct ImWearingPantsPreviewView: View { - - var body: some View { - ZStack { - ForEach(ImWearingPantsArtView.FinishPoseElement.allCases) { - SymbolArtDisplayView(element: $0.value) - } - - ForEach(ImWearingPantsArtView.FaceElement.allCases) { - SymbolArtDisplayView(element: $0.value) - } - } - } -} - -#Preview { - ImWearingPantsPreviewView() - .environment(ArtWorkModel.preview) -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+CoverArt.swift new file mode 100644 index 0000000..4676d34 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+CoverArt.swift @@ -0,0 +1,27 @@ +// +// MagicianArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension MagicianArtView { + + struct CoverArt: View { + + var body: some View { + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + } + } + } +} + +#Preview { + MagicianArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+Element.swift index f6df052..25549c3 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+Element.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView+Element.swift @@ -216,6 +216,6 @@ extension MagicianArtView { } #Preview { - MagicianPreviewView() + MagicianArtView.CoverArt() .environment(ArtWorkModel.preview) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift deleted file mode 100644 index 9f8495a..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianPreviewView.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// MagicianPreviewView.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -struct MagicianPreviewView: View { - - var body: some View { - ZStack { - ForEach(MagicianArtView.Element.allCases) { - SymbolArtDisplayView(element: $0.value) - } - } - } -} - -#Preview { - MagicianPreviewView() - .environment(ArtWorkModel.preview) -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+CoverArt.swift new file mode 100644 index 0000000..e4d50ad --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+CoverArt.swift @@ -0,0 +1,28 @@ +// +// NosebleedArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension NosebleedArtView { + + struct CoverArt: View { + + var body: some View { + + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + } + } + } +} + +#Preview { + NosebleedArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+Element.swift index 581ae64..b750ecc 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+Element.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView+Element.swift @@ -230,6 +230,6 @@ extension NosebleedArtView { } #Preview { - NosebleedArtPreviewView() + NosebleedArtView.CoverArt() .environment(ArtWorkModel.preview) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift deleted file mode 100644 index 7ea08ac..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedPreviewView.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// NosebleedPreviewView.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -struct NosebleedArtPreviewView: View { - - var body: some View { - - ZStack { - ForEach(NosebleedArtView.Element.allCases) { - SymbolArtDisplayView(element: $0.value) - } - } - } -} - -#Preview { - NosebleedArtPreviewView() - .environment(ArtWorkModel.preview) -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+CoverArt.swift new file mode 100644 index 0000000..3483625 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+CoverArt.swift @@ -0,0 +1,27 @@ +// +// PartyAnimalsArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension PartyAnimalsArtView { + + struct CoverArt: View { + + var body: some View { + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + } + } + } +} + +#Preview { + PartyAnimalsArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+Element.swift index 39dd52e..1908358 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+Element.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView+Element.swift @@ -451,6 +451,6 @@ extension PartyAnimalsArtView { } #Preview { - PartyAnimalsPreviewView() + PartyAnimalsArtView.CoverArt() .environment(ArtWorkModel.preview) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift deleted file mode 100644 index c985af3..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsPreviewView.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// PartyAnimalsPreviewView.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -struct PartyAnimalsPreviewView: View { - - var body: some View { - ZStack { - ForEach(PartyAnimalsArtView.Element.allCases) { - SymbolArtDisplayView(element: $0.value) - } - } - } -} - -#Preview { - PartyAnimalsPreviewView() - .environment(ArtWorkModel.preview) -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+CoverArt.swift new file mode 100644 index 0000000..782dc58 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+CoverArt.swift @@ -0,0 +1,28 @@ +// +// WorldPeaceArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension WorldPeaceArtView { + + struct CoverArt: View { + + var body: some View { + + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + } + } + } +} + +#Preview { + WorldPeaceArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift index 62b03e8..f63728b 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift @@ -355,6 +355,6 @@ extension WorldPeaceArtView { } #Preview { - WorldPeacePreviewView() + WorldPeaceArtView.CoverArt() .environment(ArtWorkModel.preview) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift deleted file mode 100644 index d4df211..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeacePreviewView.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// WorldPeacePreviewView.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -struct WorldPeacePreviewView: View { - - var body: some View { - - ZStack { - ForEach(WorldPeaceArtView.Element.allCases) { - SymbolArtDisplayView(element: $0.value) - } - } - } -} - -#Preview { - WorldPeacePreviewView() - .environment(ArtWorkModel.preview) -} From 5fe1cbc65d4cbbb37544da25c44ea3a50c9f73bd Mon Sep 17 00:00:00 2001 From: littleossa Date: Sat, 10 Feb 2024 07:58:02 +0900 Subject: [PATCH 083/108] Rename shouldResizeForCoverImage to shouldResizeForCoverArt --- .../ArmHair/ArmHairArtView+CoverArt.swift | 12 ++++++------ .../ImWearingPants/ImWearingPantsArtView.swift | 2 +- .../Models/ArtWorkModel/ArtWorkModel.swift | 6 +++--- .../SymbolArtDisplayView.swift | 16 ++++++++-------- .../Common/Views/GalleryGridView.swift | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift index c6e5d7f..50e1d36 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView+CoverArt.swift @@ -14,10 +14,10 @@ extension ArmHairArtView { @Environment(ArtWorkModel.self) var model var hairOffset: CGSize { - let lowestX = model.calculatingProportionalValue(withRatio: -0.14, shouldResizeForCoverImage: true) - let highestX = model.calculatingProportionalValue(withRatio: 0.246, shouldResizeForCoverImage: true) - let lowestY = model.calculatingProportionalValue(withRatio: -0.075, shouldResizeForCoverImage: true) - let highestY = model.calculatingProportionalValue(withRatio: 0.02, shouldResizeForCoverImage: true) + let lowestX = model.calculatingProportionalValue(withRatio: -0.14, shouldResizeForCoverArt: true) + let highestX = model.calculatingProportionalValue(withRatio: 0.246, shouldResizeForCoverArt: true) + let lowestY = model.calculatingProportionalValue(withRatio: -0.075, shouldResizeForCoverArt: true) + let highestY = model.calculatingProportionalValue(withRatio: 0.02, shouldResizeForCoverArt: true) return CGSize( width: CGFloat.random(in: lowestX...highestX), height: CGFloat.random(in: lowestY...highestY) @@ -27,13 +27,13 @@ extension ArmHairArtView { var body: some View { ZStack { ForEach(Element.allCases) { - SymbolArtDisplayView(shouldResizeForCoverImage: true, element: $0.value) + SymbolArtDisplayView(shouldResizeForCoverArt: true, element: $0.value) } ForEach(0..<260) { _ in Image(systemName: "alternatingcurrent") .foregroundStyle(.black) - .font(.system(size: model.calculatingProportionalValue(withRatio: 0.0825, shouldResizeForCoverImage: true))) + .font(.system(size: model.calculatingProportionalValue(withRatio: 0.0825, shouldResizeForCoverArt: true))) .fontWeight(.thin) .rotationEffect(.degrees(100)) .offset(hairOffset) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index 9c8aa7d..20ff197 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -31,7 +31,7 @@ struct ImWearingPantsArtView: View { if $0 == .pants { AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } else if currentPose.isFinished { - SymbolArtDisplayView(shouldResizeForCoverImage: false, element: $0.value) + SymbolArtDisplayView(shouldResizeForCoverArt: false, element: $0.value) .transition(.symbolEffect(.appear)) } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift index f29dd53..2821597 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift @@ -64,11 +64,11 @@ class ArtWorkModel { /// /// - Parameters: /// - ratio: The ratio used for calculation. - /// - shouldResizeForCoverImage: A Boolean value indicating whether the value should be adjusted for cover images. Default is false. + /// - shouldResizeForCoverImage: A Boolean value indicating whether the value should be adjusted for cover arts. Default is false. /// - Returns: The calculated proportional value. - func calculatingProportionalValue(withRatio ratio: CGFloat, shouldResizeForCoverImage: Bool = false) -> CGFloat { + func calculatingProportionalValue(withRatio ratio: CGFloat, shouldResizeForCoverArt: Bool = false) -> CGFloat { - if shouldResizeForCoverImage { + if shouldResizeForCoverArt { return (galleryColumnLength - galleryColumnSpacing) * ratio } return baseLength * ratio diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift index 13bf7ac..25c9dcf 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/AnimatableSymbolView/SymbolArtDisplayView.swift @@ -10,11 +10,11 @@ import SwiftUI struct SymbolArtDisplayView: View { @Environment(ArtWorkModel.self) var model - let shouldResizeForCoverImage: Bool + let shouldResizeForCoverArt: Bool let element: SymbolArtElement - init(shouldResizeForCoverImage: Bool = true, element: SymbolArtElement) { - self.shouldResizeForCoverImage = shouldResizeForCoverImage + init(shouldResizeForCoverArt: Bool = true, element: SymbolArtElement) { + self.shouldResizeForCoverArt = shouldResizeForCoverArt self.element = element } @@ -26,11 +26,11 @@ struct SymbolArtDisplayView: View { .frame( width: model.calculatingProportionalValue( withRatio: element.widthRatio, - shouldResizeForCoverImage: shouldResizeForCoverImage + shouldResizeForCoverArt: shouldResizeForCoverArt ), height: model.calculatingProportionalValue( withRatio: element.heightRatio, - shouldResizeForCoverImage: shouldResizeForCoverImage + shouldResizeForCoverArt: shouldResizeForCoverArt ) ) .rotationEffect(.degrees(element.rotationDegrees)) @@ -38,11 +38,11 @@ struct SymbolArtDisplayView: View { .offset( x: model.calculatingProportionalValue( withRatio: element.horizontalOffsetRatio, - shouldResizeForCoverImage: shouldResizeForCoverImage + shouldResizeForCoverArt: shouldResizeForCoverArt ), y: model.calculatingProportionalValue( withRatio: element.verticalOffsetRatio, - shouldResizeForCoverImage: shouldResizeForCoverImage + shouldResizeForCoverArt: shouldResizeForCoverArt ) ) .zIndex(element.zIndex) @@ -54,7 +54,7 @@ struct SymbolArtDisplayView: View { SymbolArtDisplayView(element: AfroBoyArtView.Element.face.value) SymbolArtDisplayView( - shouldResizeForCoverImage: false, + shouldResizeForCoverArt: false, element: AfroBoyArtView.Element.face.value ) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift index 818970a..408f144 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift @@ -51,7 +51,7 @@ struct GalleryGridItemView: View { } #Preview { - AfroBoyPreviewView() + AfroBoyArtView.CoverArt() .environment(ArtWorkModel.preview) .galleryGridItemView(length: 1024 / 4) } From 041c5e5375177ce0339de56dd72fbae9f8cad340 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sat, 10 Feb 2024 07:59:11 +0900 Subject: [PATCH 084/108] Refactor ImWearingPants directory --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 14 +++----------- .../ImWearingPantsArtView+FaceElement.swift | 0 .../ImWearingPantsArtView+FinishPoseElement.swift | 0 .../{Element => }/ImWearingPantsArtView+Pose.swift | 0 4 files changed, 3 insertions(+), 11 deletions(-) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/{Element => }/ImWearingPantsArtView+FaceElement.swift (100%) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/{Element => }/ImWearingPantsArtView+FinishPoseElement.swift (100%) rename SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/{Element => }/ImWearingPantsArtView+Pose.swift (100%) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 371bc03..0f94211 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -265,16 +265,6 @@ path = PartyAnimals; sourceTree = ""; }; - 9767DF202B762EF300457DA1 /* Element */ = { - isa = PBXGroup; - children = ( - 9767DF1E2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift */, - 9767DF1A2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift */, - 9767DF1C2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift */, - ); - path = Element; - sourceTree = ""; - }; 9767DF212B7658CB00457DA1 /* ArmHair */ = { isa = PBXGroup; children = ( @@ -443,8 +433,10 @@ isa = PBXGroup; children = ( 97EF43942B72DA69003648F5 /* ImWearingPantsArtView.swift */, - 9767DF202B762EF300457DA1 /* Element */, 97EF43922B72D3E2003648F5 /* ImWearingPantsArtView+CoverArt.swift */, + 9767DF1E2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift */, + 9767DF1A2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift */, + 9767DF1C2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift */, ); path = ImWearingPants; sourceTree = ""; diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+FaceElement.swift similarity index 100% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FaceElement.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+FaceElement.swift diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+FinishPoseElement.swift similarity index 100% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+FinishPoseElement.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+FinishPoseElement.swift diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+Pose.swift similarity index 100% rename from SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/Element/ImWearingPantsArtView+Pose.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView+Pose.swift From a9372bd42535c68079fc3808218ea40e2dd5ac79 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sat, 10 Feb 2024 18:48:20 +0900 Subject: [PATCH 085/108] Fix mistaken offset y --- .../Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift index dcaea57..6c5ccfd 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel+InitialSymbolRow.swift @@ -50,7 +50,7 @@ extension ArtWorkModel { case .none: 0 case .first: - 0.63 + 0.18 case .second: 0.34 case .third: From 0908ddc35d69744489e238a3ed551e45135e511b Mon Sep 17 00:00:00 2001 From: littleossa Date: Sun, 11 Feb 2024 05:34:09 +0900 Subject: [PATCH 086/108] Add DemonWrestler --- .../project.pbxproj | 14 +- .../ArtGalleryView.swift | 7 + .../Body/DemonWrestlerBody.swift | 0 .../Body/DemonWrestlerHand.swift | 0 .../DemonWrestler/DemonWrestler.swift | 3 +- .../DemonWrestlerArtView+CoverArt.swift | 27 ++ .../DemonWrestlerArtView+Element.swift | 356 ++++++++++++++++++ .../DemonWrestler/DemonWrestlerArtView.swift | 41 ++ .../Face/DemonWrestlerFace.swift | 0 .../Face/DemonWrestlerOutline.swift | 3 +- 10 files changed, 448 insertions(+), 3 deletions(-) rename SFSymbolsArtCollection/{ => ArtisticWorldOfSFSymbols}/ArtWorks/DemonWrestler/Body/DemonWrestlerBody.swift (100%) rename SFSymbolsArtCollection/{ => ArtisticWorldOfSFSymbols}/ArtWorks/DemonWrestler/Body/DemonWrestlerHand.swift (100%) rename SFSymbolsArtCollection/{ => ArtisticWorldOfSFSymbols}/ArtWorks/DemonWrestler/DemonWrestler.swift (95%) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView+CoverArt.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView+Element.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView.swift rename SFSymbolsArtCollection/{ => ArtisticWorldOfSFSymbols}/ArtWorks/DemonWrestler/Face/DemonWrestlerFace.swift (100%) rename SFSymbolsArtCollection/{ => ArtisticWorldOfSFSymbols}/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift (96%) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 0f94211..96ac458 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -43,6 +43,9 @@ 9767DF232B7658E200457DA1 /* ArmHairArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF222B7658E200457DA1 /* ArmHairArtView+CoverArt.swift */; }; 9767DF252B76C9BE00457DA1 /* ArmHairArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF242B76C9BE00457DA1 /* ArmHairArtView.swift */; }; 9767DF272B76CCE300457DA1 /* ArmHairArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF262B76CCE300457DA1 /* ArmHairArtView+Element.swift */; }; + 9767DF292B76FF0400457DA1 /* DemonWrestlerArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF282B76FF0400457DA1 /* DemonWrestlerArtView.swift */; }; + 9767DF2B2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF2A2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift */; }; + 9767DF2D2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF2C2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -110,6 +113,9 @@ 9767DF222B7658E200457DA1 /* ArmHairArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArmHairArtView+CoverArt.swift"; sourceTree = ""; }; 9767DF242B76C9BE00457DA1 /* ArmHairArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArmHairArtView.swift; sourceTree = ""; }; 9767DF262B76CCE300457DA1 /* ArmHairArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArmHairArtView+Element.swift"; sourceTree = ""; }; + 9767DF282B76FF0400457DA1 /* DemonWrestlerArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestlerArtView.swift; sourceTree = ""; }; + 9767DF2A2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DemonWrestlerArtView+CoverArt.swift"; sourceTree = ""; }; + 9767DF2C2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DemonWrestlerArtView+Element.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -187,6 +193,9 @@ 9748BE4428980FE4006DF0BE /* DemonWrestler */ = { isa = PBXGroup; children = ( + 9767DF282B76FF0400457DA1 /* DemonWrestlerArtView.swift */, + 9767DF2C2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift */, + 9767DF2A2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift */, 9748BE4528981011006DF0BE /* DemonWrestler.swift */, 97624C3428C74A41004E1720 /* Face */, 97624C3528C74A50004E1720 /* Body */, @@ -239,7 +248,6 @@ children = ( 9748BE6528A395D5006DF0BE /* ArtWork.swift */, 9748BE55289DCB82006DF0BE /* Fireworks */, - 9748BE4428980FE4006DF0BE /* DemonWrestler */, 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */, ); path = ArtWorks; @@ -324,6 +332,7 @@ 9767DEF82B751C1300457DA1 /* WorldPeace */, 9767DF012B759AFC00457DA1 /* PartyAnimals */, 9767DF212B7658CB00457DA1 /* ArmHair */, + 9748BE4428980FE4006DF0BE /* DemonWrestler */, 97AD531E2B70E2770034FB5D /* AfroBoy */, 97EF43892B725DE7003648F5 /* Nosebleed */, 97EF43912B72D3AF003648F5 /* ImWearingPants */, @@ -543,7 +552,9 @@ 97EF43932B72D3E2003648F5 /* ImWearingPantsArtView+CoverArt.swift in Sources */, 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, + 9767DF2B2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift in Sources */, 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, + 9767DF2D2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift in Sources */, 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */, 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */, 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, @@ -567,6 +578,7 @@ 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, 9767DF272B76CCE300457DA1 /* ArmHairArtView+Element.swift in Sources */, + 9767DF292B76FF0400457DA1 /* DemonWrestlerArtView.swift in Sources */, 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */, 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */, 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 0a7715c..d68a5b4 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -75,6 +75,13 @@ struct ArtGalleryView: View { .galleryGridItemView(length: model.galleryColumnLength) } + NavigationLink { + DemonWrestlerArtView() + } label: { + DemonWrestlerArtView.CoverArt() + .galleryGridItemView(length: model.galleryColumnLength) + } + NavigationLink { AfroBoyArtView() } label: { diff --git a/SFSymbolsArtCollection/ArtWorks/DemonWrestler/Body/DemonWrestlerBody.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerBody.swift similarity index 100% rename from SFSymbolsArtCollection/ArtWorks/DemonWrestler/Body/DemonWrestlerBody.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerBody.swift diff --git a/SFSymbolsArtCollection/ArtWorks/DemonWrestler/Body/DemonWrestlerHand.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerHand.swift similarity index 100% rename from SFSymbolsArtCollection/ArtWorks/DemonWrestler/Body/DemonWrestlerHand.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerHand.swift diff --git a/SFSymbolsArtCollection/ArtWorks/DemonWrestler/DemonWrestler.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestler.swift similarity index 95% rename from SFSymbolsArtCollection/ArtWorks/DemonWrestler/DemonWrestler.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestler.swift index 1fd2a17..519fb96 100644 --- a/SFSymbolsArtCollection/ArtWorks/DemonWrestler/DemonWrestler.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestler.swift @@ -32,7 +32,8 @@ struct DemonWrestler: View { .offset(x: baseLength * -0.1875, y: baseLength * -0.465) } - .position(proxy.localCenter) + .scaleEffect(0.8) + .offset(y: 100) } } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView+CoverArt.swift new file mode 100644 index 0000000..a4edb6b --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView+CoverArt.swift @@ -0,0 +1,27 @@ +// +// DemonWrestlerArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension DemonWrestlerArtView { + + struct CoverArt: View { + + var body: some View { + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + } + } + } +} + +#Preview { + DemonWrestlerArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView+Element.swift new file mode 100644 index 0000000..664ecbc --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView+Element.swift @@ -0,0 +1,356 @@ +// +// DemonWrestlerArtView+Element.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension DemonWrestlerArtView { + + enum Element: String, CaseIterable, Identifiable { + case body + case neck + case pants + case handRight + case handLeft + case hornRight + case hornLeft + case handGloveRight + case handGloveLeft + case hat + case outlineFrame + case outline + case hatCenterTip + case numberFour + case eyeBagRight + case eyeBagLeft + case eyeFrameRight + case eyeFrameLeft + case eyeRight + case eyeLeft + case nose + case mouth + case mouthFrame + case scar + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .body: + SymbolArtElement( + symbol: "􀝻", + name: "figure.wave", + initialPosition: .first(.first), + primaryColor: .paleOrange, + widthRatio: 0.6, + heightRatio: 0.84, + symbolCountToWaitFor: 0) + case .neck: + SymbolArtElement( + symbol: "􀡸", + name: "powerplug.fill", + initialPosition: .first(.second), + primaryColor: .paleOrange, + widthRatio: 0.2, + heightRatio: 0.3, + rotationDegrees: 90, + horizontalOffsetRatio: 0.03, + verticalOffsetRatio: -0.18, + symbolCountToWaitFor: 1) + case .pants: + SymbolArtElement( + symbol: "􀒋", + name: "pencil.tip", + initialPosition: .first(.third), + primaryColor: .black, + widthRatio: 0.2, + heightRatio: 0.35, + rotationDegrees: 180, + horizontalOffsetRatio: 0.02, + verticalOffsetRatio: -0.047, + symbolCountToWaitFor: 2) + case .handRight: + SymbolArtElement( + symbol: "􁗪", + name: "hand.raised.fingers.spread.fill", + initialPosition: .second(.fourth), + primaryColor: .black, + widthRatio: 0.14, + heightRatio: 0.1375, + horizontalOffsetRatio: -0.235, + verticalOffsetRatio: -0.48, + symbolCountToWaitFor: 3) + + case .handLeft: + SymbolArtElement( + symbol: "􁗪", + name: "hand.raised.fingers.spread.fill", + initialPosition: .second(.fourth), + primaryColor: .black, + widthRatio: 0.14, + heightRatio: 0.1375, + rotationDegrees: 180, + horizontalOffsetRatio: 0.23, + verticalOffsetRatio: 0.19, + symbolCountToWaitFor: 3) + + case .hornRight: + SymbolArtElement( + symbol: "􀒘", + name: "bolt.horizontal.fill", + initialPosition: .second(.fifth), + primaryColor: .red, + widthRatio: 0.17, + heightRatio: 0.2, + rotationDegrees: 138, + flip: .vertical, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: -0.44, + symbolCountToWaitFor: 4) + + case .hornLeft: + SymbolArtElement( + symbol: "􀒘", + name: "bolt.horizontal.fill", + initialPosition: .second(.fifth), + primaryColor: .red, + widthRatio: 0.17, + heightRatio: 0.2, + rotationDegrees: 138, + horizontalOffsetRatio: 0.16, + verticalOffsetRatio: -0.44, + symbolCountToWaitFor: 4) + + case .handGloveRight: + SymbolArtElement( + symbol: "􀳈", + name: "cone.fill", + initialPosition: .second(.sixth), + primaryColor: .black, + widthRatio: 0.14, + heightRatio: 0.2, + horizontalOffsetRatio: -0.24, + verticalOffsetRatio: -0.39, + symbolCountToWaitFor: 5) + + case .handGloveLeft: + SymbolArtElement( + symbol: "􀳈", + name: "cone.fill", + initialPosition: .second(.sixth), + primaryColor: .black, + widthRatio: 0.14, + heightRatio: 0.2, + rotationDegrees: 180, + horizontalOffsetRatio: 0.235, + verticalOffsetRatio: 0.1, + symbolCountToWaitFor: 5) + + case .hat: + SymbolArtElement( + symbol: "􀙧", + name: "shield.fill", + initialPosition: .second(.seventh), + primaryColor: .black, + widthRatio: 0.3, + heightRatio: 0.3, + rotationDegrees: 180, + horizontalOffsetRatio: 0.018, + verticalOffsetRatio: -0.4, + symbolCountToWaitFor: 6) + + case .outlineFrame: + SymbolArtElement( + symbol: "􀧶", + name: "capsule.portrait", + initialPosition: .second(.second), + primaryColor: .black.opacity(0.3), + fontWeight: .ultraLight, + widthRatio: 0.19, + heightRatio: 0.26, + horizontalOffsetRatio: 0.018, + verticalOffsetRatio: -0.296, + symbolCountToWaitFor: 7) + + case .outline: + SymbolArtElement( + symbol: "􀧷", + name: "capsule.portrait.fill", + initialPosition: .second(.third), + primaryColor: .paleOrange, + fontWeight: .ultraLight, + widthRatio: 0.2025, + heightRatio: 0.26, + horizontalOffsetRatio: 0.018, + verticalOffsetRatio: -0.3, + symbolCountToWaitFor: 7) + + case .hatCenterTip: + SymbolArtElement( + symbol: "􀙧", + name: "shield.fill", + initialPosition: .second(.seventh), + primaryColor: .black, + widthRatio: 0.14, + heightRatio: 0.18, + horizontalOffsetRatio: 0.018, + verticalOffsetRatio: -0.44, + symbolCountToWaitFor: 6) + + case .numberFour: + SymbolArtElement( + symbol: "􀘘", + name: "4.alt.circle.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.first), + primaryColor: .red, + secondaryColor: .black, + widthRatio: 0.12, + heightRatio: 0.12, + horizontalOffsetRatio: 0.018, + verticalOffsetRatio: -0.45, + symbolCountToWaitFor: 8) + + case .eyeBagRight: + SymbolArtElement( + symbol: "􁹩", + name: "lightspectrum.horizontal", + initialPosition: .third(.second), + primaryColor: .indigo, + widthRatio: 0.05, + heightRatio: 0.038, + horizontalOffsetRatio: 0.058, + verticalOffsetRatio: -0.32, + symbolCountToWaitFor: 9) + + case .eyeBagLeft: + SymbolArtElement( + symbol: "􁹩", + name: "lightspectrum.horizontal", + initialPosition: .third(.second), + primaryColor: .indigo, + widthRatio: 0.05, + heightRatio: 0.038, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.32, + symbolCountToWaitFor: 9) + + case .eyeFrameRight: + SymbolArtElement( + symbol: "􀋭", + name: "eye", + initialPosition: .third(.third), + primaryColor: .black, + widthRatio: 0.05, + heightRatio: 0.025, + horizontalOffsetRatio: 0.058, + verticalOffsetRatio: -0.328, + symbolCountToWaitFor: 10) + + case .eyeFrameLeft: + SymbolArtElement( + symbol: "􀋭", + name: "eye", + initialPosition: .third(.third), + primaryColor: .black, + widthRatio: 0.05, + heightRatio: 0.025, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.328, + symbolCountToWaitFor: 10) + + case .eyeRight: + SymbolArtElement( + symbol: "􀋮", + name: "eye.fill", + initialPosition: .third(.fourth), + primaryColor: .white, + widthRatio: 0.05, + heightRatio: 0.025, + horizontalOffsetRatio: 0.058, + verticalOffsetRatio: -0.328, + symbolCountToWaitFor: 10) + + case .eyeLeft: + SymbolArtElement( + symbol: "􀋮", + name: "eye.fill", + initialPosition: .third(.fourth), + primaryColor: .white, + widthRatio: 0.05, + heightRatio: 0.025, + horizontalOffsetRatio: -0.03, + verticalOffsetRatio: -0.328, + symbolCountToWaitFor: 10) + + case .nose: + SymbolArtElement( + symbol: "􀨯", + name: "nose", + initialPosition: .third(.fifth), + primaryColor: .black, + fontWeight: .thin, + widthRatio: 0.05, + heightRatio: 0.05, + horizontalOffsetRatio: 0.018, + verticalOffsetRatio: -0.28, + symbolCountToWaitFor: 11) + + case .mouth: + SymbolArtElement( + symbol: "􀦪", + name: "mouth.fill", + initialPosition: .third(.sixth), + primaryColor: .red, + fontWeight: .thin, + widthRatio: 0.07, + heightRatio: 0.03, + horizontalOffsetRatio: 0.018, + verticalOffsetRatio: -0.21, + symbolCountToWaitFor: 12) + + case .mouthFrame: + SymbolArtElement( + symbol: "􀦩", + name: "mouth", + initialPosition: .third(.seventh), + primaryColor: .black, + fontWeight: .thin, + widthRatio: 0.07, + heightRatio: 0.03, + horizontalOffsetRatio: 0.018, + verticalOffsetRatio: -0.21, + symbolCountToWaitFor: 12) + + case .scar: + SymbolArtElement( + symbol: "􀜟", + name: "waveform.path.ecg", + initialPosition: .second(.first), + primaryColor: .indigo, + fontWeight: .thin, + widthRatio: 0.05, + heightRatio: 0.03, + rotationDegrees: -15, + horizontalOffsetRatio: 0.07, + verticalOffsetRatio: -0.248, + symbolCountToWaitFor: 13) + } + } + } +} + +#Preview { + NavigationStack { + DemonWrestlerArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + DemonWrestlerArtView.CoverArt() + .environment(ArtWorkModel.preview) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView.swift new file mode 100644 index 0000000..3040c46 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView.swift @@ -0,0 +1,41 @@ +// +// DemonWrestlerArtView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +struct DemonWrestlerArtView: View { + + @State private var isAnimating = false + + var body: some View { + ZStack { + ForEach(Element.allCases) { + AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) + } + } + .navigationTitle("Demon wrestler") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + } +} + +#Preview { + NavigationStack { + DemonWrestlerArtView() + .environment(ArtWorkModel.preview) + } +} diff --git a/SFSymbolsArtCollection/ArtWorks/DemonWrestler/Face/DemonWrestlerFace.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerFace.swift similarity index 100% rename from SFSymbolsArtCollection/ArtWorks/DemonWrestler/Face/DemonWrestlerFace.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerFace.swift diff --git a/SFSymbolsArtCollection/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift similarity index 96% rename from SFSymbolsArtCollection/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift rename to SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift index 50c7774..4689bfa 100644 --- a/SFSymbolsArtCollection/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift @@ -62,7 +62,8 @@ struct DemonWrestlerOutline: View { fontWeight: .bold) Image(symbol: ._4AltCircleFill) - .arrangeShape(fontSize: baseLength * 0.15, + .arrangeShape(color: .blue, + fontSize: baseLength * 0.15, fontWeight: .bold) } .offset(x: 0, y: baseLength * -0.175) From 5633516418a65d47cabf23dc15cc566ffbb5fb66 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sun, 11 Feb 2024 05:35:00 +0900 Subject: [PATCH 087/108] Remove old demon wrestler --- .../project.pbxproj | 36 ------- .../Body/DemonWrestlerBody.swift | 87 ----------------- .../Body/DemonWrestlerHand.swift | 62 ------------ .../DemonWrestler/DemonWrestler.swift | 45 --------- .../Face/DemonWrestlerFace.swift | 70 -------------- .../Face/DemonWrestlerOutline.swift | 94 ------------------- 6 files changed, 394 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerBody.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerHand.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestler.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerFace.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 96ac458..501a11a 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -11,11 +11,6 @@ 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */; }; 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */; }; 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1F28939B04006DF0BE /* FlipType.swift */; }; - 9748BE4628981011006DF0BE /* DemonWrestler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4528981011006DF0BE /* DemonWrestler.swift */; }; - 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4728981096006DF0BE /* DemonWrestlerFace.swift */; }; - 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4928995877006DF0BE /* DemonWrestlerOutline.swift */; }; - 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4B28995A43006DF0BE /* DemonWrestlerBody.swift */; }; - 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE4F289AB439006DF0BE /* DemonWrestlerHand.swift */; }; 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE56289DCBB0006DF0BE /* LargeFirework.swift */; }; 9748BE59289DCE17006DF0BE /* Fireworks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE58289DCE17006DF0BE /* Fireworks.swift */; }; 9748BE5D289DD696006DF0BE /* Building.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE5C289DD696006DF0BE /* Building.swift */; }; @@ -80,11 +75,6 @@ 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithFont.swift; sourceTree = ""; }; 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithWidthAndHeight.swift; sourceTree = ""; }; 9748BE1F28939B04006DF0BE /* FlipType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlipType.swift; sourceTree = ""; }; - 9748BE4528981011006DF0BE /* DemonWrestler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestler.swift; sourceTree = ""; }; - 9748BE4728981096006DF0BE /* DemonWrestlerFace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestlerFace.swift; sourceTree = ""; }; - 9748BE4928995877006DF0BE /* DemonWrestlerOutline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestlerOutline.swift; sourceTree = ""; }; - 9748BE4B28995A43006DF0BE /* DemonWrestlerBody.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestlerBody.swift; sourceTree = ""; }; - 9748BE4F289AB439006DF0BE /* DemonWrestlerHand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestlerHand.swift; sourceTree = ""; }; 9748BE56289DCBB0006DF0BE /* LargeFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LargeFirework.swift; sourceTree = ""; }; 9748BE58289DCE17006DF0BE /* Fireworks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fireworks.swift; sourceTree = ""; }; 9748BE5C289DD696006DF0BE /* Building.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Building.swift; sourceTree = ""; }; @@ -196,9 +186,6 @@ 9767DF282B76FF0400457DA1 /* DemonWrestlerArtView.swift */, 9767DF2C2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift */, 9767DF2A2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift */, - 9748BE4528981011006DF0BE /* DemonWrestler.swift */, - 97624C3428C74A41004E1720 /* Face */, - 97624C3528C74A50004E1720 /* Body */, ); path = DemonWrestler; sourceTree = ""; @@ -225,24 +212,6 @@ path = Buildings; sourceTree = ""; }; - 97624C3428C74A41004E1720 /* Face */ = { - isa = PBXGroup; - children = ( - 9748BE4728981096006DF0BE /* DemonWrestlerFace.swift */, - 9748BE4928995877006DF0BE /* DemonWrestlerOutline.swift */, - ); - path = Face; - sourceTree = ""; - }; - 97624C3528C74A50004E1720 /* Body */ = { - isa = PBXGroup; - children = ( - 9748BE4B28995A43006DF0BE /* DemonWrestlerBody.swift */, - 9748BE4F289AB439006DF0BE /* DemonWrestlerHand.swift */, - ); - path = Body; - sourceTree = ""; - }; 97624C3628C74AA0004E1720 /* ArtWorks */ = { isa = PBXGroup; children = ( @@ -557,7 +526,6 @@ 9767DF2D2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift in Sources */, 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */, 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */, - 9748BE4828981096006DF0BE /* DemonWrestlerFace.swift in Sources */, 97AD532D2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift in Sources */, 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, @@ -583,7 +551,6 @@ 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */, 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */, - 9748BE50289AB439006DF0BE /* DemonWrestlerHand.swift in Sources */, 9767DF232B7658E200457DA1 /* ArmHairArtView+CoverArt.swift in Sources */, 9767DF1D2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift in Sources */, 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */, @@ -600,15 +567,12 @@ 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */, 97EF43A12B74CA38003648F5 /* CrayonBoyArtView+CoverArt.swift in Sources */, - 9748BE4A28995877006DF0BE /* DemonWrestlerOutline.swift in Sources */, 97EF43902B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift in Sources */, 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */, 9767DF0F2B75DFB400457DA1 /* SymbolArtDisplayView.swift in Sources */, 9767DF252B76C9BE00457DA1 /* ArmHairArtView.swift in Sources */, - 9748BE4C28995A43006DF0BE /* DemonWrestlerBody.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */, - 9748BE4628981011006DF0BE /* DemonWrestler.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerBody.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerBody.swift deleted file mode 100644 index fc3e014..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerBody.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// ElectricMagneticWaveManBody.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/02. -// - -import SwiftUI - -struct DemonWrestlerBody: View { - - let baseLength: CGFloat - let skinColor: Color = .paleOrange - - var body: some View { - ZStack { - - Image(symbol: .figureWave) - .arrangeShape(color: skinColor, - fontSize: baseLength * 0.825) - - Image(symbol: .powerplugFill) - .arrangeShape(color: skinColor, - fontSize: baseLength * 0.1875, - fontWeight: .bold, - rotationDegrees: -90, - offsetX: baseLength * 0.0275, - offsetY: baseLength * -0.19) - - Image(symbol: .locationFill) - .arrangeShape(fontSize: baseLength * 0.125, - rotationDegrees: -132, - offsetX: baseLength * 0.02, - offsetY: baseLength * 0.04) - - Group { - Image(symbol: .minus) - .arrangeShape(fontSize: baseLength * 0.15, - fontWeight: .bold, - rotationDegrees: 70, - offsetX: baseLength * 0.065, - offsetY: baseLength * -0.025) - - Image(symbol: .minus) - .arrangeShape(fontSize: baseLength * 0.15, - fontWeight: .bold, - rotationDegrees: 75, - offsetX: baseLength * 0.096, - offsetY: baseLength * -0.125) - - Image(symbol: .minus) - .arrangeShape(fontSize: baseLength * 0.1025, - fontWeight: .black, - rotationDegrees: 80, - offsetX: baseLength * 0.1143, - offsetY: baseLength * -0.2) - - Image(symbol: .minus) - .arrangeShape(fontSize: baseLength * 0.15, - fontWeight: .bold, - rotationDegrees: -70, - offsetX: baseLength * -0.0225, - offsetY: baseLength * -0.025) - - Image(symbol: .minus) - .arrangeShape(fontSize: baseLength * 0.15, - fontWeight: .bold, - rotationDegrees: -75, - offsetX: baseLength * -0.0525, - offsetY: baseLength * -0.125) - - Image(symbol: .minus) - .arrangeShape(fontSize: baseLength * 0.1025, - fontWeight: .black, - rotationDegrees: -80, - offsetX: baseLength * -0.07, - offsetY: baseLength * -0.2) - } - } - } -} - -struct DemonWrestlerBody_Previews: PreviewProvider { - static var previews: some View { - DemonWrestlerBody(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerHand.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerHand.swift deleted file mode 100644 index e252105..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Body/DemonWrestlerHand.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// ElectricMagneticWaveLeftHand.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/03. -// - -import SwiftUI - -struct DemonWrestlerHand: View { - - enum HandType { - case left - case right - - var appearance: HandAppearance { - switch self { - case .left: - return HandAppearance(coneFlipType: .vertical, - handFlipType: .horizontalAndVertical, - offsetYMagnification: 0.0875) - case .right: - return HandAppearance(coneFlipType: .none, - handFlipType: .none, - offsetYMagnification: -0.0875) - } - } - - struct HandAppearance { - let coneFlipType: FlipType - let handFlipType: FlipType - let offsetYMagnification: CGFloat - } - } - - let type: HandType - let baseLength: CGFloat - - var body: some View { - ZStack { - Image(symbol: .coneFill) - .arrangeShape(width: baseLength * 0.1125, - height: baseLength * 0.2, - flipType: type.appearance.coneFlipType) - - Image(symbol: .handRaisedFill) - .arrangeShape(fontSize: baseLength * 0.1375, - flipType: type.appearance.handFlipType, - offsetY: baseLength * type.appearance.offsetYMagnification) - } - } -} - -struct DemonWrestlerHand_Previews: PreviewProvider { - static var previews: some View { - DemonWrestlerHand(type: .left, - baseLength: 400) - - DemonWrestlerHand(type: .right, - baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestler.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestler.swift deleted file mode 100644 index 519fb96..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestler.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// ElectroMagneticWaveMan.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/01. -// - -import SwiftUI -import SFUserFriendlySymbols - -struct DemonWrestler: View { - - var body: some View { - - GeometryReader { proxy in - let baseLength = proxy.baseLength * 1.2 - - ZStack { - DemonWrestlerBody(baseLength: baseLength) - - DemonWrestlerHand(type: .left, - baseLength: baseLength) - .offset(x: baseLength * 0.19, - y: baseLength * 0.14) - - DemonWrestlerFace(baseLength: baseLength) - .offset(x: baseLength * 0.025, - y: baseLength * -0.325) - - DemonWrestlerHand(type: .right, - baseLength: baseLength) - .offset(x: baseLength * -0.1875, - y: baseLength * -0.465) - } - .scaleEffect(0.8) - .offset(y: 100) - } - } -} - -struct DemonWrestler_Previews: PreviewProvider { - static var previews: some View { - DemonWrestler() - } -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerFace.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerFace.swift deleted file mode 100644 index 6c6ce09..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerFace.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// ElectroMagneticWaveManFace.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/01. -// - -import SwiftUI -import SFUserFriendlySymbols - -struct DemonWrestlerFace: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - DemonWrestlerOutline(baseLength: baseLength) - - VStack(spacing: 1) { - HStack(spacing: 5) { - - ForEach(0..<2) { _ in - ZStack { - Image(symbol: .capsuleFill) - .arrangeShape(color: .indigo, - fontSize: baseLength * 0.033, - offsetY: baseLength * 0.005) - - Image(symbol: .eye) - .arrangeShape(fontSize: baseLength * 0.035) - - Image(symbol: .eyeFill) - .arrangeShape(color: .white, - fontSize: baseLength * 0.031) - } - } - } - - Image(symbol: .nose) - .arrangeShape(fontSize: baseLength * 0.05, - fontWeight: .thin) - - Spacer() - .frame(height: 8) - - ZStack { - Image(symbol: .mouth) - .arrangeShape(fontSize: baseLength * 0.05, - fontWeight: .bold) - - Image(symbol: .mouthFill) - .arrangeShape(color: .red, - fontSize: baseLength * 0.05) - } - } - - Image(symbol: .waveformPath) - .arrangeShape(color: .red, - fontSize: 20, - rotationDegrees: 45, - offsetX: 25) - } - } -} - -struct DemonWrestlerFace_Previews: PreviewProvider { - static var previews: some View { - DemonWrestlerFace(baseLength: 400) - } -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift deleted file mode 100644 index 4689bfa..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/Face/DemonWrestlerOutline.swift +++ /dev/null @@ -1,94 +0,0 @@ -// -// ElectroMagneticWaveOutline.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/02. -// - -import SwiftUI - -struct DemonWrestlerOutline: View { - - let baseLength: CGFloat - - var body: some View { - ZStack { - - // Hat - Group { - - // horns - Group { - Image(symbol: .boltHorizontalFill) - .arrangeShape(color: .red, - fontSize: baseLength * 0.2, - rotationDegrees: 55, - offsetX: baseLength * 0.15, - offsetY: baseLength * -0.2) - - Image(symbol: .boltHorizontal) - .arrangeShape(fontSize: baseLength * 0.25, - fontWeight: .light, - rotationDegrees: 55, - offsetX: baseLength * 0.14, - offsetY: baseLength * -0.19) - - Image(symbol: .boltHorizontalFill) - .arrangeShape(color: .red, - fontSize: baseLength * 0.2, - flipType: .vertical, - rotationDegrees: -55, - offsetX: baseLength * -0.15, - offsetY: baseLength * -0.2) - - Image(symbol: .boltHorizontal) - .arrangeShape(fontSize: baseLength * 0.25, - fontWeight: .light, - flipType: .vertical, - rotationDegrees: -55, - offsetX: baseLength * -0.14, - offsetY: baseLength * -0.19) - } - - Image(symbol: .shieldFill) - .arrangeShape(fontSize: baseLength * 0.375, - flipType: .vertical, - offsetY: baseLength * -0.1) - - ZStack { - Image(symbol: .circleFill) - .arrangeShape(color: .red, - fontSize: baseLength * 0.1, - fontWeight: .bold) - - Image(symbol: ._4AltCircleFill) - .arrangeShape(color: .blue, - fontSize: baseLength * 0.15, - fontWeight: .bold) - } - .offset(x: 0, y: baseLength * -0.175) - } - - ZStack { - Image(symbol: .capsulePortrait) - .arrangeShape(fontSize: baseLength * 0.2025, - fontWeight: .light) - - Image(symbol: .capsulePortraitFill) - .arrangeShape(color: .paleOrange, - fontSize: baseLength * 0.2) - } - - Image(symbol: .chevronCompactDown) - .arrangeShape(fontSize: baseLength * 0.2, - fontWeight: .bold, - offsetY: baseLength * -0.1175) - } - } -} - -struct DemonWrestlerOutline_Previews: PreviewProvider { - static var previews: some View { - DemonWrestlerOutline(baseLength: 400) - } -} From cfa445d40fd47bd0d3fb5406b8a501e7c8007f92 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sun, 11 Feb 2024 06:01:31 +0900 Subject: [PATCH 088/108] Add question mark to Crayonboy --- .../Fireworks/Buildings/Building.swift | 14 ++-- .../ArtWorks/Fireworks/Fireworks.swift | 18 ++--- .../ArtWorks/Fireworks/LargeFirework.swift | 66 +++++++++---------- .../ArtWorks/Fireworks/MediumFirework.swift | 22 +++---- .../ArtWorks/Fireworks/RocketFirework.swift | 46 ++++++------- .../ArtWorks/Fireworks/SmallFirework.swift | 11 ++-- .../iOSDCJapan2022/iOSDCJapan2022Logo.swift | 6 +- .../CrayonBoy/CrayonBoyArtView+CoverArt.swift | 31 ++++++++- 8 files changed, 122 insertions(+), 92 deletions(-) diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Building.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Building.swift index af79cf7..7bdf28b 100644 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Building.swift +++ b/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Building.swift @@ -17,13 +17,13 @@ struct Building: View { ZStack { - Image(symbol: .rectanglePortraitFill) - .arrangeShape(color: lightColor, - fontSize: fontSize * 0.9) - - Image(symbol: .buildingFill) - .arrangeShape(color: color, - fontSize: fontSize) +// Image(symbol: .rectanglePortraitFill) +// .arrangeShape(color: lightColor, +// fontSize: fontSize * 0.9) +// +// Image(symbol: .buildingFill) +// .arrangeShape(color: color, +// fontSize: fontSize) } } } diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift index 6ff42b1..2bbcbc1 100644 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift +++ b/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift @@ -17,10 +17,10 @@ struct Fireworks: View { // Background ZStack { - Image(symbol: .rectangleFill) - .arrangeShape(color: .midnightNavy, - width: proxy.size.width * 1.5, - height: proxy.size.height * 1.5) +// Image(symbol: .rectangleFill) +// .arrangeShape(color: .midnightNavy, +// width: proxy.size.width * 1.5, +// height: proxy.size.height * 1.5) } .position(proxy.localCenter) @@ -91,11 +91,11 @@ struct Fireworks: View { HStack(spacing: 0) { - // Audience - ForEach(0..<4) { _ in - Image(symbol: .person3SequenceFill) - .arrangeShape(fontSize: baseLength * 0.13) - } +// // Audience +// ForEach(0..<4) { _ in +// Image(symbol: .person3SequenceFill) +// .arrangeShape(fontSize: baseLength * 0.13) +// } } } } diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/LargeFirework.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/LargeFirework.swift index cd98c62..cd58532 100644 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/LargeFirework.swift +++ b/SFSymbolsArtCollection/ArtWorks/Fireworks/LargeFirework.swift @@ -20,43 +20,43 @@ struct LargeFirework: View { // DotRadiowaves Group { - Image(symbol: .dotRadiowavesRight) - .arrangeShape(color: color, - fontSize: baseLength * 0.25, - fontWeight: .bold, - offsetX: baseLength * 0.095) +// Image(symbol: .dotRadiowavesRight) +// .arrangeShape(color: color, +// fontSize: baseLength * 0.25, +// fontWeight: .bold, +// offsetX: baseLength * 0.095) - Image(symbol: .dotRadiowavesRight) - .arrangeShape(color: color, - fontSize: baseLength * 0.25, - fontWeight: .bold, - flipType: .horizontal, - offsetX: baseLength * -0.095) +// Image(symbol: .dotRadiowavesRight) +// .arrangeShape(color: color, +// fontSize: baseLength * 0.25, +// fontWeight: .bold, +// flipType: .horizontal, +// offsetX: baseLength * -0.095) +// +// Image(symbol: .dotRadiowavesRight) +// .arrangeShape(color: color, +// fontSize: baseLength * 0.25, +// fontWeight: .bold, +// rotationDegrees: 90, +// offsetY: baseLength * -0.095) - Image(symbol: .dotRadiowavesRight) - .arrangeShape(color: color, - fontSize: baseLength * 0.25, - fontWeight: .bold, - rotationDegrees: 90, - offsetY: baseLength * -0.095) - - Image(symbol: .dotRadiowavesRight) - .arrangeShape(color: color, - fontSize: baseLength * 0.25, - fontWeight: .bold, - rotationDegrees: -90, - offsetY: baseLength * 0.095) +// Image(symbol: .dotRadiowavesRight) +// .arrangeShape(color: color, +// fontSize: baseLength * 0.25, +// fontWeight: .bold, +// rotationDegrees: -90, +// offsetY: baseLength * 0.095) } - Image(symbol: .circleDotted) - .arrangeShape(color: dotColor, - fontSize: baseLength * 0.55, - fontWeight: .ultraLight, - rotationDegrees: baseLength * 0.225) - - Image(symbol: .circleFill) - .arrangeShape(color: dotColor, - fontSize: baseLength * 0.085) +// Image(symbol: .circleDotted) +// .arrangeShape(color: dotColor, +// fontSize: baseLength * 0.55, +// fontWeight: .ultraLight, +// rotationDegrees: baseLength * 0.225) +// +// Image(symbol: .circleFill) +// .arrangeShape(color: dotColor, +// fontSize: baseLength * 0.085) } } } diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift index 4cd75cd..3ffa452 100644 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift +++ b/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift @@ -16,17 +16,17 @@ struct MediumFirework: View { var body: some View { ZStack { - Image(symbol: .helm) - .arrangeShape(color: color, - fontSize: baseLength * 0.25) - - Image(symbol: .circleDotted) - .arrangeShape(color: dotColor, - fontSize: baseLength * 0.30) - - Image(symbol: .circleFill) - .arrangeShape(color: dotColor, - fontSize: baseLength * 0.037) +// Image(symbol: .helm) +// .arrangeShape(color: color, +// fontSize: baseLength * 0.25) +// +// Image(symbol: .circleDotted) +// .arrangeShape(color: dotColor, +// fontSize: baseLength * 0.30) +// +// Image(symbol: .circleFill) +// .arrangeShape(color: dotColor, +// fontSize: baseLength * 0.037) } } } diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/RocketFirework.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/RocketFirework.swift index ef0287e..79835d4 100644 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/RocketFirework.swift +++ b/SFSymbolsArtCollection/ArtWorks/Fireworks/RocketFirework.swift @@ -15,32 +15,32 @@ struct RocketFirework: View { var body: some View { ZStack { - Image(symbol: .circleFill) - .arrangeShape(color: color, - fontSize: baseLength * 0.05, - offsetY: baseLength * -0.35) +// Image(symbol: .circleFill) +// .arrangeShape(color: color, +// fontSize: baseLength * 0.05, +// offsetY: baseLength * -0.35) // AlternatingCurrents Group { - Image(symbol: .alternatingcurrent) - .arrangeShape(color: color, - width: baseLength * 0.25, - height: baseLength * 0.025, - rotationDegrees: 90, - offsetY: baseLength * -0.22) - - Image(symbol: .alternatingcurrent) - .arrangeShape(color: color, - width: baseLength * 0.25, - height: baseLength * 0.025, - rotationDegrees: 90) - - Image(symbol: .alternatingcurrent) - .arrangeShape(color: color, - width: baseLength * 0.25, - height: baseLength * 0.025, - rotationDegrees: 90, - offsetY: baseLength * 0.22) +// Image(symbol: .alternatingcurrent) +// .arrangeShape(color: color, +// width: baseLength * 0.25, +// height: baseLength * 0.025, +// rotationDegrees: 90, +// offsetY: baseLength * -0.22) +// +// Image(symbol: .alternatingcurrent) +// .arrangeShape(color: color, +// width: baseLength * 0.25, +// height: baseLength * 0.025, +// rotationDegrees: 90) +// +// Image(symbol: .alternatingcurrent) +// .arrangeShape(color: color, +// width: baseLength * 0.25, +// height: baseLength * 0.025, +// rotationDegrees: 90, +// offsetY: baseLength * 0.22) } } } diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/SmallFirework.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/SmallFirework.swift index 5d987d8..f510283 100644 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/SmallFirework.swift +++ b/SFSymbolsArtCollection/ArtWorks/Fireworks/SmallFirework.swift @@ -15,12 +15,13 @@ struct SmallFirework: View { let offsetY: CGFloat var body: some View { + ZStack {} - Image(symbol: .timelapse) - .arrangeShape(color: color, - fontSize: fontSize, - offsetX: offsetX, - offsetY: offsetY) +// Image(symbol: .timelapse) +// .arrangeShape(color: color, +// fontSize: fontSize, +// offsetX: offsetX, +// offsetY: offsetY) } } diff --git a/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Logo.swift b/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Logo.swift index 319c036..dc75907 100644 --- a/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Logo.swift +++ b/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Logo.swift @@ -25,9 +25,9 @@ struct iOSDCJapan2022Logo: View { y: baseLength * appearance.offsetYMagnification) } - Image(symbol: .circleSquareFill) - .arrangeShape(color: .white, - fontSize: baseLength) +// Image(symbol: .circleSquareFill) +// .arrangeShape(color: .white, +// fontSize: baseLength) } .position(proxy.localCenter) } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+CoverArt.swift index df3c218..c02ec8b 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+CoverArt.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView+CoverArt.swift @@ -8,14 +8,43 @@ import SwiftUI extension CrayonBoyArtView { - + struct CoverArt: View { + + @Environment(ArtWorkModel.self) var model var body: some View { ZStack { ForEach(Element.allCases) { SymbolArtDisplayView(element: $0.value) } + + Image(systemName: "cloud.fill") + .resizable() + .foregroundStyle(.black.opacity(0.9)) + .frame( + width: model.calculatingProportionalValue( + withRatio: 0.85, + shouldResizeForCoverArt: true + ), + height: model.calculatingProportionalValue( + withRatio: 0.6, + shouldResizeForCoverArt: true + ) + ) + .rotationEffect(.degrees(8)) + .rotation3DEffect( + .degrees(180), + axis: (x: 0, y: 1, z: 0) + ) + + Image(systemName: "questionmark.app.fill") + .foregroundStyle(.white, .black.opacity(0.9)) + .font(.system(size: model.calculatingProportionalValue( + withRatio: 0.4, + shouldResizeForCoverArt: true + ))) + .bold() } } } From 5f226c3ef1d5e0aec0010a1d227d2c688e2ed5c8 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sun, 11 Feb 2024 06:04:53 +0900 Subject: [PATCH 089/108] Add comment ArtWorkModel.preview --- .../Common/Models/ArtWorkModel/ArtWorkModel.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift index 2821597..3e74fd9 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/ArtWorkModel/ArtWorkModel.swift @@ -10,6 +10,7 @@ import SwiftUI @Observable class ArtWorkModel { + /// this model is for Xcode preview that provides base length for iPad Pro 12.9. static let preview = ArtWorkModel(screenSize: CGSize(width: 1024, height: 1024)) init(screenSize: CGSize) { From 09dd971a255d9adc9ef7a0a75f7f49520b0b33a8 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sun, 11 Feb 2024 17:47:17 +0900 Subject: [PATCH 090/108] Add FireworksArtView+CoverArt --- .../project.pbxproj | 20 + .../ArtGalleryView.swift | 10 + .../Fireworks/FireworksArtView+CoverArt.swift | 22 + .../Fireworks/FireworksArtView+Element.swift | 426 ++++++++++++++++++ .../ArtWorks/Fireworks/FireworksArtView.swift | 44 ++ .../Common/Views/GalleryGridView.swift | 10 +- .../Extensions/Color+.swift | 1 + 7 files changed, 529 insertions(+), 4 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+CoverArt.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+Element.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 501a11a..5bb6170 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -41,6 +41,9 @@ 9767DF292B76FF0400457DA1 /* DemonWrestlerArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF282B76FF0400457DA1 /* DemonWrestlerArtView.swift */; }; 9767DF2B2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF2A2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift */; }; 9767DF2D2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DF2C2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift */; }; + 9778A4932B781DCE001BF9E8 /* FireworksArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4922B781DCE001BF9E8 /* FireworksArtView.swift */; }; + 9778A4952B78C076001BF9E8 /* FireworksArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4942B78C076001BF9E8 /* FireworksArtView+Element.swift */; }; + 9778A4972B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4962B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -106,6 +109,9 @@ 9767DF282B76FF0400457DA1 /* DemonWrestlerArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemonWrestlerArtView.swift; sourceTree = ""; }; 9767DF2A2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DemonWrestlerArtView+CoverArt.swift"; sourceTree = ""; }; 9767DF2C2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DemonWrestlerArtView+Element.swift"; sourceTree = ""; }; + 9778A4922B781DCE001BF9E8 /* FireworksArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FireworksArtView.swift; sourceTree = ""; }; + 9778A4942B78C076001BF9E8 /* FireworksArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FireworksArtView+Element.swift"; sourceTree = ""; }; + 9778A4962B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FireworksArtView+CoverArt.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -252,6 +258,16 @@ path = ArmHair; sourceTree = ""; }; + 9778A4912B781DA6001BF9E8 /* Fireworks */ = { + isa = PBXGroup; + children = ( + 9778A4922B781DCE001BF9E8 /* FireworksArtView.swift */, + 9778A4942B78C076001BF9E8 /* FireworksArtView+Element.swift */, + 9778A4962B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift */, + ); + path = Fireworks; + sourceTree = ""; + }; 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */ = { isa = PBXGroup; children = ( @@ -302,6 +318,7 @@ 9767DF012B759AFC00457DA1 /* PartyAnimals */, 9767DF212B7658CB00457DA1 /* ArmHair */, 9748BE4428980FE4006DF0BE /* DemonWrestler */, + 9778A4912B781DA6001BF9E8 /* Fireworks */, 97AD531E2B70E2770034FB5D /* AfroBoy */, 97EF43892B725DE7003648F5 /* Nosebleed */, 97EF43912B72D3AF003648F5 /* ImWearingPants */, @@ -519,6 +536,7 @@ 9767DF172B75FF0700457DA1 /* PartyAnimalsArtView+Element.swift in Sources */, 9767DF0D2B75DDEC00457DA1 /* AfroBoyArtView+Element.swift in Sources */, 97EF43932B72D3E2003648F5 /* ImWearingPantsArtView+CoverArt.swift in Sources */, + 9778A4952B78C076001BF9E8 /* FireworksArtView+Element.swift in Sources */, 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, 9767DF2B2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift in Sources */, @@ -529,6 +547,7 @@ 97AD532D2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift in Sources */, 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, + 9778A4932B781DCE001BF9E8 /* FireworksArtView.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */, 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, @@ -544,6 +563,7 @@ 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, + 9778A4972B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift in Sources */, 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, 9767DF272B76CCE300457DA1 /* ArmHairArtView+Element.swift in Sources */, 9767DF292B76FF0400457DA1 /* DemonWrestlerArtView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index d68a5b4..4d715d7 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -82,6 +82,16 @@ struct ArtGalleryView: View { .galleryGridItemView(length: model.galleryColumnLength) } + NavigationLink { + FireworksArtView() + } label: { + FireworksArtView.CoverArt() + .galleryGridItemView( + backgroundColor: .midnightNavy, + length: model.galleryColumnLength + ) + } + NavigationLink { AfroBoyArtView() } label: { diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+CoverArt.swift new file mode 100644 index 0000000..1c013bb --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+CoverArt.swift @@ -0,0 +1,22 @@ +// +// FireworksArtView+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension FireworksArtView { + + struct CoverArt: View { + + var body: some View { + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + } + } + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+Element.swift new file mode 100644 index 0000000..fd4d57b --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+Element.swift @@ -0,0 +1,426 @@ +// +// FireworksArtView+Element.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension FireworksArtView { + + enum Element: String, CaseIterable, Identifiable { + case moon + case rocketFireworkYellow + case rocketFireworkYellowConcealmentRight + case rocketFireworkYellowConcealmentLeft + case rocketFireworkYellowTop + case rocketFireworkWhite + case rocketFireworkWhiteConcealmentRight + case rocketFireworkWhiteConcealmentLeft + case rocketFireworkWhiteTop + case buildingLarge + case buildingSmall + case litBuildingLarge + case litBuildingSmall + case personRight + case personLeft + case personCenterRight + case personCenterLeft + case smallFireworkPink + case smallFireworkYellow + case smallFireworkGreen + case mediumFirework + case largeHorizontalFireworkLeft + case largeVerticalFireworkLeft + case largeDotFireworkLeft + case largeHorizontalFireworkRight + case largeVerticalFireworkRight + case largeDotFireworkRight + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .moon: + SymbolArtElement( + symbol: "􀇁", + name: "moon.stars.fill", + initialPosition: .none, + primaryColor: .yellow.opacity(0.7), + secondaryColor: .awesomeYellow.opacity(0.6), + widthRatio: 0.12, + heightRatio: 0.12, + horizontalOffsetRatio: 0.4, + verticalOffsetRatio: -0.51, + symbolCountToWaitFor: 0 + ) + + case .rocketFireworkYellow: + SymbolArtElement( + symbol: "􁎄", + name: "water.waves", + initialPosition: .none, + primaryColor: .yellow, + fontWeight: .ultraLight, + widthRatio: 0.57, + heightRatio: 0.2, + rotationDegrees: 90, + horizontalOffsetRatio: -0.01, + verticalOffsetRatio: 0.305, + symbolCountToWaitFor: 0 + ) + + case .rocketFireworkYellowConcealmentRight: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .none, + primaryColor: .midnightNavy, + widthRatio: 0.1, + heightRatio: 0.57, + horizontalOffsetRatio: -0.1, + verticalOffsetRatio: 0.3, + symbolCountToWaitFor: 0 + ) + + case .rocketFireworkYellowConcealmentLeft: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .none, + primaryColor: .midnightNavy, + widthRatio: 0.1, + heightRatio: 0.57, + horizontalOffsetRatio: 0.08, + verticalOffsetRatio: 0.3, + symbolCountToWaitFor: 0 + ) + + case .rocketFireworkYellowTop: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .none, + primaryColor: .yellow, + widthRatio: 0.04, + heightRatio: 0.045, + horizontalOffsetRatio: -0.02, + verticalOffsetRatio: 0.03, + symbolCountToWaitFor: 0 + ) + + case .rocketFireworkWhite: + SymbolArtElement( + symbol: "􁎄", + name: "water.waves", + initialPosition: .none, + primaryColor: .white, + fontWeight: .ultraLight, + widthRatio: 0.43, + heightRatio: 0.2, + rotationDegrees: 90, + horizontalOffsetRatio: -0.18, + verticalOffsetRatio: 0.37, + symbolCountToWaitFor: 0 + ) + + case .rocketFireworkWhiteConcealmentRight: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .none, + primaryColor: .midnightNavy, + widthRatio: 0.08, + heightRatio: 0.46, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: 0.355, + symbolCountToWaitFor: 0 + ) + + case .rocketFireworkWhiteConcealmentLeft: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .none, + primaryColor: .midnightNavy, + widthRatio: 0.08, + heightRatio: 0.46, + horizontalOffsetRatio: -0.26, + verticalOffsetRatio: 0.355, + symbolCountToWaitFor: 0 + ) + + case .rocketFireworkWhiteTop: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .none, + primaryColor: .white, + widthRatio: 0.04, + heightRatio: 0.045, + horizontalOffsetRatio: -0.19, + verticalOffsetRatio: 0.2, + symbolCountToWaitFor: 0 + ) + + case .buildingLarge: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.third), + primaryColor: .yellow, + widthRatio: 0.18, + heightRatio: 0.3, + horizontalOffsetRatio: 0.07, + verticalOffsetRatio: 0.434, + symbolCountToWaitFor: 0 + ) + case .buildingSmall: + SymbolArtElement( + symbol: "􀏄", + name: "rectangle.fill", + initialPosition: .third(.third), + primaryColor: .yellow, + widthRatio: 0.1, + heightRatio: 0.17, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: 0.497, + symbolCountToWaitFor: 0 + ) + case .litBuildingLarge: + SymbolArtElement( + symbol: "􀮆", + name: "building.fill", + initialPosition: .third(.second), + primaryColor: .lightGray, + widthRatio: 0.2, + heightRatio: 0.3, + horizontalOffsetRatio: 0.07, + verticalOffsetRatio: 0.434, + symbolCountToWaitFor: 0 + ) + case .litBuildingSmall: + SymbolArtElement( + symbol: "􀮆", + name: "building.fill", + initialPosition: .third(.second), + primaryColor: .lightGray, + widthRatio: 0.12, + heightRatio: 0.17, + horizontalOffsetRatio: -0.09, + verticalOffsetRatio: 0.497, + symbolCountToWaitFor: 0 + ) + case .personRight: + SymbolArtElement( + symbol: "􀻸", + name: "person.3.sequence.fill", + initialPosition: .none, + primaryColor: .black, + secondaryColor: .black, + widthRatio: 0.2, + heightRatio: 0.1, + flip: .horizontal, + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: 0.538, + symbolCountToWaitFor: 0 + ) + + case .personLeft: + SymbolArtElement( + symbol: "􀻸", + name: "person.3.sequence.fill", + initialPosition: .none, + primaryColor: .black, + secondaryColor: .black, + widthRatio: 0.2, + heightRatio: 0.1, + horizontalOffsetRatio: -0.34, + verticalOffsetRatio: 0.538, + symbolCountToWaitFor: 0 + ) + case .personCenterRight: + SymbolArtElement( + symbol: "􀝋", + name: "person.3.fill", + initialPosition: .none, + primaryColor: .black, + secondaryColor: .black, + widthRatio: 0.2, + heightRatio: 0.1, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: 0.538, + symbolCountToWaitFor: 0 + ) + case .personCenterLeft: + SymbolArtElement( + symbol: "􀝋", + name: "person.3.fill", + initialPosition: .none, + primaryColor: .black, + secondaryColor: .black, + widthRatio: 0.2, + heightRatio: 0.1, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: 0.538, + symbolCountToWaitFor: 0 + ) + + case .smallFireworkPink: + SymbolArtElement( + symbol: "􀇲", + name: "timelapse", + initialPosition: .none, + primaryColor: .pink, + widthRatio: 0.125, + heightRatio: 0.125, + horizontalOffsetRatio: -0.225, + verticalOffsetRatio: 0.125, + symbolCountToWaitFor: 0 + ) + case .smallFireworkYellow: + SymbolArtElement( + symbol: "􀇲", + name: "timelapse", + initialPosition: .none, + primaryColor: .yellow, + widthRatio: 0.125, + heightRatio: 0.125, + horizontalOffsetRatio: -0.075, + verticalOffsetRatio: 0.25, + symbolCountToWaitFor: 0 + ) + case .smallFireworkGreen: + SymbolArtElement( + symbol: "􀇲", + name: "timelapse", + initialPosition: .none, + primaryColor: .green, + widthRatio: 0.125, + heightRatio: 0.125, + horizontalOffsetRatio: 0.34, + verticalOffsetRatio: 0.18, + symbolCountToWaitFor: 0 + ) + case .mediumFirework: + SymbolArtElement( + symbol: "􂁞", + name: "fireworks", + initialPosition: .none, + primaryColor: .yellow, + secondaryColor: .red, + widthRatio: 0.24, + heightRatio: 0.24, + horizontalOffsetRatio: 0.14, + verticalOffsetRatio: 0.07, + symbolCountToWaitFor: 0 + ) + case .largeHorizontalFireworkLeft: + SymbolArtElement( + symbol: "􀌙", + name: "dot.radiowaves.left.and.right", + initialPosition: .none, + primaryColor: .white, + secondaryColor: .red, + fontWeight: .black, + widthRatio: 0.347, + heightRatio: 0.235, + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: -0.18, + symbolCountToWaitFor: 0 + ) + case .largeVerticalFireworkLeft: + SymbolArtElement( + symbol: "􀌙", + name: "dot.radiowaves.left.and.right", + initialPosition: .none, + primaryColor: .white, + secondaryColor: .red, + fontWeight: .black, + widthRatio: 0.347, + heightRatio: 0.235, + rotationDegrees: 90, + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: -0.18, + symbolCountToWaitFor: 0 + ) + + case .largeDotFireworkLeft: + SymbolArtElement( + symbol: "􁅃", + name: "circle.dotted", + initialPosition: .none, + primaryColor: .white, + fontWeight: .ultraLight, + widthRatio: 0.42, + heightRatio: 0.42, + rotationDegrees: 90, + horizontalOffsetRatio: -0.17, + verticalOffsetRatio: -0.18, + symbolCountToWaitFor: 0 + ) + + case .largeHorizontalFireworkRight: + SymbolArtElement( + symbol: "􀌙", + name: "dot.radiowaves.left.and.right", + initialPosition: .none, + primaryColor: .yellow, + secondaryColor: .white, + fontWeight: .black, + widthRatio: 0.347, + heightRatio: 0.235, + horizontalOffsetRatio: 0.105, + verticalOffsetRatio: -0.34, + symbolCountToWaitFor: 0 + ) + case .largeVerticalFireworkRight: + SymbolArtElement( + symbol: "􀌙", + name: "dot.radiowaves.left.and.right", + initialPosition: .none, + primaryColor: .yellow, + secondaryColor: .white, + fontWeight: .black, + widthRatio: 0.347, + heightRatio: 0.235, + rotationDegrees: 90, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: -0.34, + symbolCountToWaitFor: 0 + ) + case .largeDotFireworkRight: + SymbolArtElement( + symbol: "􁅃", + name: "circle.dotted", + initialPosition: .none, + primaryColor: .yellow, + secondaryColor: .white, + fontWeight: .ultraLight, + widthRatio: 0.42, + heightRatio: 0.42, + rotationDegrees: 90, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: -0.34, + symbolCountToWaitFor: 0 + ) + } + } + } +} + +#Preview { + NavigationStack { + FireworksArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + Color.midnightNavy + .overlay { + FireworksArtView.CoverArt() + .environment(ArtWorkModel.preview) + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift new file mode 100644 index 0000000..7638158 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift @@ -0,0 +1,44 @@ +// +// FireworksArtView.swift +// SFSymbolsArtCollection +// +// Created Lil Ossa +// + +import SwiftUI + +struct FireworksArtView: View { + + @State private var isAnimating = false + + var body: some View { + + ZStack { + Color.midnightNavy + + ForEach(Element.allCases) { + SymbolArtDisplayView(shouldResizeForCoverArt: false, element: $0.value) + } + } + .navigationTitle("Fireworks") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + } +} + +#Preview { + NavigationStack { + FireworksArtView() + .environment(ArtWorkModel.preview) + } +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift index 408f144..d0396c1 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Views/GalleryGridView.swift @@ -9,8 +9,8 @@ import SwiftUI extension View { - func galleryGridItemView(length: CGFloat) -> some View { - GalleryGridItemView(length: length) { + func galleryGridItemView(backgroundColor: Color = .white, length: CGFloat) -> some View { + GalleryGridItemView(backgroundColor: backgroundColor, length: length) { self } } @@ -18,11 +18,13 @@ extension View { struct GalleryGridItemView: View { - init(length: CGFloat, @ViewBuilder content: () -> Content) { + init(backgroundColor: Color = .white, length: CGFloat, @ViewBuilder content: () -> Content) { + self.backgroundColor = backgroundColor self.length = length self.content = content() } + let backgroundColor: Color let length: CGFloat let content: Content @@ -45,7 +47,7 @@ struct GalleryGridItemView: View { } .frame(width: length, height: length) - .background(RoundedRectangle(cornerRadius: 12).fill(.white).shadow(radius: 4)) + .background(RoundedRectangle(cornerRadius: 12).fill(backgroundColor).shadow(radius: 4)) .padding(.top, 16) } } diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Color+.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Color+.swift index 276e0b7..5631093 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Color+.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Extensions/Color+.swift @@ -9,4 +9,5 @@ import SwiftUI extension Color { static let systemBackground: Color = .init(uiColor: .systemBackground) + static let lightGray: Color = .init(uiColor: .lightGray) } From a3e62022e24050d93acc547720acd33f9dc0dc09 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sun, 11 Feb 2024 17:47:44 +0900 Subject: [PATCH 091/108] Remove old fireworksArt --- .../project.pbxproj | 44 ------- .../Fireworks/Buildings/Building.swift | 37 ------ .../Fireworks/Buildings/Buildings.swift | 45 ------- .../ArtWorks/Fireworks/Fireworks.swift | 110 ------------------ .../ArtWorks/Fireworks/LargeFirework.swift | 71 ----------- .../ArtWorks/Fireworks/MediumFirework.swift | 40 ------- .../ArtWorks/Fireworks/RocketFirework.swift | 54 --------- .../ArtWorks/Fireworks/SmallFirework.swift | 35 ------ 8 files changed, 436 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Building.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Buildings.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/Fireworks/LargeFirework.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/Fireworks/RocketFirework.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/Fireworks/SmallFirework.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 5bb6170..46815c0 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -11,14 +11,7 @@ 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */; }; 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */; }; 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1F28939B04006DF0BE /* FlipType.swift */; }; - 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE56289DCBB0006DF0BE /* LargeFirework.swift */; }; - 9748BE59289DCE17006DF0BE /* Fireworks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE58289DCE17006DF0BE /* Fireworks.swift */; }; - 9748BE5D289DD696006DF0BE /* Building.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE5C289DD696006DF0BE /* Building.swift */; }; - 9748BE5F289F194E006DF0BE /* RocketFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE5E289F194E006DF0BE /* RocketFirework.swift */; }; 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE6528A395D5006DF0BE /* ArtWork.swift */; }; - 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2928C2BC9A004E1720 /* MediumFirework.swift */; }; - 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2B28C2DDAA004E1720 /* Buildings.swift */; }; - 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C2E28C2E608004E1720 /* SmallFirework.swift */; }; 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */; }; 9767DEFA2B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEF92B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift */; }; 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */; }; @@ -78,15 +71,8 @@ 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithFont.swift; sourceTree = ""; }; 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithWidthAndHeight.swift; sourceTree = ""; }; 9748BE1F28939B04006DF0BE /* FlipType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlipType.swift; sourceTree = ""; }; - 9748BE56289DCBB0006DF0BE /* LargeFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LargeFirework.swift; sourceTree = ""; }; - 9748BE58289DCE17006DF0BE /* Fireworks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fireworks.swift; sourceTree = ""; }; - 9748BE5C289DD696006DF0BE /* Building.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Building.swift; sourceTree = ""; }; - 9748BE5E289F194E006DF0BE /* RocketFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RocketFirework.swift; sourceTree = ""; }; 9748BE62289F4BFB006DF0BE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 9748BE6528A395D5006DF0BE /* ArtWork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtWork.swift; sourceTree = ""; }; - 97624C2928C2BC9A004E1720 /* MediumFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediumFirework.swift; sourceTree = ""; }; - 97624C2B28C2DDAA004E1720 /* Buildings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Buildings.swift; sourceTree = ""; }; - 97624C2E28C2E608004E1720 /* SmallFirework.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallFirework.swift; sourceTree = ""; }; 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GeometryProxy+.swift"; sourceTree = ""; }; 9767DEF92B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeaceArtView+CoverArt.swift"; sourceTree = ""; }; 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeaceArtView.swift; sourceTree = ""; }; @@ -196,33 +182,10 @@ path = DemonWrestler; sourceTree = ""; }; - 9748BE55289DCB82006DF0BE /* Fireworks */ = { - isa = PBXGroup; - children = ( - 9748BE58289DCE17006DF0BE /* Fireworks.swift */, - 9748BE56289DCBB0006DF0BE /* LargeFirework.swift */, - 97624C2928C2BC9A004E1720 /* MediumFirework.swift */, - 97624C2E28C2E608004E1720 /* SmallFirework.swift */, - 9748BE5E289F194E006DF0BE /* RocketFirework.swift */, - 97624C2D28C2E43C004E1720 /* Buildings */, - ); - path = Fireworks; - sourceTree = ""; - }; - 97624C2D28C2E43C004E1720 /* Buildings */ = { - isa = PBXGroup; - children = ( - 97624C2B28C2DDAA004E1720 /* Buildings.swift */, - 9748BE5C289DD696006DF0BE /* Building.swift */, - ); - path = Buildings; - sourceTree = ""; - }; 97624C3628C74AA0004E1720 /* ArtWorks */ = { isa = PBXGroup; children = ( 9748BE6528A395D5006DF0BE /* ArtWork.swift */, - 9748BE55289DCB82006DF0BE /* Fireworks */, 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */, ); path = ArtWorks; @@ -538,9 +501,7 @@ 97EF43932B72D3E2003648F5 /* ImWearingPantsArtView+CoverArt.swift in Sources */, 9778A4952B78C076001BF9E8 /* FireworksArtView+Element.swift in Sources */, 97EF439E2B744C4C003648F5 /* Color+.swift in Sources */, - 97624C2F28C2E608004E1720 /* SmallFirework.swift in Sources */, 9767DF2B2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift in Sources */, - 9748BE57289DCBB0006DF0BE /* LargeFirework.swift in Sources */, 9767DF2D2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift in Sources */, 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */, 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */, @@ -550,7 +511,6 @@ 9778A4932B781DCE001BF9E8 /* FireworksArtView.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */, - 97624C2A28C2BC9A004E1720 /* MediumFirework.swift in Sources */, 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */, 9767DEFA2B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift in Sources */, 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */, @@ -558,9 +518,6 @@ 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */, 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */, - 9748BE5F289F194E006DF0BE /* RocketFirework.swift in Sources */, - 9748BE59289DCE17006DF0BE /* Fireworks.swift in Sources */, - 9748BE5D289DD696006DF0BE /* Building.swift in Sources */, 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9778A4972B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift in Sources */, @@ -581,7 +538,6 @@ 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */, 9767DF052B75AFE200457DA1 /* PartyAnimalsArtView.swift in Sources */, 9767DF1F2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift in Sources */, - 97624C2C28C2DDAA004E1720 /* Buildings.swift in Sources */, 97AD53222B70E3FA0034FB5D /* AnimatableSymbolView.swift in Sources */, 9767DF032B759B2D00457DA1 /* PartyAnimalsArtView+CoverArt.swift in Sources */, 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Building.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Building.swift deleted file mode 100644 index 7bdf28b..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Building.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Building.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/06. -// - -import SwiftUI - -struct Building: View { - - let fontSize: CGFloat - let color: Color - let lightColor: Color - - var body: some View { - - ZStack { - -// Image(symbol: .rectanglePortraitFill) -// .arrangeShape(color: lightColor, -// fontSize: fontSize * 0.9) -// -// Image(symbol: .buildingFill) -// .arrangeShape(color: color, -// fontSize: fontSize) - } - } -} - -struct Building_Previews: PreviewProvider { - static var previews: some View { - Building(fontSize: 180, - color: .black, - lightColor: .yellow) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Buildings.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Buildings.swift deleted file mode 100644 index f132731..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/Buildings/Buildings.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// Buildings.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/03. -// - -import SwiftUI - -struct Buildings: View { - - let baseLength: CGFloat - let color: Color - let lightColor: Color - - var body: some View { - - HStack(spacing: 0) { - - Spacer() - - Building(fontSize: baseLength * 0.25, - color: color, - lightColor: lightColor) - .offset(x: baseLength * 0.09, - y: baseLength * 0.1) - - Building(fontSize: baseLength * 0.45, - color: color, - lightColor: lightColor) - - Spacer() - } - .offset(x: baseLength * -0.05, - y: 0) - } -} - -struct Buildings_Previews: PreviewProvider { - static var previews: some View { - Buildings(baseLength: 400, - color: .black, - lightColor: .yellow) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift deleted file mode 100644 index 2bbcbc1..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/Fireworks.swift +++ /dev/null @@ -1,110 +0,0 @@ -// -// Fireworks.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/06. -// - -import SwiftUI - -struct Fireworks: View { - - var body: some View { - - GeometryReader { proxy in - - let baseLength = proxy.baseLength - - // Background - ZStack { -// Image(symbol: .rectangleFill) -// .arrangeShape(color: .midnightNavy, -// width: proxy.size.width * 1.5, -// height: proxy.size.height * 1.5) - } - .position(proxy.localCenter) - - ZStack { - - // SmallFireworks - Group { - SmallFirework(color: .pink, - fontSize: baseLength * 0.125, - offsetX: baseLength * -0.225, - offsetY: baseLength * 0.125) - - SmallFirework(color: .init(.yellow), - fontSize: baseLength * 0.125, - offsetX: baseLength * -0.075, - offsetY: baseLength * 0.25) - - SmallFirework(color: .green, - fontSize: baseLength * 0.125, - offsetX: baseLength * 0.15, - offsetY: baseLength * 0.2) - } - - // LargeFireworks - Group { - LargeFirework(baseLength: baseLength, - color: Color(uiColor: .red), - dotColor: .white) - .offset(x: baseLength * -0.1, - y: baseLength * -0.3) - - LargeFirework(baseLength: baseLength, - color: .white, - dotColor: .yellow) - .offset(x: baseLength * 0.1, - y: baseLength * -0.5) - } - - // RocketFireworks - Group { - RocketFirework(baseLength: baseLength, - color: .yellow) - .offset(x: baseLength * 0.0025, - y: baseLength * 0.325) - - RocketFirework(baseLength: baseLength, - color: .white) - .offset(x: baseLength * -0.2, - y: baseLength * 0.5) - } - - MediumFirework(baseLength: baseLength, - color: .init(uiColor: .yellow), - dotColor: .red) - .offset(x: baseLength * 0.225, - y: baseLength * 0.075) - - VStack { - Spacer() - - Buildings(baseLength: baseLength * 0.77, - color: .gray, - lightColor: .yellow) - } - - VStack { - Spacer() - - HStack(spacing: 0) { - -// // Audience -// ForEach(0..<4) { _ in -// Image(symbol: .person3SequenceFill) -// .arrangeShape(fontSize: baseLength * 0.13) -// } - } - } - } - } - } -} - -struct Fireworks_Previews: PreviewProvider { - static var previews: some View { - Fireworks() - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/LargeFirework.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/LargeFirework.swift deleted file mode 100644 index cd58532..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/LargeFirework.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// LargeFirework.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/06. -// - -import SwiftUI - -struct LargeFirework: View { - - let baseLength: CGFloat - let color: Color - let dotColor: Color - - var body: some View { - - ZStack { - - // DotRadiowaves - Group { - -// Image(symbol: .dotRadiowavesRight) -// .arrangeShape(color: color, -// fontSize: baseLength * 0.25, -// fontWeight: .bold, -// offsetX: baseLength * 0.095) - -// Image(symbol: .dotRadiowavesRight) -// .arrangeShape(color: color, -// fontSize: baseLength * 0.25, -// fontWeight: .bold, -// flipType: .horizontal, -// offsetX: baseLength * -0.095) -// -// Image(symbol: .dotRadiowavesRight) -// .arrangeShape(color: color, -// fontSize: baseLength * 0.25, -// fontWeight: .bold, -// rotationDegrees: 90, -// offsetY: baseLength * -0.095) - -// Image(symbol: .dotRadiowavesRight) -// .arrangeShape(color: color, -// fontSize: baseLength * 0.25, -// fontWeight: .bold, -// rotationDegrees: -90, -// offsetY: baseLength * 0.095) - } - -// Image(symbol: .circleDotted) -// .arrangeShape(color: dotColor, -// fontSize: baseLength * 0.55, -// fontWeight: .ultraLight, -// rotationDegrees: baseLength * 0.225) -// -// Image(symbol: .circleFill) -// .arrangeShape(color: dotColor, -// fontSize: baseLength * 0.085) - } - } -} - -struct Firework_Previews: PreviewProvider { - static var previews: some View { - - LargeFirework(baseLength: 400, - color: .red, - dotColor: .yellow) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift deleted file mode 100644 index 3ffa452..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/MediumFirework.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// MediumFirework.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/03. -// - -import SwiftUI - -struct MediumFirework: View { - - let baseLength: CGFloat - let color: Color - let dotColor: Color - - var body: some View { - - ZStack { -// Image(symbol: .helm) -// .arrangeShape(color: color, -// fontSize: baseLength * 0.25) -// -// Image(symbol: .circleDotted) -// .arrangeShape(color: dotColor, -// fontSize: baseLength * 0.30) -// -// Image(symbol: .circleFill) -// .arrangeShape(color: dotColor, -// fontSize: baseLength * 0.037) - } - } -} - -struct FMediumFirework_Previews: PreviewProvider { - static var previews: some View { - MediumFirework(baseLength: 400, - color: .red, - dotColor: .init(uiColor: .yellow)) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/RocketFirework.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/RocketFirework.swift deleted file mode 100644 index 79835d4..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/RocketFirework.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// RocketFirework.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/07. -// - -import SwiftUI - -struct RocketFirework: View { - - let baseLength: CGFloat - let color: Color - - var body: some View { - - ZStack { -// Image(symbol: .circleFill) -// .arrangeShape(color: color, -// fontSize: baseLength * 0.05, -// offsetY: baseLength * -0.35) - - // AlternatingCurrents - Group { -// Image(symbol: .alternatingcurrent) -// .arrangeShape(color: color, -// width: baseLength * 0.25, -// height: baseLength * 0.025, -// rotationDegrees: 90, -// offsetY: baseLength * -0.22) -// -// Image(symbol: .alternatingcurrent) -// .arrangeShape(color: color, -// width: baseLength * 0.25, -// height: baseLength * 0.025, -// rotationDegrees: 90) -// -// Image(symbol: .alternatingcurrent) -// .arrangeShape(color: color, -// width: baseLength * 0.25, -// height: baseLength * 0.025, -// rotationDegrees: 90, -// offsetY: baseLength * 0.22) - } - } - } -} - -struct RocketFirework_Previews: PreviewProvider { - static var previews: some View { - RocketFirework(baseLength: 400, - color: .red) - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/Fireworks/SmallFirework.swift b/SFSymbolsArtCollection/ArtWorks/Fireworks/SmallFirework.swift deleted file mode 100644 index f510283..0000000 --- a/SFSymbolsArtCollection/ArtWorks/Fireworks/SmallFirework.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// SmallFirework.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/03. -// - -import SwiftUI - -struct SmallFirework: View { - - let color: Color - let fontSize: CGFloat - let offsetX: CGFloat - let offsetY: CGFloat - - var body: some View { - ZStack {} - -// Image(symbol: .timelapse) -// .arrangeShape(color: color, -// fontSize: fontSize, -// offsetX: offsetX, -// offsetY: offsetY) - } -} - -struct SmallFirework_Previews: PreviewProvider { - static var previews: some View { - SmallFirework(color: .pink, - fontSize: 50, - offsetX: 0, - offsetY: 0) - } -} From 7b8420218e22ae8ad416b4ecadb9c85c482c95f8 Mon Sep 17 00:00:00 2001 From: littleossa Date: Sun, 11 Feb 2024 20:19:31 +0900 Subject: [PATCH 092/108] Add opacity in AnimationValues --- .../Common/Models/AnimationValues.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift index c40d8cc..fbd7609 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/Common/Models/AnimationValues.swift @@ -19,7 +19,8 @@ struct AnimationValues { rotationDegrees: CGFloat = 0, rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) = (x: 0, y: 0, z: 0), offsetX: CGFloat = 0, - offsetY: CGFloat = 0 + offsetY: CGFloat = 0, + opacity: CGFloat = 1 ) { self.primaryColor = primaryColor.resolve(in: .init()) self.secondaryColor = secondaryColor.resolve(in: .init()) @@ -30,6 +31,7 @@ struct AnimationValues { self.rotationDegrees = rotationDegrees self.rotationAxis = rotationAxis self.offset = .init(width: offsetX, height: offsetY) + self.opacity = opacity } var primaryColor: Color.Resolved @@ -41,6 +43,7 @@ struct AnimationValues { var rotationDegrees: CGFloat var rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) var offset: CGSize + var opacity: CGFloat var fontWeight: Font.Weight { return .init(animatableValue: fontWeightValue) From f9c781d3b808b4b3c7325cd943bcfa8d1a18bc79 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 00:09:39 +0900 Subject: [PATCH 093/108] Add FireworksArtView --- .../Fireworks/FireworksArtView+Element.swift | 19 +- .../ArtWorks/Fireworks/FireworksArtView.swift | 754 +++++++++++++++++- 2 files changed, 759 insertions(+), 14 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+Element.swift index fd4d57b..530394c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+Element.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView+Element.swift @@ -19,10 +19,10 @@ extension FireworksArtView { case rocketFireworkWhiteConcealmentRight case rocketFireworkWhiteConcealmentLeft case rocketFireworkWhiteTop - case buildingLarge - case buildingSmall case litBuildingLarge case litBuildingSmall + case buildingLarge + case buildingSmall case personRight case personLeft case personCenterRight @@ -164,7 +164,7 @@ extension FireworksArtView { symbolCountToWaitFor: 0 ) - case .buildingLarge: + case .litBuildingLarge: SymbolArtElement( symbol: "􀏄", name: "rectangle.fill", @@ -176,7 +176,8 @@ extension FireworksArtView { verticalOffsetRatio: 0.434, symbolCountToWaitFor: 0 ) - case .buildingSmall: + + case .litBuildingSmall: SymbolArtElement( symbol: "􀏄", name: "rectangle.fill", @@ -188,7 +189,8 @@ extension FireworksArtView { verticalOffsetRatio: 0.497, symbolCountToWaitFor: 0 ) - case .litBuildingLarge: + + case .buildingLarge: SymbolArtElement( symbol: "􀮆", name: "building.fill", @@ -200,7 +202,8 @@ extension FireworksArtView { verticalOffsetRatio: 0.434, symbolCountToWaitFor: 0 ) - case .litBuildingSmall: + + case .buildingSmall: SymbolArtElement( symbol: "􀮆", name: "building.fill", @@ -212,6 +215,7 @@ extension FireworksArtView { verticalOffsetRatio: 0.497, symbolCountToWaitFor: 0 ) + case .personRight: SymbolArtElement( symbol: "􀻸", @@ -355,7 +359,6 @@ extension FireworksArtView { fontWeight: .ultraLight, widthRatio: 0.42, heightRatio: 0.42, - rotationDegrees: 90, horizontalOffsetRatio: -0.17, verticalOffsetRatio: -0.18, symbolCountToWaitFor: 0 @@ -396,11 +399,9 @@ extension FireworksArtView { name: "circle.dotted", initialPosition: .none, primaryColor: .yellow, - secondaryColor: .white, fontWeight: .ultraLight, widthRatio: 0.42, heightRatio: 0.42, - rotationDegrees: 90, horizontalOffsetRatio: 0.1, verticalOffsetRatio: -0.34, symbolCountToWaitFor: 0 diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift index 7638158..3395736 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift @@ -9,16 +9,20 @@ import SwiftUI struct FireworksArtView: View { + @Environment(ArtWorkModel.self) var model @State private var isAnimating = false + @State private var isBouncedMediumFirework = false var body: some View { ZStack { - Color.midnightNavy - - ForEach(Element.allCases) { - SymbolArtDisplayView(shouldResizeForCoverArt: false, element: $0.value) - } + background + sun + moon + rocketFireworks + buildings + people + fireworks } .navigationTitle("Fireworks") .navigationBarTitleDisplayMode(.inline) @@ -33,6 +37,746 @@ struct FireworksArtView: View { .disabled(isAnimating) } }) + .onChange(of: isAnimating) { _, newValue in + if newValue { + Timer.scheduledTimer(withTimeInterval: 15, repeats: false) { _ in + isBouncedMediumFirework = true + } + } + } + } + + // MARK: - Background + private var background: some View { + Color.midnightNavy + .keyframeAnimator( + initialValue: AnimationValues( + width: 0, + height: 0, + opacity: 0 + ), + trigger: isAnimating + ) { content, value in + content + .opacity(value.opacity) + } keyframes: { value in + KeyframeTrack(\.opacity) { + CubicKeyframe(1, duration: 4) + } + } + } + + // MARK: - 􀆮 Sun + private var sun: some View { + Image(systemName: "sun.max.fill") + .resizable() + .foregroundStyle(.orange) + .keyframeAnimator( + initialValue: AnimationValues( + width: model.calculatingProportionalValue(withRatio: 0.12), + height: model.calculatingProportionalValue(withRatio: 0.12), + offsetX: model.calculatingProportionalValue(withRatio: 0.4), + offsetY: model.calculatingProportionalValue(withRatio: -0.51) + ), + trigger: isAnimating + ) { content, value in + content + .frame(width: value.width, height: value.height) + .offset(value.offset) + } keyframes: { value in + KeyframeTrack(\.opacity) { + CubicKeyframe(1, duration: 4) + } + + KeyframeTrack(\.offset) { + CubicKeyframe( + CGSize(width: model.calculatingProportionalValue(withRatio: 0.8), + height: model.calculatingProportionalValue(withRatio: -0.31)), + duration: 4 + ) + } + } + } + + // MARK: - 􀇁 Moon + private var moon: some View { + Image(systemName: "moon.stars.fill") + .resizable() + .keyframeAnimator( + initialValue: AnimationValues( + primaryColor: .yellow.opacity(0.7), + secondaryColor: .awesomeYellow.opacity(0.6), + width: model.calculatingProportionalValue(withRatio: 0.12), + height: model.calculatingProportionalValue(withRatio: 0.12), + offsetX: model.calculatingProportionalValue(withRatio: -0.6), + offsetY: model.calculatingProportionalValue(withRatio: -0.41) + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(value.primaryColor, value.secondaryColor) + .frame(width: value.width, height: value.height) + .offset(value.offset) + } keyframes: { value in + KeyframeTrack(\.opacity) { + CubicKeyframe(1, duration: 4) + } + + KeyframeTrack(\.offset) { + CubicKeyframe( + CGSize( + width: model.calculatingProportionalValue(withRatio: -0.4), + height: model.calculatingProportionalValue(withRatio: -0.44) + ), + duration: 2 + ) + + CubicKeyframe( + CGSize( + width: model.calculatingProportionalValue(withRatio: 0.4), + height: model.calculatingProportionalValue(withRatio: -0.51) + ), + duration: 4 + ) + } + } + } + + private var rocketFireworks: some View { + ZStack { + // MARK: - RocketFireworkRed + rocketFirework(.red) + .keyframeAnimator( + initialValue: AnimationValues( + width: 0, + height: 0, + offsetX: model.calculatingProportionalValue(withRatio: -0.215), + offsetY: model.calculatingProportionalValue(withRatio: 0.48), + opacity: 0 + ), + trigger: isAnimating + ) { content, value in + content + .offset(value.offset) + .opacity(value.opacity) + } keyframes: { value in + KeyframeTrack(\.offset) { + LinearKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: -0.215), + height: model.calculatingProportionalValue(withRatio: 0.48)), duration: 7) + CubicKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: -0.215), + height: model.calculatingProportionalValue(withRatio: 0.23) + ), duration: 3) + } + + KeyframeTrack(\.opacity) { + LinearKeyframe(0, duration: 7) + CubicKeyframe(1, duration: 3) + CubicKeyframe(0, duration: 1) + } + } + + // MARK: - RocketFireworkYellow + rocketFirework(.yellow) + .keyframeAnimator( + initialValue: AnimationValues( + width: 0, + height: 0, + offsetX: model.calculatingProportionalValue(withRatio: -0.076), + offsetY: model.calculatingProportionalValue(withRatio: 0.48), + opacity: 0 + ), + trigger: isAnimating + ) { content, value in + content + .offset(value.offset) + .opacity(value.opacity) + } keyframes: { value in + KeyframeTrack(\.offset) { + LinearKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: -0.076), + height: model.calculatingProportionalValue(withRatio: 0.48)), duration: 9) + CubicKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: -0.076), + height: model.calculatingProportionalValue(withRatio: 0.36) + ), duration: 2) + } + + KeyframeTrack(\.opacity) { + LinearKeyframe(0, duration: 9) + CubicKeyframe(1, duration: 2) + CubicKeyframe(0, duration: 1) + } + } + + // MARK: - RocketFireworkYellow + rocketFirework(.green) + .keyframeAnimator( + initialValue: AnimationValues( + width: 0, + height: 0, + offsetX: model.calculatingProportionalValue(withRatio: 0.34), + offsetY: model.calculatingProportionalValue(withRatio: 0.48), + opacity: 0 + ), + trigger: isAnimating + ) { content, value in + content + .offset(value.offset) + .opacity(value.opacity) + } keyframes: { value in + KeyframeTrack(\.offset) { + LinearKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: 0.34), + height: model.calculatingProportionalValue(withRatio: 0.48)), duration: 10) + CubicKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: 0.34), + height: model.calculatingProportionalValue(withRatio: 0.28) + ), duration: 2) + } + + KeyframeTrack(\.opacity) { + LinearKeyframe(0, duration: 10) + CubicKeyframe(1, duration: 2) + CubicKeyframe(0, duration: 1) + } + } + + // MARK: - RocketMediumFirework + rocketFirework(.red) + .keyframeAnimator( + initialValue: AnimationValues( + width: 0, + height: 0, + offsetX: model.calculatingProportionalValue(withRatio: 0.16), + offsetY: model.calculatingProportionalValue(withRatio: 0.48), + opacity: 0 + ), + trigger: isAnimating + ) { content, value in + content + .offset(value.offset) + .opacity(value.opacity) + } keyframes: { value in + KeyframeTrack(\.offset) { + LinearKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: 0.16), + height: model.calculatingProportionalValue(withRatio: 0.48)), duration: 12) + CubicKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: 0.16), + height: model.calculatingProportionalValue(withRatio: 0.18) + ), duration: 2) + } + + KeyframeTrack(\.opacity) { + LinearKeyframe(0, duration: 12) + CubicKeyframe(1, duration: 2) + CubicKeyframe(0, duration: 1) + } + } + + // MARK: - RocketLargeFirework + rocketFirework(.white) + .keyframeAnimator( + initialValue: AnimationValues( + width: 0, + height: 0, + offsetX: model.calculatingProportionalValue(withRatio: -0.1), + offsetY: model.calculatingProportionalValue(withRatio: 0.48), + opacity: 0 + ), + trigger: isAnimating + ) { content, value in + content + .offset(value.offset) + .opacity(value.opacity) + } keyframes: { value in + KeyframeTrack(\.offset) { + LinearKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: -0.1), + height: model.calculatingProportionalValue(withRatio: 0.48)), duration: 14) + CubicKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: -0.1), + height: model.calculatingProportionalValue(withRatio: 0) + ), duration: 3) + } + + KeyframeTrack(\.opacity) { + LinearKeyframe(0, duration: 15) + CubicKeyframe(1, duration: 1) + CubicKeyframe(0, duration: 1) + } + } + + // MARK: - RocketLargeFirework Yellow + rocketFirework(.yellow) + .keyframeAnimator( + initialValue: AnimationValues( + width: 0, + height: 0, + offsetX: model.calculatingProportionalValue(withRatio: 0.11), + offsetY: model.calculatingProportionalValue(withRatio: 0.48), + opacity: 0 + ), + trigger: isAnimating + ) { content, value in + content + .offset(value.offset) + .opacity(value.opacity) + } keyframes: { value in + KeyframeTrack(\.offset) { + LinearKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: 0.11), + height: model.calculatingProportionalValue(withRatio: 0.48)), duration: 16) + CubicKeyframe(CGSize( + width: model.calculatingProportionalValue(withRatio: 0.11), + height: model.calculatingProportionalValue(withRatio: -0.23) + ), duration: 3) + } + + KeyframeTrack(\.opacity) { + LinearKeyframe(0, duration: 16) + CubicKeyframe(1, duration: 1) + CubicKeyframe(0, duration: 1) + } + } + } + } + + private var buildings: some View { + ZStack { + // MARK: - 􀏄 LitBuildingLarge + Image(systemName: "rectangle.fill") + .resizable() + .keyframeAnimator( + initialValue: AnimationValues( + width: model.calculatingProportionalValue(withRatio: 0.18), + height: model.calculatingProportionalValue(withRatio: 0.3), + offsetX: model.calculatingProportionalValue(withRatio: 0.07), + offsetY: model.calculatingProportionalValue(withRatio: 0.434) + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(.yellow) + .frame(width: value.width, height: value.height) + .offset(value.offset) + } keyframes: { value in + KeyframeTrack(\.opacity) { + CubicKeyframe(1, duration: 4) + } + } + + // MARK: - 􀏄 LitBuildingLarge + Image(systemName: "rectangle.fill") + .resizable() + .keyframeAnimator( + initialValue: AnimationValues( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.18), + height: model.calculatingProportionalValue(withRatio: 0.3), + offsetX: model.calculatingProportionalValue(withRatio: 0.07), + offsetY: model.calculatingProportionalValue(withRatio: 0.434) + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(value.primaryColor) + .frame(width: value.width, height: value.height) + .offset(value.offset) + } keyframes: { value in + KeyframeTrack(\.primaryColor) { + CubicKeyframe(Color.yellow.resolve(in: .init()), duration: 6) + } + } + + // MARK: - 􀏄 LitBuildingSmall + Image(systemName: "rectangle.fill") + .resizable() + .keyframeAnimator( + initialValue: AnimationValues( + primaryColor: .white, + width: model.calculatingProportionalValue(withRatio: 0.1), + height: model.calculatingProportionalValue(withRatio: 0.17), + offsetX: model.calculatingProportionalValue(withRatio: -0.09), + offsetY: model.calculatingProportionalValue(withRatio: 0.497) + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(value.primaryColor) + .frame(width: value.width, height: value.height) + .offset(value.offset) + } keyframes: { value in + KeyframeTrack(\.primaryColor) { + CubicKeyframe(Color.yellow.resolve(in: .init()), duration: 6) + } + } + + // MARK: - 􀮆 BuildingLarge + Image(systemName: "building.fill") + .resizable() + .keyframeAnimator( + initialValue: AnimationValues( + primaryColor: .gray, + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.3), + offsetX: model.calculatingProportionalValue(withRatio: 0.07), + offsetY: model.calculatingProportionalValue(withRatio: 0.434) + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(value.primaryColor) + .frame(width: value.width, height: value.height) + .offset(value.offset) + } keyframes: { value in + KeyframeTrack(\.primaryColor) { + CubicKeyframe(Color.lightGray.resolve(in: .init()), duration: 6) + } + } + + // MARK: - 􀮆 BuildingSmall + Image(systemName: "building.fill") + .resizable() + .keyframeAnimator( + initialValue: AnimationValues( + primaryColor: .gray, + width: model.calculatingProportionalValue(withRatio: 0.12), + height: model.calculatingProportionalValue(withRatio: 0.17), + offsetX: model.calculatingProportionalValue(withRatio: -0.09), + offsetY: model.calculatingProportionalValue(withRatio: 0.497) + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(value.primaryColor) + .frame(width: value.width, height: value.height) + .offset(value.offset) + } keyframes: { value in + KeyframeTrack(\.primaryColor) { + CubicKeyframe(Color.lightGray.resolve(in: .init()), duration: 6) + } + } + } + } + + private var people: some View { + ZStack { + // MARK: - 􀻸 PersonRight + Image(systemName: "person.3.sequence.fill") + .resizable() + .foregroundStyle(.black) + .keyframeAnimator( + initialValue: AnimationValues( + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.1), + offsetX: model.calculatingProportionalValue(withRatio: 0.64), + offsetY: model.calculatingProportionalValue(withRatio: 0.538) + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(value.primaryColor) + .frame(width: value.width, height: value.height) + .rotation3DEffect( + .degrees(180), + axis: FlipType.horizontal.axis + ) + .offset(value.offset) + } keyframes: { value in + KeyframeTrack(\.offset) { + LinearKeyframe( + CGSize( + width: model.calculatingProportionalValue(withRatio: 0.64), + height: model.calculatingProportionalValue(withRatio: 0.538) + ), + duration: 4 + ) + CubicKeyframe( + CGSize( + width: model.calculatingProportionalValue(withRatio: 0.34), + height: model.calculatingProportionalValue(withRatio: 0.538) + ), + duration: 2 + ) + } + } + + // MARK: - 􀻸 PersonLeft + Image(systemName: "person.3.sequence.fill") + .resizable() + .foregroundStyle(.black) + .keyframeAnimator( + initialValue: AnimationValues( + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.1), + offsetX: model.calculatingProportionalValue(withRatio: -0.64), + offsetY: model.calculatingProportionalValue(withRatio: 0.538) + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(value.primaryColor) + .frame(width: value.width, height: value.height) + .offset(value.offset) + } keyframes: { value in + KeyframeTrack(\.offset) { + LinearKeyframe( + CGSize( + width: model.calculatingProportionalValue(withRatio: -0.64), + height: model.calculatingProportionalValue(withRatio: 0.538) + ), + duration: 4 + ) + CubicKeyframe( + CGSize( + width: model.calculatingProportionalValue(withRatio: -0.34), + height: model.calculatingProportionalValue(withRatio: 0.538) + ), + duration: 2 + ) + } + } + + // MARK: - 􀝋 personCenterRight + Image(systemName: "person.3.fill") + .resizable() + .foregroundStyle(.black) + .keyframeAnimator( + initialValue: AnimationValues( + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.1), + offsetX: model.calculatingProportionalValue(withRatio: 0.12), + offsetY: model.calculatingProportionalValue(withRatio: 0.538), + opacity: 0 + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(value.primaryColor) + .frame(width: value.width, height: value.height) + .offset(value.offset) + .opacity(value.opacity) + } keyframes: { value in + KeyframeTrack(\.opacity) { + CubicKeyframe(0, duration: 5) + CubicKeyframe(1, duration: 2) + } + } + + // MARK: - 􀝋 personCenterRight + Image(systemName: "person.3.fill") + .resizable() + .foregroundStyle(.black) + .keyframeAnimator( + initialValue: AnimationValues( + width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.1), + offsetX: model.calculatingProportionalValue(withRatio: -0.12), + offsetY: model.calculatingProportionalValue(withRatio: 0.538), + opacity: 0 + ), + trigger: isAnimating + ) { content, value in + content + .foregroundStyle(value.primaryColor) + .frame(width: value.width, height: value.height) + .offset(value.offset) + .opacity(value.opacity) + } keyframes: { value in + KeyframeTrack(\.opacity) { + CubicKeyframe(0, duration: 5) + CubicKeyframe(1, duration: 2) + } + } + } + } + + private var fireworks: some View { + ZStack { + // MARK: - 􀇲 smallFireworkPink + Image(systemName: "timelapse") + .resizable() + .foregroundStyle(.pink) + .frame(width: model.calculatingProportionalValue(withRatio: 0.125), + height: model.calculatingProportionalValue(withRatio: 0.125)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.225), + y: model.calculatingProportionalValue(withRatio: 0.125)) + .keyframeAnimator(initialValue: 0, trigger: isAnimating) { content, value in + content + .opacity(value) + } keyframes: { value in + KeyframeTrack { + LinearKeyframe(0, duration: 10) + CubicKeyframe(1, duration: 1) + CubicKeyframe(0, duration: 2) + } + } + + // MARK: - 􀇲 smallFireworkYellow + Image(systemName: "timelapse") + .resizable() + .foregroundStyle(.yellow) + .frame(width: model.calculatingProportionalValue(withRatio: 0.125), + height: model.calculatingProportionalValue(withRatio: 0.125)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.075), + y: model.calculatingProportionalValue(withRatio: 0.25)) + .keyframeAnimator(initialValue: 0, trigger: isAnimating) { content, value in + content + .opacity(value) + } keyframes: { value in + KeyframeTrack { + LinearKeyframe(0, duration: 12) + CubicKeyframe(1, duration: 1) + CubicKeyframe(0, duration: 2) + } + } + + // MARK: - 􀇲 smallFireworkGreen + Image(systemName: "timelapse") + .resizable() + .foregroundStyle(.green) + .frame(width: model.calculatingProportionalValue(withRatio: 0.125), + height: model.calculatingProportionalValue(withRatio: 0.125)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.34), + y: model.calculatingProportionalValue(withRatio: 0.18)) + .keyframeAnimator(initialValue: 0, trigger: isAnimating) { content, value in + content + .opacity(value) + } keyframes: { value in + KeyframeTrack { + LinearKeyframe(0, duration: 13) + CubicKeyframe(1, duration: 1) + CubicKeyframe(0, duration: 2) + } + } + + // MARK: - 􂁞 mediumFirework + Image(systemName: "fireworks") + .resizable() + .foregroundStyle(.yellow, .red) + .frame(width: model.calculatingProportionalValue(withRatio: 0.24), + height: model.calculatingProportionalValue(withRatio: 0.24)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.14), + y: model.calculatingProportionalValue(withRatio: 0.07)) + .keyframeAnimator(initialValue: 0, trigger: isAnimating) { content, value in + content + .opacity(value) + } keyframes: { value in + KeyframeTrack { + LinearKeyframe(0, duration: 15) + CubicKeyframe(1, duration: 1) + CubicKeyframe(0, duration: 2) + } + } + .symbolEffect(.bounce, value: isBouncedMediumFirework) + + largeFirework(primaryColor: .white, secondaryColor: .red) + .offset(x: model.calculatingProportionalValue(withRatio: -0.17), + y: model.calculatingProportionalValue(withRatio: -0.18)) + .keyframeAnimator(initialValue: 0, trigger: isAnimating) { content, value in + content + .opacity(value) + .scaleEffect(value) + } keyframes: { value in + KeyframeTrack { + LinearKeyframe(0, duration: 18) + CubicKeyframe(2, duration: 1) + CubicKeyframe(0, duration: 2) + } + } + .symbolEffect(.variableColor.dimInactiveLayers, + options: .repeating.speed(2), + isActive: true) + + largeFirework(primaryColor: .yellow, secondaryColor: .white) + .offset(x: model.calculatingProportionalValue(withRatio: 0.105), + y: model.calculatingProportionalValue(withRatio: -0.34)) + .keyframeAnimator(initialValue: 0, trigger: isAnimating) { content, value in + content + .opacity(value) + .scaleEffect(value) + } keyframes: { value in + KeyframeTrack { + LinearKeyframe(0, duration: 19) + CubicKeyframe(1.2, duration: 1) + CubicKeyframe(0, duration: 2) + } + } + .symbolEffect(.variableColor.dimInactiveLayers, + options: .repeating.speed(2), + isActive: true) + } + } + + // MARK: - RocketFirework + private func rocketFirework(_ color: Color) -> some View { + + ZStack { + // MARK: - 􁎄 Rocket smoke + Image(systemName: "water.waves") + .resizable() + .foregroundStyle(color) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.2), + height: model.calculatingProportionalValue(withRatio: 0.1)) + .rotationEffect(.degrees(90)) + + // MARK: - 􀏄 Rocket smoke right concealment + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.midnightNavy) + .frame(width: model.calculatingProportionalValue(withRatio: 0.05), + height: model.calculatingProportionalValue(withRatio: 0.2)) + .offset(x: model.calculatingProportionalValue(withRatio: 0.046)) + + // MARK: - 􀏄 Rocket smoke left concealment + Image(systemName: "rectangle.fill") + .resizable() + .foregroundStyle(.midnightNavy) + .frame(width: model.calculatingProportionalValue(withRatio: 0.05), + height: model.calculatingProportionalValue(withRatio: 0.2)) + .offset(x: model.calculatingProportionalValue(withRatio: -0.046)) + + // MARK: - 􀀁 Rocket smoke top + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(color) + .frame(width: model.calculatingProportionalValue(withRatio: 0.03), + height: model.calculatingProportionalValue(withRatio: 0.04)) + .offset(y: model.calculatingProportionalValue(withRatio: -0.1)) + } + } + + private func largeFirework(primaryColor: Color, secondaryColor: Color) -> some View { + ZStack { + // MARK: - 􀌙 large horizontal firework + Image(systemName: "dot.radiowaves.left.and.right") + .resizable() + .foregroundStyle(primaryColor, secondaryColor) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.347), + height: model.calculatingProportionalValue(withRatio: 0.235)) + + // MARK: - 􀌙 large vertical firework + Image(systemName: "dot.radiowaves.left.and.right") + .resizable() + .foregroundStyle(primaryColor, secondaryColor) + .fontWeight(.black) + .frame(width: model.calculatingProportionalValue(withRatio: 0.347), + height: model.calculatingProportionalValue(withRatio: 0.235)) + .rotationEffect(.degrees(90)) + + // MARK: - 􁅃 large dot firework + Image(systemName: "circle.dotted") + .resizable() + .foregroundStyle(primaryColor) + .fontWeight(.ultraLight) + .frame(width: model.calculatingProportionalValue(withRatio: 0.42), + height: model.calculatingProportionalValue(withRatio: 0.42)) + } } } From 9ec151f7a3fd4a5d22a16f3219097d57a9ad6a3a Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 00:11:34 +0900 Subject: [PATCH 094/108] Refactor FireworksArt --- .../ArtWorks/Fireworks/FireworksArtView.swift | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift index 3395736..7ed9033 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift @@ -45,7 +45,17 @@ struct FireworksArtView: View { } } } +} + +#Preview { + NavigationStack { + FireworksArtView() + .environment(ArtWorkModel.preview) + } +} +// MARK: - Private components +extension FireworksArtView { // MARK: - Background private var background: some View { Color.midnightNavy @@ -779,10 +789,3 @@ struct FireworksArtView: View { } } } - -#Preview { - NavigationStack { - FireworksArtView() - .environment(ArtWorkModel.preview) - } -} From d73fecae528c55b51b78f5f90205ce27d7f60280 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 06:29:40 +0900 Subject: [PATCH 095/108] Remove iosdc 2022 logo --- .../project.pbxproj | 28 ------- .../Entity/iOSDCJapan2022SymbolType.swift | 51 ------------ .../iOSDCJapan2022/iOSDCJapan2022Logo.swift | 41 ---------- .../iOSDCJapan2022/iOSDCJapan2022Symbol.swift | 80 ------------------- 4 files changed, 200 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/Entity/iOSDCJapan2022SymbolType.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Logo.swift delete mode 100644 SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Symbol.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 46815c0..af2ef8e 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971D9DE928C9731D00136A36 /* iOSDCJapan2022SymbolType.swift */; }; 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */; }; 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */; }; 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1F28939B04006DF0BE /* FlipType.swift */; }; @@ -48,8 +47,6 @@ 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */; }; 97AD532D2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD532C2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift */; }; 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53302B71A5130034FB5D /* GalleryGridView.swift */; }; - 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */; }; - 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */; }; 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; 97E11D542817381200B2AB32 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97E11D532817381200B2AB32 /* Assets.xcassets */; }; 97E11D572817381200B2AB32 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97E11D562817381200B2AB32 /* Preview Assets.xcassets */; }; @@ -67,7 +64,6 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 971D9DE928C9731D00136A36 /* iOSDCJapan2022SymbolType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022SymbolType.swift; sourceTree = ""; }; 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithFont.swift; sourceTree = ""; }; 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithWidthAndHeight.swift; sourceTree = ""; }; 9748BE1F28939B04006DF0BE /* FlipType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlipType.swift; sourceTree = ""; }; @@ -109,8 +105,6 @@ 97AD532A2B71068B0034FB5D /* AfroBoyArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AfroBoyArtView.swift; sourceTree = ""; }; 97AD532C2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AfroBoyArtView+CoverArt.swift"; sourceTree = ""; }; 97AD53302B71A5130034FB5D /* GalleryGridView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GalleryGridView.swift; sourceTree = ""; }; - 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Symbol.swift; sourceTree = ""; }; - 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDCJapan2022Logo.swift; sourceTree = ""; }; 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFSymbolsArtCollection.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SFSymbolsArtCollectionApp.swift; sourceTree = ""; }; 97E11D532817381200B2AB32 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -147,14 +141,6 @@ path = Common; sourceTree = ""; }; - 971D9DEB28C973AD00136A36 /* Entity */ = { - isa = PBXGroup; - children = ( - 971D9DE928C9731D00136A36 /* iOSDCJapan2022SymbolType.swift */, - ); - path = Entity; - sourceTree = ""; - }; 973B2CA228C2584F006ED5F0 /* ViewModifiers */ = { isa = PBXGroup; children = ( @@ -186,7 +172,6 @@ isa = PBXGroup; children = ( 9748BE6528A395D5006DF0BE /* ArtWork.swift */, - 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */, ); path = ArtWorks; sourceTree = ""; @@ -309,16 +294,6 @@ path = AnimatableSymbolView; sourceTree = ""; }; - 97CD46E528BEF8A000919B65 /* iOSDCJapan2022 */ = { - isa = PBXGroup; - children = ( - 97CD46E828BF080200919B65 /* iOSDCJapan2022Logo.swift */, - 97CD46E328BEF84100919B65 /* iOSDCJapan2022Symbol.swift */, - 971D9DEB28C973AD00136A36 /* Entity */, - ); - path = iOSDCJapan2022; - sourceTree = ""; - }; 97E11D432817381100B2AB32 = { isa = PBXGroup; children = ( @@ -507,13 +482,11 @@ 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */, 97AD532D2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift in Sources */, 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, - 971D9DEA28C9731D00136A36 /* iOSDCJapan2022SymbolType.swift in Sources */, 9778A4932B781DCE001BF9E8 /* FireworksArtView.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, 9767DF152B75F7BE00457DA1 /* WorldPeaceArtView+Element.swift in Sources */, 97EF43982B733337003648F5 /* MagicianArtView.swift in Sources */, 9767DEFA2B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift in Sources */, - 97CD46E928BF080300919B65 /* iOSDCJapan2022Logo.swift in Sources */, 97AD53242B70E48F0034FB5D /* PlayButton.swift in Sources */, 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */, 97AD531A2B70E0530034FB5D /* Font.Weight+.swift in Sources */, @@ -540,7 +513,6 @@ 9767DF1F2B762E9000457DA1 /* ImWearingPantsArtView+FaceElement.swift in Sources */, 97AD53222B70E3FA0034FB5D /* AnimatableSymbolView.swift in Sources */, 9767DF032B759B2D00457DA1 /* PartyAnimalsArtView+CoverArt.swift in Sources */, - 97CD46E428BEF84100919B65 /* iOSDCJapan2022Symbol.swift in Sources */, 9767DF0B2B75D1A100457DA1 /* SymbolArtElement.swift in Sources */, 97EF43A12B74CA38003648F5 /* CrayonBoyArtView+CoverArt.swift in Sources */, 97EF43902B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/Entity/iOSDCJapan2022SymbolType.swift b/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/Entity/iOSDCJapan2022SymbolType.swift deleted file mode 100644 index a997897..0000000 --- a/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/Entity/iOSDCJapan2022SymbolType.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// iOSDCJapan2022SymbolType.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/08. -// - -import SwiftUI - -enum iOSDCJapan2022SymbolType: String, Identifiable, CaseIterable { - case green - case orange - case blue - case punk - - var id: String { self.rawValue } - - var configuration: SymbolAppearance { - switch self { - case .green: - return SymbolAppearance(color: .green, - sizeMagnification: 0.25, - offsetXMagnification: 0.1, - offsetYMagnification: -0.15) - - case .orange: - return SymbolAppearance(color: .orange, - sizeMagnification: 0.2, - offsetXMagnification: -0.07, - offsetYMagnification: 0.17) - case .blue: - return SymbolAppearance(color: .blue, - sizeMagnification: 0.16, - offsetXMagnification: -0.22, - offsetYMagnification: -0.12) - - case .punk: - return SymbolAppearance(color: .pink, - sizeMagnification: 0.12, - offsetXMagnification: 0.2, - offsetYMagnification: 0.15) - } - } - - struct SymbolAppearance { - let color: Color - let sizeMagnification: CGFloat - let offsetXMagnification: CGFloat - let offsetYMagnification: CGFloat - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Logo.swift b/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Logo.swift deleted file mode 100644 index dc75907..0000000 --- a/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Logo.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// iOSDCJapan2022Logo.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/31. -// - -import SwiftUI - -struct iOSDCJapan2022Logo: View { - - var body: some View { - - GeometryReader { proxy in - - let baseLength = proxy.baseLength * 2 - - ZStack { - ForEach(iOSDCJapan2022SymbolType.allCases) { type in - let appearance = type.configuration - - iOSDCJapan2022Symbol(size: baseLength * appearance.sizeMagnification, - color: appearance.color) - .offset(x: baseLength * appearance.offsetXMagnification, - y: baseLength * appearance.offsetYMagnification) - } - -// Image(symbol: .circleSquareFill) -// .arrangeShape(color: .white, -// fontSize: baseLength) - } - .position(proxy.localCenter) - } - } -} - -struct iOSDCJapan2022Logo_Previews: PreviewProvider { - static var previews: some View { - iOSDCJapan2022Logo() - } -} diff --git a/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Symbol.swift b/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Symbol.swift deleted file mode 100644 index 36fcda1..0000000 --- a/SFSymbolsArtCollection/ArtWorks/iOSDCJapan2022/iOSDCJapan2022Symbol.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// iOSDCJapan2022.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/31. -// - -import SwiftUI - -extension iOSDCJapan2022Symbol { - - init(size: CGFloat, color: Color) { - self.size = size - self.color = color - innerSlowmoSize = size * 0.73 - dotSize = size * 0.13 - - let x0_34Value = size * 0.34 - let x0_58Value = size * 0.58 - let x0_68Value = size * 0.68 - - dotOffsets = [ - DotOffset(x: 0, y: -x0_68Value), - DotOffset(x: x0_34Value, y: -x0_58Value), - DotOffset(x: x0_58Value, y: -x0_34Value), - DotOffset(x: x0_68Value, y: 0), - DotOffset(x: x0_58Value, y: x0_34Value), - DotOffset(x: x0_34Value, y: x0_58Value), - DotOffset(x: 0, y: x0_68Value), - DotOffset(x: -x0_34Value, y: x0_58Value), - DotOffset(x: -x0_58Value, y: x0_34Value), - DotOffset(x: -x0_68Value, y: 0), - DotOffset(x: -x0_34Value, y: -x0_58Value), - DotOffset(x: -x0_58Value, y: -x0_34Value), - ] - } - - struct DotOffset: Hashable { - let x: CGFloat - let y: CGFloat - } -} - -struct iOSDCJapan2022Symbol: View { - - let size: CGFloat - let color: Color - let innerSlowmoSize: CGFloat - let dotSize: CGFloat - let dotOffsets: [DotOffset] - - var body: some View { - ZStack { - Image(systemName: "slowmo") - .arrangeShape(color: color, - fontSize: size) - - Image(systemName: "slowmo") - .arrangeShape(color: color, - fontSize: innerSlowmoSize, - fontWeight: .bold) - - ForEach(dotOffsets, id: \.self) { offset in - Image(systemName: "circle.fill") - .arrangeShape(color: color, - fontSize: dotSize, - offsetX: offset.x, - offsetY: offset.y) - } - } - } -} - -struct iOSDCJapan2022Symbol_Previews: PreviewProvider { - static var previews: some View { - iOSDCJapan2022Symbol(size: 100, color: .black) - iOSDCJapan2022Symbol(size: 50, color: .red) - iOSDCJapan2022Symbol(size: 25, color: .gray) - } -} From 177880ff268ff71382a453ddaf7b9f437ba59be8 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 06:30:24 +0900 Subject: [PATCH 096/108] Remove unused files --- .../project.pbxproj | 36 ----------- SFSymbolsArtCollection/ArtWorks/ArtWork.swift | 39 ------------ .../ViewModifiers/ArrangeShapeWithFont.swift | 54 ---------------- .../ArrangeShapeWithWidthAndHeight.swift | 62 ------------------- 4 files changed, 191 deletions(-) delete mode 100644 SFSymbolsArtCollection/ArtWorks/ArtWork.swift delete mode 100644 SFSymbolsArtCollection/Common/ViewModifiers/ArrangeShapeWithFont.swift delete mode 100644 SFSymbolsArtCollection/Common/ViewModifiers/ArrangeShapeWithWidthAndHeight.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index af2ef8e..b9eb94d 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -7,10 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */; }; - 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */; }; 9748BE2028939B04006DF0BE /* FlipType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE1F28939B04006DF0BE /* FlipType.swift */; }; - 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9748BE6528A395D5006DF0BE /* ArtWork.swift */; }; 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */; }; 9767DEFA2B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEF92B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift */; }; 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */; }; @@ -64,11 +61,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithFont.swift; sourceTree = ""; }; - 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrangeShapeWithWidthAndHeight.swift; sourceTree = ""; }; 9748BE1F28939B04006DF0BE /* FlipType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlipType.swift; sourceTree = ""; }; 9748BE62289F4BFB006DF0BE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 9748BE6528A395D5006DF0BE /* ArtWork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtWork.swift; sourceTree = ""; }; 97624C3228C4F43F004E1720 /* GeometryProxy+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GeometryProxy+.swift"; sourceTree = ""; }; 9767DEF92B751C2C00457DA1 /* WorldPeaceArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WorldPeaceArtView+CoverArt.swift"; sourceTree = ""; }; 9767DEFF2B752E4700457DA1 /* WorldPeaceArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldPeaceArtView.swift; sourceTree = ""; }; @@ -133,23 +127,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 971D9DE628C93EB500136A36 /* Common */ = { - isa = PBXGroup; - children = ( - 973B2CA228C2584F006ED5F0 /* ViewModifiers */, - ); - path = Common; - sourceTree = ""; - }; - 973B2CA228C2584F006ED5F0 /* ViewModifiers */ = { - isa = PBXGroup; - children = ( - 973B2CA028C2546C006ED5F0 /* ArrangeShapeWithFont.swift */, - 973B2CA328C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift */, - ); - path = ViewModifiers; - sourceTree = ""; - }; 9748BE1E28939AE5006DF0BE /* Enums */ = { isa = PBXGroup; children = ( @@ -168,14 +145,6 @@ path = DemonWrestler; sourceTree = ""; }; - 97624C3628C74AA0004E1720 /* ArtWorks */ = { - isa = PBXGroup; - children = ( - 9748BE6528A395D5006DF0BE /* ArtWork.swift */, - ); - path = ArtWorks; - sourceTree = ""; - }; 9767DEF82B751C1300457DA1 /* WorldPeace */ = { isa = PBXGroup; children = ( @@ -316,8 +285,6 @@ 9748BE62289F4BFB006DF0BE /* Info.plist */, 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */, 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */, - 97624C3628C74AA0004E1720 /* ArtWorks */, - 971D9DE628C93EB500136A36 /* Common */, 97E11D532817381200B2AB32 /* Assets.xcassets */, 97E11D552817381200B2AB32 /* Preview Content */, ); @@ -494,18 +461,15 @@ 97AD53312B71A5130034FB5D /* GalleryGridView.swift in Sources */, 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */, 9778A4972B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift in Sources */, - 9748BE6628A395D5006DF0BE /* ArtWork.swift in Sources */, 9767DF272B76CCE300457DA1 /* ArmHairArtView+Element.swift in Sources */, 9767DF292B76FF0400457DA1 /* DemonWrestlerArtView.swift in Sources */, 97AD532B2B71068B0034FB5D /* AfroBoyArtView.swift in Sources */, - 973B2CA128C2546C006ED5F0 /* ArrangeShapeWithFont.swift in Sources */, 97624C3328C4F43F004E1720 /* GeometryProxy+.swift in Sources */, 97EF43952B72DA69003648F5 /* ImWearingPantsArtView.swift in Sources */, 9767DF232B7658E200457DA1 /* ArmHairArtView+CoverArt.swift in Sources */, 9767DF1D2B762E1200457DA1 /* ImWearingPantsArtView+Pose.swift in Sources */, 97AD53292B7100670034FB5D /* ArtWorkModel.swift in Sources */, 97EF439C2B7421A7003648F5 /* MagicianArtView+CoverArt.swift in Sources */, - 973B2CA428C25DAA006ED5F0 /* ArrangeShapeWithWidthAndHeight.swift in Sources */, 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */, 9767DF1B2B762DA000457DA1 /* ImWearingPantsArtView+FinishPoseElement.swift in Sources */, 97EF43A52B74F27D003648F5 /* CrayonBoyArtView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtWorks/ArtWork.swift b/SFSymbolsArtCollection/ArtWorks/ArtWork.swift deleted file mode 100644 index 54dc1ab..0000000 --- a/SFSymbolsArtCollection/ArtWorks/ArtWork.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// ArtWork.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/08/10. -// - -import Foundation - -enum ArtWork: Identifiable, CaseIterable { - case crayonBoy - case magician - case worldPeace - case partyAnimals - case armHair - case demonWrestler - case fireworks - - var title: String { - switch self { - case .crayonBoy: - return "Crayon Boy" - case .magician: - return "Magician" - case .worldPeace: - return "WORLD PEACE" - case .partyAnimals: - return "Party Animals" - case .armHair: - return "Arm Hair" - case .demonWrestler: - return "Demon Wrestler" - case .fireworks: - return "Fireworks" - } - } - - var id: String { self.title } -} diff --git a/SFSymbolsArtCollection/Common/ViewModifiers/ArrangeShapeWithFont.swift b/SFSymbolsArtCollection/Common/ViewModifiers/ArrangeShapeWithFont.swift deleted file mode 100644 index 54f2c7e..0000000 --- a/SFSymbolsArtCollection/Common/ViewModifiers/ArrangeShapeWithFont.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// ArrangeShape.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/03. -// - -import SwiftUI - -struct ArrangeShapeWithFontModifier: ViewModifier { - - let color: Color - let fontSize: CGFloat - let fontWeight: Font.Weight - let flipType: FlipType - let rotationDegrees: CGFloat - let offsetX: CGFloat - let offsetY: CGFloat - - func body(content: Content) -> some View { - content - .font(.system(size: fontSize, - weight: fontWeight, - design: .default)) - .rotation3DEffect(.degrees(180), - axis: flipType.axis, - anchorZ: 1) - .rotation3DEffect(.degrees(rotationDegrees), - axis: (x: 0, y: 0, z: -1), - anchorZ: 1) - .offset(x: offsetX, y: offsetY) - .foregroundColor(color) - } -} - -extension Image { - - func arrangeShape(color: Color = .black, - fontSize: CGFloat, - fontWeight: Font.Weight = .regular, - flipType: FlipType = .none, - rotationDegrees: CGFloat = 0, - offsetX: CGFloat = 0, - offsetY: CGFloat = 0) -> some View { - - self.modifier(ArrangeShapeWithFontModifier(color: color, - fontSize: fontSize, - fontWeight: fontWeight, - flipType: flipType, - rotationDegrees: rotationDegrees, - offsetX: offsetX, - offsetY: offsetY)) - } -} diff --git a/SFSymbolsArtCollection/Common/ViewModifiers/ArrangeShapeWithWidthAndHeight.swift b/SFSymbolsArtCollection/Common/ViewModifiers/ArrangeShapeWithWidthAndHeight.swift deleted file mode 100644 index 273ccbd..0000000 --- a/SFSymbolsArtCollection/Common/ViewModifiers/ArrangeShapeWithWidthAndHeight.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// ArrangeShapeWidthAndHeight.swift -// SFSymbolsArtCollection -// -// Created by 平岡修 on 2022/09/03. -// - -import Foundation - -import SwiftUI - -struct ArrangeShapeWithWidthAndHeightModifier: ViewModifier { - - let color: Color - let width: CGFloat? - let height: CGFloat? - let fontWeight: Font.Weight - let flipType: FlipType - let rotationDegrees: CGFloat - let offsetX: CGFloat - let offsetY: CGFloat - - func body(content: Content) -> some View { - content - .frame(width: width, - height: height) - .font(.body.weight(fontWeight)) - .rotation3DEffect(.degrees(180), - axis: flipType.axis, - anchorZ: 1) - .rotation3DEffect(.degrees(rotationDegrees), - axis: (x: 0, y: 0, z: -1), - anchorZ: 1) - .offset(x: offsetX, y: offsetY) - .foregroundColor(color) - - } -} - -extension Image { - - func arrangeShape(color: Color = .black, - width: CGFloat? = nil, - height: CGFloat? = nil, - fontWeight: Font.Weight = .regular, - flipType: FlipType = .none, - rotationDegrees: CGFloat = 0, - offsetX: CGFloat = 0, - offsetY: CGFloat = 0) -> some View { - - self - .resizable() - .modifier(ArrangeShapeWithWidthAndHeightModifier(color: color, - width: width, - height: height, - fontWeight: fontWeight, - flipType: flipType, - rotationDegrees: rotationDegrees, - offsetX: offsetX, - offsetY: offsetY)) - } -} From c66e246a2385cb0d0902bf76109af76639a15096 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 06:31:48 +0900 Subject: [PATCH 097/108] Remove SFUserFriendlySymbols --- .../project.pbxproj | 23 ------------------- .../xcshareddata/swiftpm/Package.resolved | 14 ----------- 2 files changed, 37 deletions(-) delete mode 100644 SFSymbolsArtCollection.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index b9eb94d..0e37b89 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -47,7 +47,6 @@ 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E11D4F2817381100B2AB32 /* SFSymbolsArtCollectionApp.swift */; }; 97E11D542817381200B2AB32 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97E11D532817381200B2AB32 /* Assets.xcassets */; }; 97E11D572817381200B2AB32 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97E11D562817381200B2AB32 /* Preview Assets.xcassets */; }; - 97E11DF028176A0D00B2AB32 /* SFUserFriendlySymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 97E11DEF28176A0D00B2AB32 /* SFUserFriendlySymbols */; }; 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438A2B725E02003648F5 /* NosebleedArtView.swift */; }; 97EF438D2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438C2B726CE6003648F5 /* ArtWorkModel+InitialSymbolRow.swift */; }; 97EF43902B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF438F2B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift */; }; @@ -120,7 +119,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 97E11DF028176A0D00B2AB32 /* SFUserFriendlySymbols in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -378,7 +376,6 @@ ); name = SFSymbolsArtCollection; packageProductDependencies = ( - 97E11DEF28176A0D00B2AB32 /* SFUserFriendlySymbols */, ); productName = SFSymbolsArtCollection; productReference = 97E11D4C2817381100B2AB32 /* SFSymbolsArtCollection.app */; @@ -409,7 +406,6 @@ ); mainGroup = 97E11D432817381100B2AB32; packageReferences = ( - 97E11DEE28176A0D00B2AB32 /* XCRemoteSwiftPackageReference "SFUserFriendlySymbols" */, ); productRefGroup = 97E11D4D2817381100B2AB32 /* Products */; projectDirPath = ""; @@ -693,25 +689,6 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ - -/* Begin XCRemoteSwiftPackageReference section */ - 97E11DEE28176A0D00B2AB32 /* XCRemoteSwiftPackageReference "SFUserFriendlySymbols" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/littleossa/SFUserFriendlySymbols.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 0.4.0; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 97E11DEF28176A0D00B2AB32 /* SFUserFriendlySymbols */ = { - isa = XCSwiftPackageProductDependency; - package = 97E11DEE28176A0D00B2AB32 /* XCRemoteSwiftPackageReference "SFUserFriendlySymbols" */; - productName = SFUserFriendlySymbols; - }; -/* End XCSwiftPackageProductDependency section */ }; rootObject = 97E11D442817381100B2AB32 /* Project object */; } diff --git a/SFSymbolsArtCollection.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/SFSymbolsArtCollection.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 4b6b578..0000000 --- a/SFSymbolsArtCollection.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pins" : [ - { - "identity" : "sfuserfriendlysymbols", - "kind" : "remoteSourceControl", - "location" : "https://github.com/littleossa/SFUserFriendlySymbols.git", - "state" : { - "revision" : "9d003e1c818de1dbe34a36b197ce11d9524a54d9", - "version" : "0.4.0" - } - } - ], - "version" : 2 -} From 816884b5e2468c86a21a9720ff69dc8c7223f826 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 17:39:31 +0900 Subject: [PATCH 098/108] Add SweetBeanBunMan --- .../project.pbxproj | 12 + .../ArtGalleryView.swift | 7 + .../SweetBeanBunManArtView.swift | 313 ++++++++++++++++++ 3 files changed, 332 insertions(+) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 0e37b89..593bca6 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -33,6 +33,7 @@ 9778A4932B781DCE001BF9E8 /* FireworksArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4922B781DCE001BF9E8 /* FireworksArtView.swift */; }; 9778A4952B78C076001BF9E8 /* FireworksArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4942B78C076001BF9E8 /* FireworksArtView+Element.swift */; }; 9778A4972B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4962B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift */; }; + 9778A49D2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A49C2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -87,6 +88,7 @@ 9778A4922B781DCE001BF9E8 /* FireworksArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FireworksArtView.swift; sourceTree = ""; }; 9778A4942B78C076001BF9E8 /* FireworksArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FireworksArtView+Element.swift"; sourceTree = ""; }; 9778A4962B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FireworksArtView+CoverArt.swift"; sourceTree = ""; }; + 9778A49C2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SweetBeanBunManArtView.swift; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -183,6 +185,14 @@ path = Fireworks; sourceTree = ""; }; + 9778A49B2B7974A3001BF9E8 /* SweetBeanBunMan */ = { + isa = PBXGroup; + children = ( + 9778A49C2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift */, + ); + path = SweetBeanBunMan; + sourceTree = ""; + }; 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */ = { isa = PBXGroup; children = ( @@ -235,6 +245,7 @@ 9748BE4428980FE4006DF0BE /* DemonWrestler */, 9778A4912B781DA6001BF9E8 /* Fireworks */, 97AD531E2B70E2770034FB5D /* AfroBoy */, + 9778A49B2B7974A3001BF9E8 /* SweetBeanBunMan */, 97EF43892B725DE7003648F5 /* Nosebleed */, 97EF43912B72D3AF003648F5 /* ImWearingPants */, ); @@ -478,6 +489,7 @@ 97EF43902B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift in Sources */, 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */, 9767DF0F2B75DFB400457DA1 /* SymbolArtDisplayView.swift in Sources */, + 9778A49D2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift in Sources */, 9767DF252B76C9BE00457DA1 /* ArmHairArtView.swift in Sources */, 97E11D502817381100B2AB32 /* SFSymbolsArtCollectionApp.swift in Sources */, 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index 4d715d7..fb7a450 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -92,6 +92,13 @@ struct ArtGalleryView: View { ) } + NavigationLink { + SweetBeanBunManArtView() + } label: { + SweetBeanBunManArtView.CoverArt() + .galleryGridItemView(length: model.galleryColumnLength) + } + NavigationLink { AfroBoyArtView() } label: { diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift new file mode 100644 index 0000000..64ff7cb --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift @@ -0,0 +1,313 @@ +// +// SweetBeanBunManArtView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension SweetBeanBunManArtView { + + enum Element: String, CaseIterable, Identifiable { + case sweetBeans + case face + case eyeConcealmentRight + case eyeConcealmentLeft + case mouthConcealmentRight + case mouthConcealmentLeft + case eyebrowRight + case eyebrowLeft + case eyebrowConcealmentRight + case eyebrowConcealmentLeft + case eyeRight + case eyeLeft + case mouth + case mouthConcealment + case centerNose + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .sweetBeans: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .darkBrown, + widthRatio: 0.7, + heightRatio: 0.7, + symbolCountToWaitFor: 0 + ) + case .face: + SymbolArtElement( + symbol: "􁺱", + name: "ev.plug.ac.gb.t.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.second), + primaryColor: .orange, + secondaryColor: .paleOrange, + widthRatio: 0.8, + heightRatio: 0.7, + verticalOffsetRatio: 0.05, + symbolCountToWaitFor: 1 + ) + case .eyeConcealmentRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: -0.14, + symbolCountToWaitFor: 2 + ) + case .eyeConcealmentLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.1, + verticalOffsetRatio: -0.14, + symbolCountToWaitFor: 2 + ) + case .mouthConcealmentRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.175, + heightRatio: 0.175, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: 0.19, + symbolCountToWaitFor: 2 + ) + case .mouthConcealmentLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.175, + heightRatio: 0.175, + horizontalOffsetRatio: -0.11, + verticalOffsetRatio: 0.19, + symbolCountToWaitFor: 2 + ) + case .eyebrowRight: + SymbolArtElement( + symbol: "􀙱", + name: "wave.3.left", + initialPosition: .third(.third), + primaryColor: .black, + widthRatio: 0.1, + heightRatio: 0.2, + rotationDegrees: 90, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.19, + symbolCountToWaitFor: 3 + ) + + case .eyebrowLeft: + SymbolArtElement( + symbol: "􀙱", + name: "wave.3.left", + initialPosition: .third(.third), + primaryColor: .black, + widthRatio: 0.1, + heightRatio: 0.2, + rotationDegrees: 90, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: -0.19, + symbolCountToWaitFor: 3 + ) + case .eyebrowConcealmentRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.16, + heightRatio: 0.1, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.17, + symbolCountToWaitFor: 4 + ) + case .eyebrowConcealmentLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.16, + heightRatio: 0.1, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: -0.17, + symbolCountToWaitFor: 4 + ) + case .eyeRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .black, + widthRatio: 0.05, + heightRatio: 0.1, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.15, + symbolCountToWaitFor: 5 + ) + case .eyeLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .black, + widthRatio: 0.05, + heightRatio: 0.1, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: -0.15, + symbolCountToWaitFor: 5 + ) + case .mouth: + SymbolArtElement( + symbol: "􀼭", + name: "rainbow", + initialPosition: .third(.fourth), + primaryColor: .black, + widthRatio: 0.4, + heightRatio: 0.1, + rotationDegrees: 180, + verticalOffsetRatio: 0.2, + symbolCountToWaitFor: 6 + ) + case .mouthConcealment: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.3486, + heightRatio: 0.135, + horizontalOffsetRatio: 0.003, + verticalOffsetRatio: 0.17, + symbolCountToWaitFor: 7 + ) + case .centerNose: + SymbolArtElement( + symbol: "􀜫", + name: "stop.circle.fill", + initialPrimaryColor: .white, + initialPosition: .third(.fifth), + primaryColor: .white, + secondaryColor: .red, + widthRatio: 0.2, + heightRatio: 0.2, + verticalOffsetRatio: 0.01, + symbolCountToWaitFor: 8 + ) + } + } + } +} + +struct SweetBeanBunManArtView: View { + + @State private var isAnimating = false + + var body: some View { + ZStack { + ForEach(Element.allCases) { + AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) + } + } + .navigationTitle("Sweet bean bun man") + .navigationBarTitleDisplayMode(.inline) + .toolbar(content: { + ToolbarItemGroup(placement: .bottomBar) { + Spacer() + + PlayButton { + isAnimating = true + } + .font(.system(size: 32)) + .disabled(isAnimating) + } + }) + } +} + +#Preview { + NavigationStack { + SweetBeanBunManArtView() + .environment(ArtWorkModel.preview) + } +} + +extension SweetBeanBunManArtView { + + struct CoverArt: View { + + @Environment(ArtWorkModel.self) var model + + var body: some View { + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.black.opacity(0.9)) + .frame( + width: model.calculatingProportionalValue( + withRatio: 0.7, + shouldResizeForCoverArt: true + ), + height: model.calculatingProportionalValue( + withRatio: 0.7, + shouldResizeForCoverArt: true + ) + ) + + Image(systemName: "ev.plug.ac.gb.t.fill") + .resizable() + .foregroundStyle(.black.opacity(0.9)) + .frame( + width: model.calculatingProportionalValue( + withRatio: 0.8, + shouldResizeForCoverArt: true + ), + height: model.calculatingProportionalValue( + withRatio: 0.7, + shouldResizeForCoverArt: true + ) + ) + .offset(y: model.calculatingProportionalValue( + withRatio: 0.05, + shouldResizeForCoverArt: true + )) + + Image(systemName: "questionmark.app.fill") + .foregroundStyle(.white, .black.opacity(0.9)) + .font(.system(size: model.calculatingProportionalValue( + withRatio: 0.4, + shouldResizeForCoverArt: true + ))) + .bold() + } + } + } +} + +#Preview { + SweetBeanBunManArtView.CoverArt() + .environment(ArtWorkModel.preview) +} From fb3b952407e048917f1a48b662ec50658a82b191 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 17:59:32 +0900 Subject: [PATCH 099/108] Update SweetBeanBunMan face --- .../SweetBeanBunManArtView.swift | 61 ++++++++++++------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift index 64ff7cb..ed66e59 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift @@ -23,8 +23,9 @@ extension SweetBeanBunManArtView { case eyeRight case eyeLeft case mouth - case mouthConcealment case centerNose + case eyeMinusRight + case eyeMinusLeft var id: String { rawValue } @@ -109,7 +110,7 @@ extension SweetBeanBunManArtView { primaryColor: .black, widthRatio: 0.1, heightRatio: 0.2, - rotationDegrees: 90, + rotationDegrees: 115, horizontalOffsetRatio: 0.12, verticalOffsetRatio: -0.19, symbolCountToWaitFor: 3 @@ -123,7 +124,7 @@ extension SweetBeanBunManArtView { primaryColor: .black, widthRatio: 0.1, heightRatio: 0.2, - rotationDegrees: 90, + rotationDegrees: 65, horizontalOffsetRatio: -0.12, verticalOffsetRatio: -0.19, symbolCountToWaitFor: 3 @@ -134,8 +135,9 @@ extension SweetBeanBunManArtView { name: "circle.fill", initialPosition: .third(.first), primaryColor: .paleOrange, - widthRatio: 0.16, + widthRatio: 0.18, heightRatio: 0.1, + rotationDegrees: 30, horizontalOffsetRatio: 0.12, verticalOffsetRatio: -0.17, symbolCountToWaitFor: 4 @@ -146,8 +148,9 @@ extension SweetBeanBunManArtView { name: "circle.fill", initialPosition: .third(.first), primaryColor: .paleOrange, - widthRatio: 0.16, + widthRatio: 0.18, heightRatio: 0.1, + rotationDegrees: -30, horizontalOffsetRatio: -0.12, verticalOffsetRatio: -0.17, symbolCountToWaitFor: 4 @@ -178,28 +181,16 @@ extension SweetBeanBunManArtView { ) case .mouth: SymbolArtElement( - symbol: "􀼭", - name: "rainbow", + symbol: "􁕋", + name: "stairs", initialPosition: .third(.fourth), primaryColor: .black, - widthRatio: 0.4, - heightRatio: 0.1, - rotationDegrees: 180, - verticalOffsetRatio: 0.2, + widthRatio: 0.3, + heightRatio: 0.2, + rotationDegrees: 30, + verticalOffsetRatio: 0.23, symbolCountToWaitFor: 6 ) - case .mouthConcealment: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .paleOrange, - widthRatio: 0.3486, - heightRatio: 0.135, - horizontalOffsetRatio: 0.003, - verticalOffsetRatio: 0.17, - symbolCountToWaitFor: 7 - ) case .centerNose: SymbolArtElement( symbol: "􀜫", @@ -211,6 +202,30 @@ extension SweetBeanBunManArtView { widthRatio: 0.2, heightRatio: 0.2, verticalOffsetRatio: 0.01, + symbolCountToWaitFor: 7 + ) + case .eyeMinusRight: + SymbolArtElement( + symbol: "􀅽", + name: "minus", + initialPosition: .third(.sixth), + primaryColor: .black, + widthRatio: 0.07, + heightRatio: 0.01, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.15, + symbolCountToWaitFor: 8 + ) + case .eyeMinusLeft: + SymbolArtElement( + symbol: "􀅽", + name: "minus", + initialPosition: .third(.sixth), + primaryColor: .black, + widthRatio: 0.07, + heightRatio: 0.01, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: -0.15, symbolCountToWaitFor: 8 ) } From 75bc1e5e711bfa8e2fc948f5deb13ef28587584b Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 18:10:35 +0900 Subject: [PATCH 100/108] Refactor SweetBeanBunManArtWork --- .../project.pbxproj | 8 + .../SweetBeanBunManArtView.swift | 287 ------------------ .../SweetBeanBunManArtWork+CoverArt.swift | 70 +++++ .../SweetBeanBunManArtWork+Element.swift | 246 +++++++++++++++ 4 files changed, 324 insertions(+), 287 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtWork+CoverArt.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtWork+Element.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 593bca6..a47aac6 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -34,6 +34,8 @@ 9778A4952B78C076001BF9E8 /* FireworksArtView+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4942B78C076001BF9E8 /* FireworksArtView+Element.swift */; }; 9778A4972B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4962B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift */; }; 9778A49D2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A49C2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift */; }; + 9778A49F2B7A179F001BF9E8 /* SweetBeanBunManArtWork+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A49E2B7A179F001BF9E8 /* SweetBeanBunManArtWork+Element.swift */; }; + 9778A4A12B7A17CD001BF9E8 /* SweetBeanBunManArtWork+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4A02B7A17CD001BF9E8 /* SweetBeanBunManArtWork+CoverArt.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -89,6 +91,8 @@ 9778A4942B78C076001BF9E8 /* FireworksArtView+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FireworksArtView+Element.swift"; sourceTree = ""; }; 9778A4962B78C0C2001BF9E8 /* FireworksArtView+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FireworksArtView+CoverArt.swift"; sourceTree = ""; }; 9778A49C2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SweetBeanBunManArtView.swift; sourceTree = ""; }; + 9778A49E2B7A179F001BF9E8 /* SweetBeanBunManArtWork+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SweetBeanBunManArtWork+Element.swift"; sourceTree = ""; }; + 9778A4A02B7A17CD001BF9E8 /* SweetBeanBunManArtWork+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SweetBeanBunManArtWork+CoverArt.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -189,6 +193,8 @@ isa = PBXGroup; children = ( 9778A49C2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift */, + 9778A49E2B7A179F001BF9E8 /* SweetBeanBunManArtWork+Element.swift */, + 9778A4A02B7A17CD001BF9E8 /* SweetBeanBunManArtWork+CoverArt.swift */, ); path = SweetBeanBunMan; sourceTree = ""; @@ -453,8 +459,10 @@ 9767DF2B2B776D5800457DA1 /* DemonWrestlerArtView+CoverArt.swift in Sources */, 9767DF2D2B776DA100457DA1 /* DemonWrestlerArtView+Element.swift in Sources */, 9767DF002B752E4700457DA1 /* WorldPeaceArtView.swift in Sources */, + 9778A4A12B7A17CD001BF9E8 /* SweetBeanBunManArtWork+CoverArt.swift in Sources */, 9767DF132B75EDB700457DA1 /* CrayonBoyArtView+Element.swift in Sources */, 97AD532D2B717C950034FB5D /* AfroBoyArtView+CoverArt.swift in Sources */, + 9778A49F2B7A179F001BF9E8 /* SweetBeanBunManArtWork+Element.swift in Sources */, 97EF438B2B725E02003648F5 /* NosebleedArtView.swift in Sources */, 9778A4932B781DCE001BF9E8 /* FireworksArtView.swift in Sources */, 97AD53182B70DFF30034FB5D /* AnimationValues.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift index ed66e59..606ffc1 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift @@ -7,232 +7,6 @@ import SwiftUI -extension SweetBeanBunManArtView { - - enum Element: String, CaseIterable, Identifiable { - case sweetBeans - case face - case eyeConcealmentRight - case eyeConcealmentLeft - case mouthConcealmentRight - case mouthConcealmentLeft - case eyebrowRight - case eyebrowLeft - case eyebrowConcealmentRight - case eyebrowConcealmentLeft - case eyeRight - case eyeLeft - case mouth - case centerNose - case eyeMinusRight - case eyeMinusLeft - - var id: String { rawValue } - - var value: SymbolArtElement { - switch self { - case .sweetBeans: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .darkBrown, - widthRatio: 0.7, - heightRatio: 0.7, - symbolCountToWaitFor: 0 - ) - case .face: - SymbolArtElement( - symbol: "􁺱", - name: "ev.plug.ac.gb.t.fill", - initialPrimaryColor: .systemBackground, - initialPosition: .third(.second), - primaryColor: .orange, - secondaryColor: .paleOrange, - widthRatio: 0.8, - heightRatio: 0.7, - verticalOffsetRatio: 0.05, - symbolCountToWaitFor: 1 - ) - case .eyeConcealmentRight: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .paleOrange, - widthRatio: 0.15, - heightRatio: 0.15, - horizontalOffsetRatio: 0.1, - verticalOffsetRatio: -0.14, - symbolCountToWaitFor: 2 - ) - case .eyeConcealmentLeft: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .paleOrange, - widthRatio: 0.15, - heightRatio: 0.15, - horizontalOffsetRatio: -0.1, - verticalOffsetRatio: -0.14, - symbolCountToWaitFor: 2 - ) - case .mouthConcealmentRight: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .paleOrange, - widthRatio: 0.175, - heightRatio: 0.175, - horizontalOffsetRatio: 0.1, - verticalOffsetRatio: 0.19, - symbolCountToWaitFor: 2 - ) - case .mouthConcealmentLeft: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .paleOrange, - widthRatio: 0.175, - heightRatio: 0.175, - horizontalOffsetRatio: -0.11, - verticalOffsetRatio: 0.19, - symbolCountToWaitFor: 2 - ) - case .eyebrowRight: - SymbolArtElement( - symbol: "􀙱", - name: "wave.3.left", - initialPosition: .third(.third), - primaryColor: .black, - widthRatio: 0.1, - heightRatio: 0.2, - rotationDegrees: 115, - horizontalOffsetRatio: 0.12, - verticalOffsetRatio: -0.19, - symbolCountToWaitFor: 3 - ) - - case .eyebrowLeft: - SymbolArtElement( - symbol: "􀙱", - name: "wave.3.left", - initialPosition: .third(.third), - primaryColor: .black, - widthRatio: 0.1, - heightRatio: 0.2, - rotationDegrees: 65, - horizontalOffsetRatio: -0.12, - verticalOffsetRatio: -0.19, - symbolCountToWaitFor: 3 - ) - case .eyebrowConcealmentRight: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .paleOrange, - widthRatio: 0.18, - heightRatio: 0.1, - rotationDegrees: 30, - horizontalOffsetRatio: 0.12, - verticalOffsetRatio: -0.17, - symbolCountToWaitFor: 4 - ) - case .eyebrowConcealmentLeft: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .paleOrange, - widthRatio: 0.18, - heightRatio: 0.1, - rotationDegrees: -30, - horizontalOffsetRatio: -0.12, - verticalOffsetRatio: -0.17, - symbolCountToWaitFor: 4 - ) - case .eyeRight: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .black, - widthRatio: 0.05, - heightRatio: 0.1, - horizontalOffsetRatio: 0.12, - verticalOffsetRatio: -0.15, - symbolCountToWaitFor: 5 - ) - case .eyeLeft: - SymbolArtElement( - symbol: "􀀁", - name: "circle.fill", - initialPosition: .third(.first), - primaryColor: .black, - widthRatio: 0.05, - heightRatio: 0.1, - horizontalOffsetRatio: -0.12, - verticalOffsetRatio: -0.15, - symbolCountToWaitFor: 5 - ) - case .mouth: - SymbolArtElement( - symbol: "􁕋", - name: "stairs", - initialPosition: .third(.fourth), - primaryColor: .black, - widthRatio: 0.3, - heightRatio: 0.2, - rotationDegrees: 30, - verticalOffsetRatio: 0.23, - symbolCountToWaitFor: 6 - ) - case .centerNose: - SymbolArtElement( - symbol: "􀜫", - name: "stop.circle.fill", - initialPrimaryColor: .white, - initialPosition: .third(.fifth), - primaryColor: .white, - secondaryColor: .red, - widthRatio: 0.2, - heightRatio: 0.2, - verticalOffsetRatio: 0.01, - symbolCountToWaitFor: 7 - ) - case .eyeMinusRight: - SymbolArtElement( - symbol: "􀅽", - name: "minus", - initialPosition: .third(.sixth), - primaryColor: .black, - widthRatio: 0.07, - heightRatio: 0.01, - horizontalOffsetRatio: 0.12, - verticalOffsetRatio: -0.15, - symbolCountToWaitFor: 8 - ) - case .eyeMinusLeft: - SymbolArtElement( - symbol: "􀅽", - name: "minus", - initialPosition: .third(.sixth), - primaryColor: .black, - widthRatio: 0.07, - heightRatio: 0.01, - horizontalOffsetRatio: -0.12, - verticalOffsetRatio: -0.15, - symbolCountToWaitFor: 8 - ) - } - } - } -} - struct SweetBeanBunManArtView: View { @State private var isAnimating = false @@ -265,64 +39,3 @@ struct SweetBeanBunManArtView: View { .environment(ArtWorkModel.preview) } } - -extension SweetBeanBunManArtView { - - struct CoverArt: View { - - @Environment(ArtWorkModel.self) var model - - var body: some View { - ZStack { - ForEach(Element.allCases) { - SymbolArtDisplayView(element: $0.value) - } - - Image(systemName: "circle.fill") - .resizable() - .foregroundStyle(.black.opacity(0.9)) - .frame( - width: model.calculatingProportionalValue( - withRatio: 0.7, - shouldResizeForCoverArt: true - ), - height: model.calculatingProportionalValue( - withRatio: 0.7, - shouldResizeForCoverArt: true - ) - ) - - Image(systemName: "ev.plug.ac.gb.t.fill") - .resizable() - .foregroundStyle(.black.opacity(0.9)) - .frame( - width: model.calculatingProportionalValue( - withRatio: 0.8, - shouldResizeForCoverArt: true - ), - height: model.calculatingProportionalValue( - withRatio: 0.7, - shouldResizeForCoverArt: true - ) - ) - .offset(y: model.calculatingProportionalValue( - withRatio: 0.05, - shouldResizeForCoverArt: true - )) - - Image(systemName: "questionmark.app.fill") - .foregroundStyle(.white, .black.opacity(0.9)) - .font(.system(size: model.calculatingProportionalValue( - withRatio: 0.4, - shouldResizeForCoverArt: true - ))) - .bold() - } - } - } -} - -#Preview { - SweetBeanBunManArtView.CoverArt() - .environment(ArtWorkModel.preview) -} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtWork+CoverArt.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtWork+CoverArt.swift new file mode 100644 index 0000000..b038da7 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtWork+CoverArt.swift @@ -0,0 +1,70 @@ +// +// SweetBeanBunManArtWork+CoverArt.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension SweetBeanBunManArtView { + + struct CoverArt: View { + + @Environment(ArtWorkModel.self) var model + + var body: some View { + ZStack { + ForEach(Element.allCases) { + SymbolArtDisplayView(element: $0.value) + } + + Image(systemName: "circle.fill") + .resizable() + .foregroundStyle(.black.opacity(0.9)) + .frame( + width: model.calculatingProportionalValue( + withRatio: 0.7, + shouldResizeForCoverArt: true + ), + height: model.calculatingProportionalValue( + withRatio: 0.7, + shouldResizeForCoverArt: true + ) + ) + + Image(systemName: "ev.plug.ac.gb.t.fill") + .resizable() + .foregroundStyle(.black.opacity(0.9)) + .frame( + width: model.calculatingProportionalValue( + withRatio: 0.8, + shouldResizeForCoverArt: true + ), + height: model.calculatingProportionalValue( + withRatio: 0.7, + shouldResizeForCoverArt: true + ) + ) + .offset(y: model.calculatingProportionalValue( + withRatio: 0.05, + shouldResizeForCoverArt: true + )) + + Image(systemName: "questionmark.app.fill") + .foregroundStyle(.white, .black.opacity(0.9)) + .font(.system(size: model.calculatingProportionalValue( + withRatio: 0.4, + shouldResizeForCoverArt: true + ))) + .bold() + } + } + } +} + +#Preview { + SweetBeanBunManArtView.CoverArt() + .environment(ArtWorkModel.preview) +} + diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtWork+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtWork+Element.swift new file mode 100644 index 0000000..143ab97 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtWork+Element.swift @@ -0,0 +1,246 @@ +// +// SweetBeanBunManArtWork+Element.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension SweetBeanBunManArtView { + + enum Element: String, CaseIterable, Identifiable { + case sweetBeans + case face + case eyeConcealmentRight + case eyeConcealmentLeft + case mouthConcealmentRight + case mouthConcealmentLeft + case eyebrowRight + case eyebrowLeft + case eyebrowConcealmentRight + case eyebrowConcealmentLeft + case eyeRight + case eyeLeft + case mouth + case centerNose + case eyeMinusRight + case eyeMinusLeft + + var id: String { rawValue } + + var value: SymbolArtElement { + switch self { + case .sweetBeans: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .darkBrown, + widthRatio: 0.7, + heightRatio: 0.7, + symbolCountToWaitFor: 0 + ) + case .face: + SymbolArtElement( + symbol: "􁺱", + name: "ev.plug.ac.gb.t.fill", + initialPrimaryColor: .systemBackground, + initialPosition: .third(.second), + primaryColor: .orange, + secondaryColor: .paleOrange, + widthRatio: 0.8, + heightRatio: 0.7, + verticalOffsetRatio: 0.05, + symbolCountToWaitFor: 1 + ) + case .eyeConcealmentRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: -0.14, + symbolCountToWaitFor: 2 + ) + case .eyeConcealmentLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.15, + heightRatio: 0.15, + horizontalOffsetRatio: -0.1, + verticalOffsetRatio: -0.14, + symbolCountToWaitFor: 2 + ) + case .mouthConcealmentRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.175, + heightRatio: 0.175, + horizontalOffsetRatio: 0.1, + verticalOffsetRatio: 0.19, + symbolCountToWaitFor: 2 + ) + case .mouthConcealmentLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.175, + heightRatio: 0.175, + horizontalOffsetRatio: -0.11, + verticalOffsetRatio: 0.19, + symbolCountToWaitFor: 2 + ) + case .eyebrowRight: + SymbolArtElement( + symbol: "􀙱", + name: "wave.3.left", + initialPosition: .third(.third), + primaryColor: .black, + widthRatio: 0.1, + heightRatio: 0.2, + rotationDegrees: 115, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.19, + symbolCountToWaitFor: 3 + ) + + case .eyebrowLeft: + SymbolArtElement( + symbol: "􀙱", + name: "wave.3.left", + initialPosition: .third(.third), + primaryColor: .black, + widthRatio: 0.1, + heightRatio: 0.2, + rotationDegrees: 65, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: -0.19, + symbolCountToWaitFor: 3 + ) + case .eyebrowConcealmentRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.18, + heightRatio: 0.1, + rotationDegrees: 30, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.17, + symbolCountToWaitFor: 4 + ) + case .eyebrowConcealmentLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .paleOrange, + widthRatio: 0.18, + heightRatio: 0.1, + rotationDegrees: -30, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: -0.17, + symbolCountToWaitFor: 4 + ) + case .eyeRight: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .black, + widthRatio: 0.05, + heightRatio: 0.1, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.15, + symbolCountToWaitFor: 5 + ) + case .eyeLeft: + SymbolArtElement( + symbol: "􀀁", + name: "circle.fill", + initialPosition: .third(.first), + primaryColor: .black, + widthRatio: 0.05, + heightRatio: 0.1, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: -0.15, + symbolCountToWaitFor: 5 + ) + case .mouth: + SymbolArtElement( + symbol: "􁕋", + name: "stairs", + initialPosition: .third(.fourth), + primaryColor: .black, + widthRatio: 0.3, + heightRatio: 0.2, + rotationDegrees: 30, + verticalOffsetRatio: 0.23, + symbolCountToWaitFor: 6 + ) + case .centerNose: + SymbolArtElement( + symbol: "􀜫", + name: "stop.circle.fill", + initialPrimaryColor: .white, + initialPosition: .third(.fifth), + primaryColor: .white, + secondaryColor: .red, + widthRatio: 0.2, + heightRatio: 0.2, + verticalOffsetRatio: 0.01, + symbolCountToWaitFor: 7 + ) + case .eyeMinusRight: + SymbolArtElement( + symbol: "􀅽", + name: "minus", + initialPosition: .third(.sixth), + primaryColor: .black, + widthRatio: 0.07, + heightRatio: 0.01, + horizontalOffsetRatio: 0.12, + verticalOffsetRatio: -0.15, + symbolCountToWaitFor: 8 + ) + case .eyeMinusLeft: + SymbolArtElement( + symbol: "􀅽", + name: "minus", + initialPosition: .third(.sixth), + primaryColor: .black, + widthRatio: 0.07, + heightRatio: 0.01, + horizontalOffsetRatio: -0.12, + verticalOffsetRatio: -0.15, + symbolCountToWaitFor: 8 + ) + } + } + } +} + +#Preview { + NavigationStack { + SweetBeanBunManArtView() + .environment(ArtWorkModel.preview) + } +} + +#Preview { + SweetBeanBunManArtView.CoverArt() + .environment(ArtWorkModel.preview) +} From 7f8dc7eec7b2a9fb5c2f67ac82c2fe12bb46f630 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 18:41:31 +0900 Subject: [PATCH 101/108] Refactor ArtGalleryView --- .../ArtGalleryView.swift | 193 +++++++++--------- 1 file changed, 95 insertions(+), 98 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift index fb7a450..a6851d5 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift @@ -18,113 +18,34 @@ extension ArtGalleryView { struct ArtGalleryView: View { + @State private var path = NavigationPath() private let model: ArtWorkModel private let columns: [GridItem] var body: some View { - VStack { - - // Navigation pathの状態によって、この部分の表示非表示を切り替えれるか? -// Spacer() -// .frame(height: 60) -// -// Text("SF Symbols Art") -// .font(.largeTitle) -// .bold() -// -// Text("is just the art created by combining SF Symbols") -// - NavigationStack { - ScrollView { - LazyVGrid(columns: columns) { - - Group { - NavigationLink { - MagicianArtView() - } label: { - MagicianArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - CrayonBoyArtView() - } label: { - CrayonBoyArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - WorldPeaceArtView() - } label: { - WorldPeaceArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - PartyAnimalsArtView() - } label: { - PartyAnimalsArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - ArmHairArtView() - } label: { - ArmHairArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - DemonWrestlerArtView() - } label: { - DemonWrestlerArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - FireworksArtView() - } label: { - FireworksArtView.CoverArt() - .galleryGridItemView( - backgroundColor: .midnightNavy, - length: model.galleryColumnLength - ) - } - - NavigationLink { - SweetBeanBunManArtView() - } label: { - SweetBeanBunManArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - AfroBoyArtView() - } label: { - AfroBoyArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - NosebleedArtView() - } label: { - NosebleedArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } - - NavigationLink { - ImWearingPantsArtView() - } label: { - ImWearingPantsArtView.CoverArt() - .galleryGridItemView(length: model.galleryColumnLength) - } + NavigationStack(path: $path) { + ScrollView { + LazyVGrid(columns: columns) { + + ForEach(ArtWorkPath.allCases) { path in + NavigationLink(value: path) { + path.coverArt + .galleryGridItemView( + backgroundColor: path.coverArtBackground, + length: model.galleryColumnLength + ) } } - .padding(.horizontal, 24) } - .navigationTitle("Art Gallery") + .padding(.horizontal, 24) + .navigationDestination(for: ArtWorkPath.self) { path in + path.destination + .navigationTitle(path.rawValue) + .navigationBarTitleDisplayMode(.inline) + } } + .navigationTitle("Art Gallery") } .environment(model) } @@ -134,3 +55,79 @@ struct ArtGalleryView: View { ArtGalleryView(screenSize: .init(width: 1024, height: 1024)) } + +enum ArtWorkPath: String, CaseIterable, Identifiable { + case magician = "Magician" + case crayonBoy = "Crayon boy" + case worldPeace = "World peace" + case partyAnimals = "Party animals" + case armHair = "Arm hair" + case demonWrestler = "Demon wrestler" + case fireworks = "Fireworks" + case afroBoy = "Afro boy" + case sweetBeanBunMan = "Sweet bean bun man" + case nosebleed = "Nosebleed" + case imWearingPants = "ImWearingPants" + + var id: String { rawValue } + + @ViewBuilder + var coverArt: some View { + switch self { + case .magician: + MagicianArtView.CoverArt() + case .crayonBoy: + CrayonBoyArtView.CoverArt() + case .worldPeace: + WorldPeaceArtView.CoverArt() + case .partyAnimals: + PartyAnimalsArtView.CoverArt() + case .armHair: + ArmHairArtView.CoverArt() + case .demonWrestler: + DemonWrestlerArtView.CoverArt() + case .fireworks: + FireworksArtView.CoverArt() + case .afroBoy: + AfroBoyArtView.CoverArt() + case .sweetBeanBunMan: + SweetBeanBunManArtView.CoverArt() + case .nosebleed: + NosebleedArtView.CoverArt() + case .imWearingPants: + ImWearingPantsArtView.CoverArt() + } + } + + var coverArtBackground: Color { + self == .fireworks ? .midnightNavy : .white + } + + @ViewBuilder + var destination: some View { + switch self { + case .magician: + MagicianArtView() + case .crayonBoy: + CrayonBoyArtView() + case .worldPeace: + WorldPeaceArtView() + case .partyAnimals: + PartyAnimalsArtView() + case .armHair: + ArmHairArtView() + case .demonWrestler: + DemonWrestlerArtView() + case .fireworks: + FireworksArtView() + case .afroBoy: + AfroBoyArtView() + case .sweetBeanBunMan: + SweetBeanBunManArtView() + case .nosebleed: + NosebleedArtView() + case .imWearingPants: + ImWearingPantsArtView() + } + } +} From 72b0b1ee35dfbd7f24e2cf0cefa432ae8dcb3b47 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 18:43:38 +0900 Subject: [PATCH 102/108] Refactor ArtGallery --- .../project.pbxproj | 14 +- .../ArtGalleryView+ArtWorkPath.swift | 88 ++++++++++++ .../ArtGallery/ArtGalleryView.swift | 57 ++++++++ .../ArtGalleryView.swift | 133 ------------------ 4 files changed, 158 insertions(+), 134 deletions(-) create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGallery/ArtGalleryView+ArtWorkPath.swift create mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGallery/ArtGalleryView.swift delete mode 100644 SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index a47aac6..768e769 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -36,6 +36,7 @@ 9778A49D2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A49C2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift */; }; 9778A49F2B7A179F001BF9E8 /* SweetBeanBunManArtWork+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A49E2B7A179F001BF9E8 /* SweetBeanBunManArtWork+Element.swift */; }; 9778A4A12B7A17CD001BF9E8 /* SweetBeanBunManArtWork+CoverArt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4A02B7A17CD001BF9E8 /* SweetBeanBunManArtWork+CoverArt.swift */; }; + 9778A4A32B7A1F87001BF9E8 /* ArtGalleryView+ArtWorkPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9778A4A22B7A1F87001BF9E8 /* ArtGalleryView+ArtWorkPath.swift */; }; 97AD530C2B70DA2F0034FB5D /* ArtGalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */; }; 97AD53102B70DE230034FB5D /* SymbolNameFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */; }; 97AD53122B70DEB60034FB5D /* UIDevice+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD53112B70DEB60034FB5D /* UIDevice+.swift */; }; @@ -93,6 +94,7 @@ 9778A49C2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SweetBeanBunManArtView.swift; sourceTree = ""; }; 9778A49E2B7A179F001BF9E8 /* SweetBeanBunManArtWork+Element.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SweetBeanBunManArtWork+Element.swift"; sourceTree = ""; }; 9778A4A02B7A17CD001BF9E8 /* SweetBeanBunManArtWork+CoverArt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SweetBeanBunManArtWork+CoverArt.swift"; sourceTree = ""; }; + 9778A4A22B7A1F87001BF9E8 /* ArtGalleryView+ArtWorkPath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ArtGalleryView+ArtWorkPath.swift"; sourceTree = ""; }; 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtGalleryView.swift; sourceTree = ""; }; 97AD530F2B70DE230034FB5D /* SymbolNameFrameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolNameFrameView.swift; sourceTree = ""; }; 97AD53112B70DEB60034FB5D /* UIDevice+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+.swift"; sourceTree = ""; }; @@ -199,10 +201,19 @@ path = SweetBeanBunMan; sourceTree = ""; }; - 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */ = { + 9778A4A42B7A1FA6001BF9E8 /* ArtGallery */ = { isa = PBXGroup; children = ( 97AD530B2B70DA2F0034FB5D /* ArtGalleryView.swift */, + 9778A4A22B7A1F87001BF9E8 /* ArtGalleryView+ArtWorkPath.swift */, + ); + path = ArtGallery; + sourceTree = ""; + }; + 97AD530D2B70DBC70034FB5D /* ArtisticWorldOfSFSymbols */ = { + isa = PBXGroup; + children = ( + 9778A4A42B7A1FA6001BF9E8 /* ArtGallery */, 97AD531B2B70E0A10034FB5D /* ArtWorks */, 97AD530E2B70DDD10034FB5D /* Common */, 97E11E412819727A00B2AB32 /* Extensions */, @@ -496,6 +507,7 @@ 97EF43A12B74CA38003648F5 /* CrayonBoyArtView+CoverArt.swift in Sources */, 97EF43902B72D2E4003648F5 /* NosebleedArtView+CoverArt.swift in Sources */, 9767DF112B75E8FC00457DA1 /* MagicianArtView+Element.swift in Sources */, + 9778A4A32B7A1F87001BF9E8 /* ArtGalleryView+ArtWorkPath.swift in Sources */, 9767DF0F2B75DFB400457DA1 /* SymbolArtDisplayView.swift in Sources */, 9778A49D2B7974E4001BF9E8 /* SweetBeanBunManArtView.swift in Sources */, 9767DF252B76C9BE00457DA1 /* ArmHairArtView.swift in Sources */, diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGallery/ArtGalleryView+ArtWorkPath.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGallery/ArtGalleryView+ArtWorkPath.swift new file mode 100644 index 0000000..13b7029 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGallery/ArtGalleryView+ArtWorkPath.swift @@ -0,0 +1,88 @@ +// +// ArtGalleryView+ArtWorkPath.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension ArtGalleryView { + + enum ArtWorkPath: String, CaseIterable, Identifiable { + case magician = "Magician" + case crayonBoy = "Crayon boy" + case worldPeace = "World peace" + case partyAnimals = "Party animals" + case armHair = "Arm hair" + case demonWrestler = "Demon wrestler" + case fireworks = "Fireworks" + case afroBoy = "Afro boy" + case sweetBeanBunMan = "Sweet bean bun man" + case nosebleed = "Nosebleed" + case imWearingPants = "ImWearingPants" + + var id: String { rawValue } + + @ViewBuilder + var coverArt: some View { + switch self { + case .magician: + MagicianArtView.CoverArt() + case .crayonBoy: + CrayonBoyArtView.CoverArt() + case .worldPeace: + WorldPeaceArtView.CoverArt() + case .partyAnimals: + PartyAnimalsArtView.CoverArt() + case .armHair: + ArmHairArtView.CoverArt() + case .demonWrestler: + DemonWrestlerArtView.CoverArt() + case .fireworks: + FireworksArtView.CoverArt() + case .afroBoy: + AfroBoyArtView.CoverArt() + case .sweetBeanBunMan: + SweetBeanBunManArtView.CoverArt() + case .nosebleed: + NosebleedArtView.CoverArt() + case .imWearingPants: + ImWearingPantsArtView.CoverArt() + } + } + + var coverArtBackground: Color { + self == .fireworks ? .midnightNavy : .white + } + + @ViewBuilder + var destination: some View { + switch self { + case .magician: + MagicianArtView() + case .crayonBoy: + CrayonBoyArtView() + case .worldPeace: + WorldPeaceArtView() + case .partyAnimals: + PartyAnimalsArtView() + case .armHair: + ArmHairArtView() + case .demonWrestler: + DemonWrestlerArtView() + case .fireworks: + FireworksArtView() + case .afroBoy: + AfroBoyArtView() + case .sweetBeanBunMan: + SweetBeanBunManArtView() + case .nosebleed: + NosebleedArtView() + case .imWearingPants: + ImWearingPantsArtView() + } + } + } +} + diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGallery/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGallery/ArtGalleryView.swift new file mode 100644 index 0000000..0a00eb8 --- /dev/null +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGallery/ArtGalleryView.swift @@ -0,0 +1,57 @@ +// +// ArtGalleryView.swift +// SFSymbolsArtCollection +// +// Created by Lil Ossa +// + +import SwiftUI + +extension ArtGalleryView { + + init(screenSize: CGSize) { + self.model = ArtWorkModel(screenSize: screenSize) + self.columns = Array(repeating: GridItem(.fixed(model.galleryColumnLength), spacing: model.galleryColumnSpacing), + count: model.galleryColumnCount) + } +} + +struct ArtGalleryView: View { + + @State private var path = NavigationPath() + private let model: ArtWorkModel + private let columns: [GridItem] + + var body: some View { + + NavigationStack(path: $path) { + ScrollView { + LazyVGrid(columns: columns) { + + ForEach(ArtWorkPath.allCases) { path in + NavigationLink(value: path) { + path.coverArt + .galleryGridItemView( + backgroundColor: path.coverArtBackground, + length: model.galleryColumnLength + ) + } + } + } + .padding(.horizontal, 24) + .navigationDestination(for: ArtWorkPath.self) { path in + path.destination + .navigationTitle(path.rawValue) + .navigationBarTitleDisplayMode(.inline) + } + } + .navigationTitle("Art Gallery") + } + .environment(model) + } +} + +#Preview { + ArtGalleryView(screenSize: .init(width: 1024, + height: 1024)) +} diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift deleted file mode 100644 index a6851d5..0000000 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtGalleryView.swift +++ /dev/null @@ -1,133 +0,0 @@ -// -// ArtGalleryView.swift -// SFSymbolsArtCollection -// -// Created by Lil Ossa -// - -import SwiftUI - -extension ArtGalleryView { - - init(screenSize: CGSize) { - self.model = ArtWorkModel(screenSize: screenSize) - self.columns = Array(repeating: GridItem(.fixed(model.galleryColumnLength), spacing: model.galleryColumnSpacing), - count: model.galleryColumnCount) - } -} - -struct ArtGalleryView: View { - - @State private var path = NavigationPath() - private let model: ArtWorkModel - private let columns: [GridItem] - - var body: some View { - - NavigationStack(path: $path) { - ScrollView { - LazyVGrid(columns: columns) { - - ForEach(ArtWorkPath.allCases) { path in - NavigationLink(value: path) { - path.coverArt - .galleryGridItemView( - backgroundColor: path.coverArtBackground, - length: model.galleryColumnLength - ) - } - } - } - .padding(.horizontal, 24) - .navigationDestination(for: ArtWorkPath.self) { path in - path.destination - .navigationTitle(path.rawValue) - .navigationBarTitleDisplayMode(.inline) - } - } - .navigationTitle("Art Gallery") - } - .environment(model) - } -} - -#Preview { - ArtGalleryView(screenSize: .init(width: 1024, - height: 1024)) -} - -enum ArtWorkPath: String, CaseIterable, Identifiable { - case magician = "Magician" - case crayonBoy = "Crayon boy" - case worldPeace = "World peace" - case partyAnimals = "Party animals" - case armHair = "Arm hair" - case demonWrestler = "Demon wrestler" - case fireworks = "Fireworks" - case afroBoy = "Afro boy" - case sweetBeanBunMan = "Sweet bean bun man" - case nosebleed = "Nosebleed" - case imWearingPants = "ImWearingPants" - - var id: String { rawValue } - - @ViewBuilder - var coverArt: some View { - switch self { - case .magician: - MagicianArtView.CoverArt() - case .crayonBoy: - CrayonBoyArtView.CoverArt() - case .worldPeace: - WorldPeaceArtView.CoverArt() - case .partyAnimals: - PartyAnimalsArtView.CoverArt() - case .armHair: - ArmHairArtView.CoverArt() - case .demonWrestler: - DemonWrestlerArtView.CoverArt() - case .fireworks: - FireworksArtView.CoverArt() - case .afroBoy: - AfroBoyArtView.CoverArt() - case .sweetBeanBunMan: - SweetBeanBunManArtView.CoverArt() - case .nosebleed: - NosebleedArtView.CoverArt() - case .imWearingPants: - ImWearingPantsArtView.CoverArt() - } - } - - var coverArtBackground: Color { - self == .fireworks ? .midnightNavy : .white - } - - @ViewBuilder - var destination: some View { - switch self { - case .magician: - MagicianArtView() - case .crayonBoy: - CrayonBoyArtView() - case .worldPeace: - WorldPeaceArtView() - case .partyAnimals: - PartyAnimalsArtView() - case .armHair: - ArmHairArtView() - case .demonWrestler: - DemonWrestlerArtView() - case .fireworks: - FireworksArtView() - case .afroBoy: - AfroBoyArtView() - case .sweetBeanBunMan: - SweetBeanBunManArtView() - case .nosebleed: - NosebleedArtView() - case .imWearingPants: - ImWearingPantsArtView() - } - } -} From c11f4df5235930f5def8d212e02fd35c838a8c79 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 18:46:23 +0900 Subject: [PATCH 103/108] Refactor ArtWorkTitle --- .../ArtWorks/AfroBoy/AfroBoyArtView.swift | 2 -- .../ArtWorks/ArmHair/ArmHairArtView.swift | 2 -- .../ArtWorks/CrayonBoy/CrayonBoyArtView.swift | 2 -- .../ArtWorks/DemonWrestler/DemonWrestlerArtView.swift | 2 -- .../ArtWorks/Fireworks/FireworksArtView.swift | 2 -- .../ArtWorks/ImWearingPants/ImWearingPantsArtView.swift | 2 -- .../ArtWorks/Magician/MagicianArtView.swift | 2 -- .../ArtWorks/Nosebleed/NosebleedArtView.swift | 2 -- .../ArtWorks/PartyAnimals/PartyAnimalsArtView.swift | 2 -- .../ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift | 2 -- .../ArtWorks/WorldPeace/WorldPeaceArtView.swift | 2 -- 11 files changed, 22 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift index 965ad47..bd40b2e 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/AfroBoy/AfroBoyArtView.swift @@ -17,8 +17,6 @@ struct AfroBoyArtView: View { AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } } - .navigationTitle("Afro boy") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift index 3f942a0..73a1fc5 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ArmHair/ArmHairArtView.swift @@ -150,8 +150,6 @@ struct ArmHairArtView: View { } } } - .navigationTitle("Arm hair") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift index 1c044bb..b8b52dc 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/CrayonBoy/CrayonBoyArtView.swift @@ -19,8 +19,6 @@ struct CrayonBoyArtView: View { isAnimating: isAnimating) } } - .navigationTitle("Crayon boy") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView.swift index 3040c46..b277deb 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/DemonWrestler/DemonWrestlerArtView.swift @@ -17,8 +17,6 @@ struct DemonWrestlerArtView: View { AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } } - .navigationTitle("Demon wrestler") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift index 7ed9033..da5809c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Fireworks/FireworksArtView.swift @@ -24,8 +24,6 @@ struct FireworksArtView: View { people fireworks } - .navigationTitle("Fireworks") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift index 20ff197..aceca1c 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/ImWearingPants/ImWearingPantsArtView.swift @@ -41,8 +41,6 @@ struct ImWearingPantsArtView: View { .symbolEffect(.bounce, value: $0.isMusic ? musicCount : 0) } } - .navigationTitle("I'm wearing pants") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift index ebd70dc..2000b35 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Magician/MagicianArtView.swift @@ -18,8 +18,6 @@ struct MagicianArtView: View { isAnimating: isAnimating) } } - .navigationTitle("Magician") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift index a43739c..ae99545 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/Nosebleed/NosebleedArtView.swift @@ -23,8 +23,6 @@ struct NosebleedArtView: View { isActive: $0.isNosebleed ? isEffectActivated : false) } } - .navigationTitle("Nosebleed") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift index 97202ab..36d94de 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/PartyAnimals/PartyAnimalsArtView.swift @@ -18,8 +18,6 @@ struct PartyAnimalsArtView: View { AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } } - .navigationTitle("Party animals") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift index 606ffc1..ba7efbe 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/SweetBeanBunMan/SweetBeanBunManArtView.swift @@ -17,8 +17,6 @@ struct SweetBeanBunManArtView: View { AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } } - .navigationTitle("Sweet bean bun man") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift index d276e4f..d482224 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView.swift @@ -18,8 +18,6 @@ struct WorldPeaceArtView: View { AnimatableSymbolView(element: $0.value, isAnimating: isAnimating) } } - .navigationTitle("World Peace") - .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItemGroup(placement: .bottomBar) { Spacer() From f39b02d8e294cdf34acb085f32dca9df7c93ae3b Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 21:01:54 +0900 Subject: [PATCH 104/108] Add app icon --- .../AppIcon.appiconset/Contents.json | 90 +----------------- .../AppIcon.appiconset/icon.png | Bin 0 -> 110884 bytes 2 files changed, 3 insertions(+), 87 deletions(-) create mode 100644 SFSymbolsArtCollection/Assets.xcassets/AppIcon.appiconset/icon.png diff --git a/SFSymbolsArtCollection/Assets.xcassets/AppIcon.appiconset/Contents.json b/SFSymbolsArtCollection/Assets.xcassets/AppIcon.appiconset/Contents.json index 9221b9b..a657e33 100644 --- a/SFSymbolsArtCollection/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/SFSymbolsArtCollection/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,93 +1,9 @@ { "images" : [ { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", + "filename" : "icon.png", + "idiom" : "universal", + "platform" : "ios", "size" : "1024x1024" } ], diff --git a/SFSymbolsArtCollection/Assets.xcassets/AppIcon.appiconset/icon.png b/SFSymbolsArtCollection/Assets.xcassets/AppIcon.appiconset/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..06bae03fed9d6f8481714e1ad6f393478cf49d45 GIT binary patch literal 110884 zcmeFZi93{S*grlq27~NNB8=?2ij;MbY}t1bEkY8Z>}E!&lr3vzE&IMES!U8hmMmF| z7(&^{zK)sSJyg&0zQ_0XAG|so?z!i_w)6U&pL4m+yC=qm+Vr$sv>*_OURUR$DF_4w zE}@$ywb%9R#X~p(9+Q1U|!W=$IOSKmo!a5Go7=+5>K(W(JKwvHqxi{bnqzdN#dwuDV z>){;8_YHwx@{bPiOa6THmm(AVZ!ejUKTktJnH2wClbb1PUMvLu(0J3dU!d(&q>Ql%brrDg~Q>>UN>(knqIv0yE*Vl<&=w$ zkEf!HjIXb+wC`DI4=-n#(-$sWkdZwjbLNZ`@Pw4N|6QMJeo}Y61&%uT)6YdG?;BpO zo<6P~cj4rIuU+@J@1t_+6nUV(KS%TQalQ5LNO!$|FAG?p4EYB{~qAK_x|%dd7g^Ku6|B;tS`E{JKgmr&+4?i>;+|+|L0f#yQ!wf9S<)v&ucfF zRDqEWoBZe2|9<*#Ae;aHf&TN=@21K!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qaCbie3O8HU?~-``CmAmY2cCAlPgwky2$}`LlB!RUkxu;oB%>WT z@FC;d@_&ax|Io9=3GlYY^kUA{|4GK5o2C9IpZ>4H#h*7ieSrmW;J}m7{Zr=rc@RKt zjV3VrC7KxN_@A}A6J7uvfn*?$6Cv7u{GWgRn@|6LaS Date: Mon, 12 Feb 2024 21:03:07 +0900 Subject: [PATCH 105/108] Update App version 2.0.0 --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 768e769..7b7e7a8 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -571,7 +571,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.4; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -627,7 +627,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.4; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -643,7 +643,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_ASSET_PATHS = "\"SFSymbolsArtCollection/Preview Content\""; DEVELOPMENT_TEAM = 2V4975L824; ENABLE_PREVIEWS = YES; @@ -659,7 +659,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.2; + MARKETING_VERSION = 2.0.0; PRODUCT_BUNDLE_IDENTIFIER = jp.co.hotmail.lilossa.SFSymbolsArtCollection; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -674,7 +674,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_ASSET_PATHS = "\"SFSymbolsArtCollection/Preview Content\""; DEVELOPMENT_TEAM = 2V4975L824; ENABLE_PREVIEWS = YES; @@ -690,7 +690,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.2; + MARKETING_VERSION = 2.0.0; PRODUCT_BUNDLE_IDENTIFIER = jp.co.hotmail.lilossa.SFSymbolsArtCollection; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; From de140475c2f5a2574258c66d4cea158962d405da Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 21:04:54 +0900 Subject: [PATCH 106/108] Modify Display name to Art collection --- SFSymbolsArtCollection.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SFSymbolsArtCollection.xcodeproj/project.pbxproj b/SFSymbolsArtCollection.xcodeproj/project.pbxproj index 7b7e7a8..afd4668 100644 --- a/SFSymbolsArtCollection.xcodeproj/project.pbxproj +++ b/SFSymbolsArtCollection.xcodeproj/project.pbxproj @@ -649,6 +649,7 @@ ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SFSymbolsArtCollection/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "Art collection"; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; @@ -680,6 +681,7 @@ ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SFSymbolsArtCollection/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "Art collection"; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; From cdafd268167e753c0fe595f66c19d6d26ee80b1d Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 12 Feb 2024 22:12:13 +0900 Subject: [PATCH 107/108] Update README --- README.md | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ec7779c..0683576 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,33 @@ # SFSymbolsArtCollection -The Art collection made from SF Symbols +The art collection of **SF Symbols art**. -## Art works + -### Magician - +## What's SFSymbols art -### WORLD PEACE - +SF Symbols art is simply the art created by combining SF Symbols. -### Party Animals - +You can experience that through SwiftUI with variable color, symbol effects, and keyframe animations, advancing SF Symbols art even further. -### Arm Hair - +## How amazing SFSymbols art is -### Demon Wrestler - +Check some previews below. + +### Nosebleed + +https://github.com/littleossa/SFSymbolsArtCollection/assets/67716751/e4ecc405-ea26-4bfd-a1b2-af02256c3d22 + +### Arm hair + +https://github.com/littleossa/SFSymbolsArtCollection/assets/67716751/8775c0b8-851b-4607-9394-558d8479190f ### Fireworks - -Let's enjoy SF Symbols Art. +https://github.com/littleossa/SFSymbolsArtCollection/assets/67716751/ed369c58-0315-4123-bc64-2bd0237b369c + +Other wonderful SFSymbols' artworks are also here, so please feel free to check them out. + +I would be delighted if you could give it a star. + +Have a good day with SFSymbols art. From fd96a6bba2423b3f1ea5df26d7fc4eb2c4878a39 Mon Sep 17 00:00:00 2001 From: littleossa Date: Mon, 19 Feb 2024 10:48:44 +0900 Subject: [PATCH 108/108] Fix World peace alphabet positons --- .../WorldPeaceArtView+Element.swift | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift index f63728b..3a3ec4e 100644 --- a/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift +++ b/SFSymbolsArtCollection/ArtisticWorldOfSFSymbols/ArtWorks/WorldPeace/WorldPeaceArtView+Element.swift @@ -178,9 +178,9 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: -0.34, + horizontalOffsetRatio: -0.345, verticalOffsetRatio: -0.4, - symbolCountToWaitFor: 4 + symbolCountToWaitFor: 5 ) case .characterO: SymbolArtElement( @@ -191,7 +191,7 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: -0.17, + horizontalOffsetRatio: -0.175, verticalOffsetRatio: -0.4, symbolCountToWaitFor: 5 ) @@ -204,7 +204,7 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: 0, + horizontalOffsetRatio: -0.005, verticalOffsetRatio: -0.4, symbolCountToWaitFor: 5 ) @@ -217,7 +217,7 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: 0.17, + horizontalOffsetRatio: 0.165, verticalOffsetRatio: -0.4, symbolCountToWaitFor: 5 ) @@ -230,7 +230,7 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: 0.34, + horizontalOffsetRatio: 0.335, verticalOffsetRatio: -0.4, symbolCountToWaitFor: 5 ) @@ -243,7 +243,7 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: -0.34, + horizontalOffsetRatio: -0.345, verticalOffsetRatio: 0.4, symbolCountToWaitFor: 5 ) @@ -256,7 +256,7 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: -0.17, + horizontalOffsetRatio: -0.175, verticalOffsetRatio: 0.4, symbolCountToWaitFor: 5 ) @@ -269,7 +269,7 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: 0, + horizontalOffsetRatio: -0.005, verticalOffsetRatio: 0.4, symbolCountToWaitFor: 5 ) @@ -282,7 +282,7 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: 0.17, + horizontalOffsetRatio: 0.165, verticalOffsetRatio: 0.4, symbolCountToWaitFor: 5 ) @@ -295,7 +295,7 @@ extension WorldPeaceArtView { secondaryColor: .systemBackground, widthRatio: 0.15, heightRatio: 0.15, - horizontalOffsetRatio: 0.34, + horizontalOffsetRatio: 0.335, verticalOffsetRatio: 0.4, symbolCountToWaitFor: 5 )