{"id":26037350,"url":"https://github.com/rryam/MeshingKit","last_synced_at":"2025-03-07T08:01:27.613Z","repository":{"id":257917339,"uuid":"872241061","full_name":"rryam/MeshingKit","owner":"rryam","description":"Ultimate framework to add mesh gradients to your iOS/macOS/visionOS/tvOS and watchOS apps!","archived":false,"fork":false,"pushed_at":"2025-02-25T11:34:43.000Z","size":399,"stargazers_count":51,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-06T17:51:06.371Z","etag":null,"topics":["ios","ios-sdk","macos","mesh-gradient","mesh-gradients","swift-library","swift-package","tvos","visionos","watchos"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rryam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"rryam"}},"created_at":"2024-10-14T05:06:09.000Z","updated_at":"2025-03-05T12:17:26.000Z","dependencies_parsed_at":"2024-11-08T20:00:51.485Z","dependency_job_id":"ca2eb9bb-7ace-4539-a2f7-a63a09e95fdc","html_url":"https://github.com/rryam/MeshingKit","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"aa8a6acaa4534dd1ab2a88259fe924e38bdd4011"},"previous_names":["rryam/meshingkit"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rryam%2FMeshingKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rryam%2FMeshingKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rryam%2FMeshingKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rryam%2FMeshingKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rryam","download_url":"https://codeload.github.com/rryam/MeshingKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242353780,"owners_count":20114042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","ios-sdk","macos","mesh-gradient","mesh-gradients","swift-library","swift-package","tvos","visionos","watchos"],"created_at":"2025-03-07T08:01:09.380Z","updated_at":"2025-03-07T08:01:27.605Z","avatar_url":"https://github.com/rryam.png","language":"Swift","readme":"# MeshingKit\n\n![Gradient](Sources/Resources/gradient.jpg)\n\n\u003ca href=\"https://www.emergetools.com/app/example/ios/meshingkit.MeshingKit/release?utm_campaign=badge-data\"\u003e\u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fwww.emergetools.com%2Fapi%2Fv2%2Fpublic_new_build%3FexampleId%3Dmeshingkit.MeshingKit%26platform%3Dios%26badgeOption%3Dversion_and_max_install_size%26buildType%3Drelease\u0026query=$.badgeMetadata\u0026label=MeshingKit\u0026logo=apple\" /\u003e\u003c/a\u003e\n\nMeshingKit provides an easy way to create mesh gradients in SwiftUI with predefined gradient templates to directly render beautiful, gorgeous gradients!\n\n## Meshing\n\nMeshingKit is based on [Meshing](https://apps.apple.com/in/app/ai-mesh-gradient-tool-meshing/id6567933550), an AI Mesh Gradient Tool. You can support my work by downloading the app or sponsoring this package.\n\n## Features\n\n- Create beautiful mesh gradients with customizable control points and colors\n- Animate gradients with smooth, configurable transitions\n- 63 predefined gradient templates:\n  - 30 templates with 2x2 grid size\n  - 22 templates with 3x3 grid size\n  - 11 templates with 4x4 grid size\n- Easily extendable for custom gradients\n- Works across all Apple platforms (iOS, macOS, tvOS, watchOS, visionOS)\n\n## Requirements\n\n- iOS 18.0+, macOS 15.0+, tvOS 18.0+, watchOS 11.0+, visionOS 2.0+\n- Swift 6.0+\n- Xcode 16.0+\n\n## Installation\n\n### Swift Package Manager\n\nAdd MeshingKit to your project using Swift Package Manager. In Xcode, go to File \u003e Swift Packages \u003e Add Package Dependency and enter the following URL:\n\n```\nhttps://github.com/rryam/MeshingKit.git\n```\n\n## Usage\n\nTo use a predefined gradient template:\n\n```swift\nimport SwiftUI\nimport MeshingKit\n\nstruct ContentView: View {\n    var body: some View {\n        MeshingKit.gradientSize3(template: .cosmicAurora)\n            .frame(width: 300, height: 300)\n    }\n}\n```\n\n## Animated Gradient Views\n\nTo create an animated gradient view:\n\n```swift\nimport SwiftUI\nimport MeshingKit\n\nstruct AnimatedGradientView: View {\n    @State private var showAnimation = true\n\n    var body: some View {\n        MeshingKit.animatedGradientSize3(template: .cosmicAurora, showAnimation: $showAnimation)\n            .frame(width: 300, height: 300)\n            .padding()\n\n        // Toggle animation\n        Toggle(\"Animate Gradient\", isOn: $showAnimation)\n            .padding()\n    }\n}\n```\n\n## Noise Effect with Gradients\n\nYou can add a noise effect to your gradients using the ParameterizedNoiseView:\n\n```swift\nimport SwiftUI\nimport MeshingKit\n\nstruct NoiseEffectGradientView: View {\n    @State private var intensity: Float = 0.5\n    @State private var frequency: Float = 0.2\n    @State private var opacity: Float = 0.9\n\n    var body: some View {\n        ParameterizedNoiseView(intensity: $intensity, frequency: $frequency, opacity: $opacity) {\n            MeshingKit.gradientSize3(template: .cosmicAurora)\n        }\n        .frame(width: 300, height: 300)\n\n        // Controls for adjusting the noise effect\n        VStack {\n            Slider(value: $intensity, in: 0...1) {\n                Text(\"Intensity\")\n            }\n            .padding()\n\n            Slider(value: $frequency, in: 0...1) {\n                Text(\"Frequency\")\n            }\n            .padding()\n\n            Slider(value: $opacity, in: 0...1) {\n                Text(\"Opacity\")\n            }\n            .padding()\n        }\n    }\n}\n```\n\n## Available Gradient Templates\n\nMeshingKit provides three sets of predefined gradient templates:\n\n### GradientTemplateSize2 (2x2 grid)\n\n- mysticTwilight\n- tropicalParadise\n- cherryBlossom\n- arcticFrost\n- goldenSunrise\n- emeraldForest\n- desertMirage\n- midnightGalaxy\n- autumnHarvest\n- oceanBreeze\n- lavenderDreams\n- citrusBurst\n- northernLights\n- strawberryLemonade\n- deepSea\n- cottonCandy\n- volcanicAsh\n- springMeadow\n- cosmicDust\n- peacockFeathers\n- crimsonSunset\n- enchantedForest\n- blueberryMuffin\n- saharaDunes\n- grapeSoda\n- frostyWinter\n- dragonFire\n- mermaidLagoon\n- chocolateTruffle\n- neonNights\n\n### GradientTemplateSize3 (3x3 grid)\n\n- intelligence\n- auroraBorealis\n- sunsetGlow\n- oceanDepths\n- neonNight\n- autumnLeaves\n- cosmicAurora\n- lavaFlow\n- etherealMist\n- tropicalParadise\n- midnightGalaxy\n- desertMirage\n- frostedCrystal\n- enchantedForest\n- rubyFusion\n- goldenSunrise\n- cosmicNebula\n- arcticAurora\n- volcanicEmber\n- mintBreeze\n- twilightSerenade\n- saharaDunes\n\n### GradientTemplateSize4 (4x4 grid)\n\n- auroraBorealis\n- sunsetHorizon\n- mysticForest\n- cosmicNebula\n- coralReef\n- etherealTwilight\n- volcanicOasis\n- arcticFrost\n- jungleMist\n- desertMirage\n- neonMetropolis\n\n## Custom Gradients\n\nCcreate custom gradients by defining your own `GradientTemplate`:\n\n```swift\nlet customTemplate = GradientTemplate(\n    name: \"Custom Gradient\",\n    size: 3,\n    points: [\n        .init(x: 0.0, y: 0.0), .init(x: 0.5, y: 0.0), .init(x: 1.0, y: 0.0),\n        .init(x: 0.0, y: 0.5), .init(x: 0.5, y: 0.5), .init(x: 1.0, y: 0.5),\n        .init(x: 0.0, y: 1.0), .init(x: 0.5, y: 1.0), .init(x: 1.0, y: 1.0)\n    ],\n    colors: [\n        Color.red, Color.orange, Color.yellow,\n        Color.green, Color.blue, Color.indigo,\n        Color.purple, Color.pink, Color.white\n    ],\n    background: Color.black\n)\n\nlet customGradient = MeshGradient(\n    width: customTemplate.size,\n    height: customTemplate.size,\n    points: customTemplate.points,\n    colors: customTemplate.colors\n)\n```\n\n## Hex Color Initialization\n\nThere is an extension on `Color` that allows to initialise colors using hexadecimal strings:\n\n```swift\nlet color = Color(hex: \"#FF5733\")\n```\n\nThis extension supports various hex formats:\n\n- \"#RGB\" (12-bit)\n- \"#RRGGBB\" (24-bit)\n- \"#AARRGGBB\" (32-bit with alpha)\n\n## Contributing\n\nContributions to MeshingKit are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMeshingKit is available under the MIT license. See the LICENSE file for more info.\n","funding_links":["https://github.com/sponsors/rryam"],"categories":["Libraries"],"sub_categories":["SwiftUI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frryam%2FMeshingKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frryam%2FMeshingKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frryam%2FMeshingKit/lists"}