Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@paper-design/shaders-react

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paper-design/shaders-react - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

45

dist/index.d.ts

@@ -1,5 +0,40 @@

export { ShaderMount } from './shader-mount';
export { GrainClouds } from './shaders/grain-clouds';
export { type GrainCloudsUniforms } from '@paper-design/shaders';
export { getShaderColorFromString } from '@paper-design/shaders';
//# sourceMappingURL=index.d.ts.map
// Generated by dts-bundle-generator v9.5.1
import React$1 from 'react';
export interface ShaderMountProps {
ref?: React$1.RefObject<HTMLCanvasElement>;
fragmentShader: string;
style?: React$1.CSSProperties;
uniforms?: Record<string, number | number[]>;
webGlContextAttributes?: WebGLContextAttributes;
animated?: boolean;
}
export declare const ShaderMount: React$1.FC<ShaderMountProps>;
/** Convert color string from HSL, RGB, or hex to 0-to-1-range-RGB array */
export declare function getShaderColorFromString(colorString: string): [
number,
number,
number
];
export type GrainCloudsUniforms = {
color1: [
number,
number,
number
];
color2: [
number,
number,
number
];
noiseScale: number;
noiseSpeed: number;
grainAmount: number;
};
export type GrainCloudsProps = Omit<ShaderMountProps, "fragmentShader"> & {
uniforms: GrainCloudsUniforms;
};
export declare const GrainClouds: (props: GrainCloudsProps) => JSX.Element;
export {};

2

dist/index.js

@@ -1,2 +0,2 @@

import{useEffect as a,useRef as f}from"react";import{ShaderMount as d}from"@paper-design/shaders";import{jsx as m}from"react/jsx-runtime";var s=({ref:e,fragmentShader:u,style:l,uniforms:t={},webGlContextAttributes:i,animated:n=!0})=>{let o=e??f(null),r=f(null);return a(()=>(o.current&&(r.current=new d(o.current,u,t,i,n)),()=>{r.current&&r.current.dispose()}),[u,i]),a(()=>{r.current&&r.current.setUniforms(t)},[t]),a(()=>{r.current&&(n?r.current.startAnimating():r.current.stopAnimating())},[n]),m("canvas",{ref:o,style:l})};import{grainCloudsFragmentShader as p}from"@paper-design/shaders";import{jsx as S}from"react/jsx-runtime";var c=e=>S(s,{...e,fragmentShader:p});import{getShaderColorFromString as E}from"@paper-design/shaders";export{c as GrainClouds,s as ShaderMount,E as getShaderColorFromString};
import{useEffect as a,useRef as f}from"react";import{ShaderMount as m}from"@paper-design/shaders";import{jsx as d}from"react/jsx-runtime";var s=({ref:e,fragmentShader:u,style:l,uniforms:t={},webGlContextAttributes:i,animated:n=!0})=>{let o=e??f(null),r=f(null);return a(()=>(o.current&&(r.current=new m(o.current,u,t,i,n)),()=>{r.current&&r.current.dispose()}),[u,i]),a(()=>{r.current&&r.current.setUniforms(t)},[t]),a(()=>{r.current&&(n?r.current.startAnimating():r.current.stopAnimating())},[n]),d("canvas",{ref:o,style:l})};import{grainCloudsFragmentShader as p}from"@paper-design/shaders";import{jsx as S}from"react/jsx-runtime";var c=e=>S(s,{...e,fragmentShader:p});import{getShaderColorFromString as F}from"@paper-design/shaders";export{c as GrainClouds,s as ShaderMount,F as getShaderColorFromString};
//# sourceMappingURL=index.js.map
{
"name": "@paper-design/shaders-react",
"version": "0.0.5",
"version": "0.0.6",
"license": "MIT",

@@ -19,10 +19,8 @@ "type": "module",

"dependencies": {
"@paper-design/shaders": "0.0.1",
"@paper-design/shaders": "0.0.5",
"react": "^18.3.1"
},
"devDependencies": {
"@types/react": "^18.3.11",
"esbuild": "^0.24.0",
"typescript": "5.5.4"
"@types/react": "^18.3.11"
}
}

Sorry, the diff of this file is not supported yet

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