https://github.com/cyrilzakka/namedrop

Poor man's replica of iOS 17 NameDrop animation

https://github.com/cyrilzakka/namedrop

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (2.6%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Poor man's replica of iOS 17 NameDrop animation

Basic Info
  • Host: GitHub
  • Owner: cyrilzakka
  • License: mit
  • Language: Swift
  • Default Branch: main
  • Size: 489 KB
Statistics
  • Stars: 170
  • Watchers: 2
  • Forks: 9
  • Open Issues: 1
  • Releases: 0
Created about 3 years ago · Last pushed about 3 years ago
Metadata Files
Readme License

README.md

NameDrop

Water ripple effect written in SwiftUI/GLSL to replicate the NameDrop animation first demoed on iOS 17. Should be easier to add with the new .layerEffect modifier. The magic mostly happens in this little block of code: ``` void main() { float offset = (utime - floor(utime))/utime; float currentTime = utimeoffset0.5; vec3 waveParams = vec3(uscale, usharpness, u_spread); vec2 waveCenter = vec2(0.5, 1.05);

        vec2 coord = v_tex_coord;
        float dist = distance(coord, waveCenter);
        vec4 current_color = texture2D(u_texture, coord);

        //Only distort the pixels within the parameter distance from the center
        if ((dist <= ((currentTime) + (waveParams.z))) &&
            (dist >= ((currentTime) - (waveParams.z)))) {
            float diff = (dist - currentTime);
            float scaleDiff = (1.0 - pow(abs(diff * waveParams.x), waveParams.y));
            float diffTime = (diff  * scaleDiff);
            vec2 diffTexCoord = normalize(coord - waveCenter);
            coord += ((diffTexCoord * diffTime) / (currentTime * dist * 10)); //40
            current_color = texture2D(u_texture, coord);
            current_color += (current_color * scaleDiff) / (currentTime * dist * 40.0);
        }

        gl_FragColor = current_color;

``` Give me a shoutout if you end up using it anywhere!

Twitter: @cyrilzakka

Owner

  • Name: Cyril Zakka, MD
  • Login: cyrilzakka
  • Kind: user
  • Location: Palo Alto, California
  • Company: @hiesingerlab

Medical Doctor, Postdoctoral Fellow at Stanford Medicine.

GitHub Events

Total
  • Watch event: 7
  • Fork event: 1
Last Year
  • Watch event: 7
  • Fork event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 4
  • Total Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Cyril Zakka, MD 1****a 4

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels