@paper-design/shaders-react
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -1,2 +0,2 @@ | ||
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}; | ||
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)??[0,0,0],u_color2:m(r.color2)??[255,255,255],u_noiseScale:r.noiseScale??1,u_noiseSpeed:r.noiseSpeed??.3,u_grainAmount:r.grainAmount??.05}),[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 |
{ | ||
"name": "@paper-design/shaders-react", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
8807