{"id":13592271,"url":"https://github.com/heestand-xyz/AsyncGraphics","last_synced_at":"2025-04-08T23:31:46.051Z","repository":{"id":54636126,"uuid":"475543858","full_name":"heestand-xyz/AsyncGraphics","owner":"heestand-xyz","description":"Edit images and video with Swift concurrency, powered by Metal.","archived":false,"fork":false,"pushed_at":"2024-10-29T09:09:27.000Z","size":6673,"stargazers_count":339,"open_issues_count":4,"forks_count":17,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-29T11:33:10.391Z","etag":null,"topics":["async-await","image-processing","swift"],"latest_commit_sha":null,"homepage":"http://async.graphics","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/heestand-xyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2022-03-29T17:12:11.000Z","updated_at":"2024-10-29T09:09:31.000Z","dependencies_parsed_at":"2023-02-19T07:45:49.947Z","dependency_job_id":"d5015c00-7cc7-4774-915a-0cc1d178091d","html_url":"https://github.com/heestand-xyz/AsyncGraphics","commit_stats":null,"previous_names":[],"tags_count":96,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heestand-xyz%2FAsyncGraphics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heestand-xyz%2FAsyncGraphics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heestand-xyz%2FAsyncGraphics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heestand-xyz%2FAsyncGraphics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heestand-xyz","download_url":"https://codeload.github.com/heestand-xyz/AsyncGraphics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223346599,"owners_count":17130468,"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":["async-await","image-processing","swift"],"created_at":"2024-08-01T16:01:07.519Z","updated_at":"2025-04-08T23:31:46.034Z","avatar_url":"https://github.com/heestand-xyz.png","language":"Swift","funding_links":[],"categories":["Swift","Libraries","Tools"],"sub_categories":["Frameworks • Libraries • Ecosystems"],"readme":"\u003cimg src=\"https://github.com/heestand-xyz/AsyncGraphics/blob/main/Assets/AsyncGraphics-Icon.png?raw=true\" width=\"128px\"/\u003e\n\n# AsyncGraphics\n\nAsyncGraphics is a Swift package for working with images and video with async / await. The core type is simply just called [`Graphic`](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic), it's like an image and is backed by a [`MTLTexture`](https://developer.apple.com/documentation/metal/mtltexture).\n\n## Documentation\n\n[**Documentation**](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/) (DocC)\n\nSee the [**Graphic**](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic) docs for all effects.\n\n### Articles\n- [Blending](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/blending)\n- [Layout](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/layout)\n- [Video Playback](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/videoplayback)\n- [Video Editing](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/videoediting)\n- [Live Camera](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/livecamera)\n\n### Content\n\n**Resources**:\n[Image](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/image(named:)),\n[Video](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/playvideo(url:loop:volume:)),\n[Camera](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/camera(at:lens:quality:)),\n[Maps](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/maps(type:latitude:longitude:span:resolution:mapoptions:options:)),\n[Screen](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/screen(at:)),\n[Text](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/text(_:font:center:horizontalalignment:verticalalignment:color:backgroundcolor:resolution:options:)),\n[View](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/view(content:))\n\n**Shapes**:\n[Circle](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/circle(radius:center:color:backgroundcolor:resolution:options:)),\n[Rectangle](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/rectangle(size:center:cornerradius:color:backgroundcolor:resolution:options:)),\n[Arc](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/arc(angle:length:radius:center:color:backgroundcolor:resolution:options:)),\n[Polygon](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/polygon(count:radius:center:rotation:cornerradius:color:backgroundcolor:resolution:options:)),\n[Star](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/star(count:innerradius:outerradius:center:rotation:cornerradius:color:backgroundcolor:resolution:options:)),\n[Line](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/line(leadingpoint:trailingpoint:linewidth:cap:color:backgroundcolor:resolution:options:))\n\n**Solid**:\n[Color](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/color(_:resolution:options:)),\n[Gradient](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/gradient(direction:stops:center:scale:offset:extend:gamma:resolution:options:)),\n[Noise](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/noise(offset:depth:scale:octaves:seed:resolution:options:)),\n[Metal](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/metal(code:resolution:options:))\n\n**Particles**:\n[UV Particles](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/uvparticles(particlescale:particlecolor:backgroundcolor:resolution:samplecount:particleoptions:options:)),\n[UV Color Particles](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/uvcolorparticles(with:particlescale:backgroundcolor:resolution:samplecount:particleoptions:options:))\n\n### Effects\n\n**Direct**:\n[Blur](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/blurred(radius:)),\n[Zoom Blur](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/blurredzoom(radius:center:samplecount:options:)),\n[Angle Blur](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/blurredangle(radius:angle:samplecount:options:)),\n[Circle Blur](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/blurredcircle(radius:samplecount:brightnessrange:saturationrange:light:options:)),\n[Rainbow Blur](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/rainbowblurredcircle(radius:angle:light:samplecount:options:)),\n[Random Blur](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/blurredrandom(radius:options:)),\n[Channel Mix](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/channelmix(red:green:blue:alpha:)),\n[Chroma Key](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/chromakey(color:parameters:options:)),\n[Clamp](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/clamp(_:low:high:includealpha:options:)),\n[Color Convert](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/colorconvert(_:channel:)),\n[Hue](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/hue(_:)),\n[Saturation](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/saturated(_:)),\n[Monochrome](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/monochrome()),\n[Tint](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/tinted(_:)),\n[Corner Pin](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/cornerpinned(topleft:topright:bottomleft:bottomright:perspective:subdivisions:backgroundcolor:)),\n[Edge](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/edge(amplitude:distance:options:)),\n[Kaleidoscope](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/kaleidoscope(count:mirror:center:rotation:scale:options:)),\n[Brightness](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/brightness(_:)),\n[Contrast](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/contrast(_:)),\n[Gamma](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/gamma(_:)),\n[Inverted](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/inverted()),\n[Opacity](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/opacity(_:)),\n[Morph](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/morphedmaximum(size:)),\n[Pixelate](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/pixelate(_:options:)),\n[Quantize](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/quantize(_:options:)),\n[Sharpen](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/sharpen(_:distance:options:)),\n[Slope](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/slope(amplitude:origin:options:)),\n[Threshold](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/threshold(_:options:)),\n[Offset](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/offset(x:y:options:)),\n[Rotate](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/rotated(_:options:)),\n[Scale](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/scaled(_:options:)),\n[Metal](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/metal(code:options:))\n\n**Dual**:\n[Blend](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/blended(with:blendingmode:placement:options:)),\n[Cross](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/cross(with:fraction:placement:options:)),\n[Displace](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/displaced(with:offset:origin:placement:options:)),\n[Lookup](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lookup(with:axis:samplecoordinate:options:)),\n[Luma Blur](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumablurredbox(with:radius:lumagamma:samplecount:placement:options:)),\n[Luma Rainbow Blur](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumarainbowblurredcircle(radius:angle:light:lumagamma:samplecount:placement:options:graphic:)),\n[Luma Hue](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumahue(with:hue:lumagamma:)),\n[Luma Saturation](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumasaturated(with:saturation:lumagamma:)),\n[Luma Brightness](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumabrightness(with:brightness:lumagamma:placement:)),\n[Luma Contrast](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumacontrast(with:contrast:lumagamma:placement:)),\n[Luma Gamma](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumagamma(with:gamma:lumagamma:placement:)),\n[Luma Translate](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumatranslated(with:x:y:lumagamma:placement:options:)),\n[Luma Rotate](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumarotated(with:rotation:lumagamma:placement:options:)),\n[Luma Scale](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/lumascaled(with:scale:lumagamma:placement:options:)),\n[Remap](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/remap(options:graphic:)),\n[Metal](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/metal(with:code:options:)-swift.method)\n\n**Array**:\n[HStack](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/hstacked(with:alignment:spacing:)),\n[VStack](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/vstacked(with:alignment:spacing:)/),\n[ZStack](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/zstacked(with:alignment:)),\n[Layers](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/zblendstacked(with:alignment:)),\n[Metal](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/metal(with:code:options:)-swift.type.method)\n\n**Technical**:\n[Add](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/add(with:)),\n[Average](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/average(with:)),\n[Bits](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/bits(_:)),\n[Color Space](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/applycolorspace(_:)),\n[Crop](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/crop(to:options:)),\n[Inspect](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/inspect(scale:offset:borderwidth:borderopacity:borderfaderange:placement:containerresolution:contentresolution:transparencychecker:options:graphic:)),\n[Polar](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/polar(radius:width:leadingangle:trailingangle:resolution:options:)),\n[Reduce](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/reduce(by:axis:)),\n[Resize](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/resized(to:placement:method:)),\nCoordinate Space,\nLUT\n\n## Install\n\n```swift\n.package(url: \"https://github.com/heestand-xyz/AsyncGraphics\", from: \"3.0.0\")\n```\n\n## Views\n\nIn AsyncGraphics there are a couple ways to present a graphic.\n\n- [AGView](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/agview) to declaratively view [AGGraph](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/aggraph)s\n- [GraphicView](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphicview) to imperatively view [Graphic](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic)s\n- [AsyncGraphicView](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/asyncgraphicview) to imperatively view [Graphic](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic)s asynchronously.\n- [Graphic3DView](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic3dview) to view [Graphic3D](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic3d/)s\n\n```swift\nimport AsyncGraphics\n\nstruct ContentView: View {\n    var body: some View {\n        AsyncGraphicView { resolution in\n            try await .circle(resolution: resolution)\n        }\n    }\n}\n```\n\n# Examples\n\n## Blending\n\n\u003cimg src=\"https://github.com/heestand-xyz/AsyncGraphics-Docs/blob/main/Images/Articles/async-graphics-blending.png?raw=true\" width=\"300px\"/\u003e\n\nFirst we create an [AGView](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/agview/), this is the container for all [AGGraph](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/aggraph)s.\nIn this example we have a [AGZStack](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/agzstack) with 3 [AGHStack](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/aghstack)s. Each graph has a blend mode ([AGBlendMode](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/agblendmode)), in this case .screen.\n\n```swift\nimport SwiftUI\nimport AsyncGraphics\n\nstruct ContentView: View {\n    var body: some View {\n        AGView {\n            AGZStack {\n                AGHStack {\n                    AGSpacer()\n                    AGCircle()\n                        .foregroundColor(.red)\n                }\n                AGHStack {\n                    AGSpacer()\n                    AGCircle()\n                        .foregroundColor(.green)\n                    AGSpacer()\n                }\n                .blendMode(.screen)\n                AGHStack {\n                    AGCircle()\n                        .foregroundColor(.blue)\n                    AGSpacer()\n                }\n                .blendMode(.screen)\n            }\n        }\n    }\n}\n```\n\n## Layout\n\n\u003cimg src=\"https://github.com/heestand-xyz/AsyncGraphics-Docs/blob/main/Images/Articles/async-graphics-layout.png?raw=true\" width=\"300px\"/\u003e\n\nFirst we create an [AGView](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/agview/), this is the container for all [AGGraph](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/aggraph/)s.\nIn this example we create an [AGHStack](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/aghstack/) to contain out boxes, then we loop 3 times with an [AGForEach](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/agforeach/), calculate the width and create [AGRoundedRectangles](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/agroundedrectangle/). After that we set the frame to get a fixed size and apply a color. After the stack we apply some padding and finally add a background.\n\n```swift\nimport SwiftUI\nimport AsyncGraphics\n\nstruct ContentView: View {\n    var body: some View {\n        AGView {\n            AGHStack(alignment: .top, spacing: 15) {\n                AGForEach(0..\u003c3) { index in\n                    let width = 50 * CGFloat(index + 1)\n                    AGRoundedRectangle(cornerRadius: 15)\n                        .frame(width: width, height: width)\n                        .foregroundColor(Color(hue: Double(index) / 3,\n                                               saturation: 0.5,\n                                               brightness: 1.0))\n                }\n            }\n            .padding(15)\n            .background {\n                AGRoundedRectangle(cornerRadius: 30)\n                    .opacity(0.1)\n            }\n        }\n    }\n}\n```\n\n## Camera\n\n```swift\nimport SwiftUI\nimport AsyncGraphics\n\nstruct ContentView: View {\n    \n    var body: some View {\n        AGView {\n            AGZStack {\n                AGCamera(.front)\n                    .resizable()\n                    .aspectRatio(contentMode: .fill)\n                AGCircle()\n                    .blendMode(.multiply)\n            }\n        }\n    }\n}\n```\n\nYou can also do the same with `Graphic`s:\n\n```swift\nimport SwiftUI\nimport AsyncGraphics\n\nstruct ContentView: View {\n    \n    @State private var graphic: Graphic?\n    \n    var body: some View {\n        ZStack {\n            if let graphic {\n                GraphicView(graphic: graphic)\n            }\n        }\n        .task {\n            do {\n                let resolution = CGSize(width: 1_000, height: 1_000)\n                let circleGraphic: Graphic = try await .circle(radius: 500,\n                                                               backgroundColor: .clear,\n                                                               resolution: resolution)\n                for await cameraGraphic in try Graphic.camera(.front) {\n                    graphic = try await circleGraphic\n                        .blended(with: cameraGraphic,\n                                 blendingMode: .multiply,\n                                 placement: .fill)\n                }\n            } catch {\n                print(error)\n            }\n        }\n    }\n}\n```\n\n\u003e Remember to set the Info.plist key `NSCameraUsageDescription` \"Privacy - Camera Usage Description\"\n\n## Metal\n\nThere is the option to write high level [metal](https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/metal) code in AsyncGraphics. No need to setup a pipeline.\n\n## Colors\n\nColors are represented with the `PixelColor` type.\u003cbr\u003e\n`import PixelColor` to create custom colors with hex values.\n\n[PixelColor](https://github.com/heestand-xyz/PixelColor) on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheestand-xyz%2FAsyncGraphics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheestand-xyz%2FAsyncGraphics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheestand-xyz%2FAsyncGraphics/lists"}