@paper-design/shaders-react
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -1,2 +0,2 @@ | ||
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}; | ||
import{useEffect as a,useRef as l}from"react";import{ShaderMount as f}from"@paper-design/shaders";import{jsx as d}from"react/jsx-runtime";var i=({ref:r,fragmentShader:n,style:c,uniforms:o={},webGlContextAttributes:s,animated:t=!0})=>{let u=r??l(null),e=l(null);return a(()=>(u.current&&(e.current=new f(u.current,n,o,s,t)),()=>{e.current&&e.current.dispose()}),[n,s]),a(()=>{e.current&&e.current.setUniforms(o)},[o]),a(()=>{e.current&&(t?e.current.startAnimating():e.current.stopAnimating())},[t]),d("canvas",{ref:u,style:c})};import{useMemo as S}from"react";import{getShaderColorFromString as m,grainCloudsFragmentShader as g}from"@paper-design/shaders";import{jsx as C}from"react/jsx-runtime";var h=r=>{let n=S(()=>({u_color1:m(r.color1),u_color2:m(r.color2),u_noiseScale:r.noiseScale,u_noiseSpeed:r.noiseSpeed,u_grainAmount:r.grainAmount}),[r.color1,r.color2,r.noiseScale,r.noiseSpeed,r.grainAmount]);return C(i,{...r,fragmentShader:g,uniforms:n})};import{}from"@paper-design/shaders";import{getShaderColorFromString as H}from"@paper-design/shaders";export{h as GrainClouds,i as ShaderMount,H as getShaderColorFromString}; | ||
//# sourceMappingURL=index.js.map |
import { type ShaderMountProps } from '../shader-mount'; | ||
import { GrainCloudsUniforms } from '@paper-design/shaders'; | ||
type GrainCloudsProps = Omit<ShaderMountProps, 'fragmentShader'> & { | ||
uniforms: GrainCloudsUniforms; | ||
color1: string; | ||
color2: string; | ||
noiseScale: number; | ||
noiseSpeed: number; | ||
grainAmount: number; | ||
}; | ||
export declare const GrainClouds: (props: GrainCloudsProps) => JSX.Element; | ||
export {}; |
{ | ||
"name": "@paper-design/shaders-react", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"license": "MIT", | ||
@@ -25,7 +25,5 @@ "type": "module", | ||
"dependencies": { | ||
"@paper-design/shaders": "0.0.11" | ||
"@paper-design/shaders": "0.0.12", | ||
"react": ">=18" | ||
}, | ||
"peerDependencies": { | ||
"react": "^17 || ^18 || ^19" | ||
}, | ||
"devDependencies": { | ||
@@ -32,0 +30,0 @@ "@types/react": "^18.3.11" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8654
30
+ Addedreact@>=18
+ Added@paper-design/shaders@0.0.12(transitive)
- Removed@paper-design/shaders@0.0.11(transitive)
Updated@paper-design/shaders@0.0.12