New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

glsl-barrel-pincushion

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glsl-barrel-pincushion

Distort UV using barrel or pincushion

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-22.22%
Maintainers
0
Weekly downloads
 
Created
Source

glsl-barrel-pincushion

stable

Distort the UV with barrel or pincushion effect. Adapted from this shadertoy.

glsl-barrel-pincushion

Installation :package:

npm i glsl-barrel-pincushion -S

Usage :book:

barrelPincushion(vec2 st, float strength)

strength > 0 for barrel distortion, strength < 0 for pincushion.

Example :floppy_disk:

uniform float uTime;
#pragma glslify: barrelPincushion = require(glsl-barrel-pincushion)
#pragma glslify: rectangle = require(glsl-2d-primitives/rectangle)

attribute vec2 vUv;

void main() {
    vec2 st = barrelPincushion(vUv, sin(uTime));
    float shape = rectangle(st, vec2(0.5));
    gl_FragColor = vec4(color, shape);
}

Demo

License :pencil:

MIT. See LICENSE for details.

Keywords

FAQs

Package last updated on 28 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc