Skip to content

๐ŸŒŒYour contributions bend spacetime. An animated SVG generator for GitHub profiles.

License

Notifications You must be signed in to change notification settings

Rujuu-prog/github-contribution-gravity-lens

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

31 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GitHub Contribution Gravity Lens

CI npm License: MIT

ๆ—ฅๆœฌ่ชž | English

Your contributions bend spacetime.

Gravity Lens


๐Ÿš€ Add It To Your Profile

1. Create .github/workflows/gravity-lens.yml

name: generate gravity-lens

on:
  schedule:
    - cron: "0 0 * * *"
  workflow_dispatch:
  push:
    branches: [main]

permissions:
  contents: write

concurrency:
  group: gravity-lens
  cancel-in-progress: true

jobs:
  generate:
    runs-on: ubuntu-latest
    timeout-minutes: 10

    steps:
      - uses: actions/checkout@v4

      - name: Generate (dark + light)
        uses: Rujuu-prog/github-contribution-gravity-lens@v1.0.0
        with:
          github-token: ${{ github.token }}
          theme: github
          output-path: dist/gravity-lens-dark.svg

      - name: Generate light theme
        uses: Rujuu-prog/github-contribution-gravity-lens@v1.0.0
        with:
          github-token: ${{ github.token }}
          theme: paper-light
          output-path: dist/gravity-lens.svg

      - name: Deploy to output branch
        uses: crazy-max/ghaction-github-pages@v3.2.0
        with:
          target_branch: output
          build_dir: dist
        env:
          GITHUB_TOKEN: ${{ github.token }}

No PAT required โ€” github.token is provided automatically by GitHub Actions.

All inputs
Input Required Default Description
github-token Yes โ€” GitHub token for API access
username No Repository owner GitHub username
theme No github Theme name
format No svg Output format (svg or gif)
output-path No gravity-lens.{format} Output file path
strength No 0.35 Warp strength (0-1)

2. Embed in your README

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/<USER>/<REPO>/output/gravity-lens-dark.svg">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/<USER>/<REPO>/output/gravity-lens.svg">
  <img alt="GitHub Contribution Gravity Lens" src="https://raw.githubusercontent.com/<USER>/<REPO>/output/gravity-lens.svg">
</picture>

Replace <USER>/<REPO> with your GitHub username and repository name.

3. Run

Go to the Actions tab and trigger the workflow. That's it.


โœจ What Makes It Different?

  • ๐ŸŒŒ Physics-based animation โ€” Cells warp toward anomalies like light bending around a massive object
  • ๐ŸŒŠ Left-to-right wave โ€” Activation ripples across the grid with staggered timing per anomaly
  • ๐Ÿ”ฎ Interference patterns โ€” Overlapping gravity wells create visible pulse effects
  • ๐ŸŽจ 6 themed worlds โ€” Each theme has its own warp intensity, dimming, and glow parameters

Not just colors. Different physics.


๐ŸŽจ Themes

Theme Description
github Classic dark green. The default.
deep-space Deep blue cosmos. Stronger warp, brighter peaks.
monochrome Grayscale minimalism.
solar-flare Warm red-orange. Intense warp.
event-horizon Near-black. The grid hides until anomalies distort it.
paper-light Light background for GitHub light mode.

See the Theme Gallery for previews and physics parameters.


๐Ÿง  Under the Hood

  1. Fetch โ€” Pull the last year of contributions via GitHub GraphQL API
  2. Detect โ€” Identify top activity spikes as gravitational anomalies
  3. Warp โ€” Compute per-cell displacement with a local lens model (R=60px)
  4. Animate โ€” Render a 14-second loop: rest โ†’ awakening โ†’ lens โ†’ interference โ†’ restore

๐Ÿ“š Documentation

  • Getting Started โ€” Setup, tokens, and workflow options
  • Themes โ€” Full gallery with physics parameters
  • CLI Reference โ€” All options and programmatic API
  • Development โ€” Local setup, testing, and architecture

If you like this project, consider giving it a โญ

MIT License

About

๐ŸŒŒYour contributions bend spacetime. An animated SVG generator for GitHub profiles.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors