🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@shader-art/plugin-pointer-interactions

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shader-art/plugin-pointer-interactions

Pointer interactions for shader-art

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

<shader-art> PointerInteractionsPlugin

Installation

Install via NPM:

npm i shader-art @shader-art/plugin-pointer-interactions

Or use directly via skypack:

import { PointerInteractionsPlugin } from 'https://cdn.skypack.dev/@shader-art/plugin-pointer-interactions';

Usage

ShaderArt.register([() => new PointerInteractionsPlugin()]);

Inside your glsl shader code (which is placed inside a <script type="vert|frag"> tag), you can access one pointer (currently this is single-touch) via uniform variables:

uniform vec2 pointerStart;
uniform vec2 pointer;
uniform int dragging;

Keywords

webgl

FAQs

Package last updated on 15 Feb 2021

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