@paper-design/shaders-react
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -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 {}; |
@@ -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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1
42
7254
6
+ Added@paper-design/shaders@0.0.5(transitive)
- Removed@paper-design/shaders@0.0.1(transitive)
Updated@paper-design/shaders@0.0.5