New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

np-gltoy

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

np-gltoy

webgl toy

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
0
Created
Source

np-gltoy

webgl toy

  • simpleInit
  • renderFullScreenCanvas

inject

uniform float u_time
uniform vec2 u_mouse
uniform vec2 u_resolution
uniform vec4 u_date
uniform vec3 iResolution

demo1

import frag from './frag.glsl';
import { simpleInit, renderFullScreenCanvas } from 'np-gltoy';

document.body.style.background = `linear-gradient(180deg, rgb(255 244 208), rgb(84 203 177))`;
renderFullScreenCanvas({
    frag,
    autoPlay: true,
});
#ifdef GL_ES
precision mediump float;
#endif

uniform vec2 u_resolution;
uniform float u_time;

void main(){
    vec2 st=gl_FragCoord.xy/u_resolution.xy;
    //
    gl_FragColor=vec4(color);
}

demo2

import { simpleInit, renderFullScreenCanvas } from 'np-gltoy';

renderFullScreenCanvas({
    main: `void main(){
        fragColor = vec4(1., 1., 0., 1.);
    }`,
    autoPlay: true,
});

FAQs

Package last updated on 27 Jun 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