Nostalgic Punchcard Missing

    dotz
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.2 • Public • Published
    dotz

    dotz

    GPU-accelerated Particle Terrains



    Usage | API | Terrains | Details


    Usage

    Open in CodePen

    import { Dotz } from 'https://esm.sh/dotz';
    
    let my_dotz = new Dotz(
      // canvas element
      document.getElementById('#myCanvas'),
      // URL for terrain image (dudv map)
      "https://m4r.sh/terrains/spiral.png",
      // options
      { 
        speed: 0.5,
        fade: 0.8,
        particles: 4e5,
        colors: {
          "0.0": "transparent",
          "0.1": "hsl(240,100%, 50%)",
          "0.5": "hsl(300,100%, 50%)",
          "1.0": "hsl(60 ,100%, 50%)"
        }
      }
    )

    API

    Coming soon

    Terrains

    Coming soon

    Details

    Coming soon

    References

    Heavily inspired by other code. TODO: add references to blog post and original codebase

    License

    MIT © Marshall Brandt

    Keywords

    none

    Install

    npm i dotz

    DownloadsWeekly Downloads

    1

    Version

    0.3.2

    License

    MIT

    Unpacked Size

    42.5 kB

    Total Files

    7

    Last publish

    Collaborators

    • marshallcb