Giter VIP home page Giter VIP logo

segmentationeffect's Introduction

SegmentationEffect

This effect allows you to transform the geometry of your regular, rectangular SwiftUI Views into quadrilateral segments ⏢, so you can do fun things like:

output

The shader uses bilinear interpolation to map pixel positions to the output via View.distortionEffect. The repository features an editor app that allows you to give it a try in an interactive way.

How To Use It?

Use as a Swift Package.

Use a View.segmentationEffect modifier.

Why?

I made it mostly for myself as an exercise in my recent SwiftUI + Metal research. At this point APIs have not been crafted very carefully, so the possibilities of the package are quite limited, but give it a try, and be sure to let me know if you like it. I can definitely spend some more time on it, if it is of use for anybody in a real project. At this point - it simply "works for me™️" ⏸️😁

Feel free to use it, feel free to contribute (fix issues, share ideas), and feel free to hit me up @czajnikowski 👋

segmentationeffect's People

Contributors

czajnikowski avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.