{"version":3,"file":"ShaderGradient.CjXHl9C2.mjs","names":["shadergradient.Placeholder","shadergradient.ShaderGradientCanvas","shadergradient.ShaderGradient"],"sources":["https:/framerusercontent.com/modules/mI7qAWc6q8IiZF9XwKMJ/1xI4GUgZUCfWCPntsfLU/ShaderGradient.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";// import * as shadergradient2 from \"https://esm-shadergradient.onrender.com/with-store.mjs\"\nimport*as shadergradient from\"https://esm-shadergradient.onrender.com/without-store.mjs\";import{addPropertyControls,Color,ControlType,RenderTarget}from\"framer\";const isCanvas=RenderTarget.current()!==RenderTarget.preview;// up\n/**\n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 250\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */const ShaderGradient=({color1,color2,color3,noise,cameraAngle,position,rotation,pointerEvents,performantOnCanvas,...props})=>{if(isCanvas&&performantOnCanvas)return /*#__PURE__*/_jsx(shadergradient.Placeholder,{color1:color1,color2:color2});return /*#__PURE__*/_jsx(shadergradient.ShaderGradientCanvas,{resize:{offsetSize:true},pointerEvents:pointerEvents,children:/*#__PURE__*/_jsx(shadergradient.ShaderGradient,{color1:Color.toHex(Color(parseToken(color1))),color2:Color.toHex(Color(parseToken(color2))),color3:Color.toHex(Color(parseToken(color3))),isFigmaPlugin:true,...noise,...position,...cameraAngle,...rotation,...props})},props.control+props.urlString);};export function AddControls(Comp){Comp.defaultProps={control:\"props\",animate:\"on\",brightness:1.2,cDistance:3.6,cameraZoom:1,color1:\"#ff5005\",color2:\"#dbba95\",color3:\"#d0bce1\",embedMode:\"off\",envPreset:\"city\",gizmoHelper:\"hide\",grain:\"on\",lightType:\"3d\",pixelDensity:1,reflection:.1,shader:\"defaults\",type:\"plane\",uSpeed:.4,uTime:0,wireframe:\"false\",zoomOut:false,toggleAxis:false,pointerEvents:\"none\"};addPropertyControls(Comp,{control:{type:ControlType.Enum,options:[\"props\",\"query\"],optionTitles:[\"Props\",\"Query\"],displaySegmentedControl:true},activeTab:{title:\"Settings Group\",type:ControlType.Enum,options:[\"Shape\",\"Colors\",\"Effects\",\"View\"],hidden:props=>props.control===\"query\"},// Shape\ntype:{type:ControlType.Enum,options:[\"plane\",\"sphere\",\"waterPlane\"],optionTitles:[\"Plane\",\"Sphere\",\"Water\"],displaySegmentedControl:true,hidden:props=>props.control===\"query\"||props.activeTab!==\"Shape\"},shader:{type:ControlType.Enum,options:[\"defaults\",\"positionMix\"],optionTitles:[\"Type A\",\"Type B\"],displaySegmentedControl:true,hidden:props=>props.control===\"query\"||props.activeTab!==\"Shape\"},animate:{type:ControlType.Enum,options:[\"on\",\"off\"],optionTitles:[\"On\",\"Off\"],displaySegmentedControl:true,hidden:props=>props.control===\"query\"||props.activeTab!==\"Shape\"&&props.activeTab!==\"URL\"},uTime:{title:\"Movements\",type:ControlType.Number,step:.1,displayStepper:true,hidden:props=>props.animate===\"on\"||props.control===\"query\"||props.activeTab!==\"Shape\"},uSpeed:{title:\"Speed\",type:ControlType.Number,step:.1,min:.1,displayStepper:true,hidden:props=>props.animate===\"off\"||props.control===\"query\"||props.activeTab!==\"Shape\"},noise:{type:ControlType.Object,controls:{uStrength:{type:ControlType.Number,title:\"Strength\",step:.1,min:.1,displayStepper:true,defaultValue:4},uDensity:{type:ControlType.Number,title:\"Density\",step:.1,min:.1,displayStepper:true,defaultValue:1.3}},hidden:props=>props.control===\"query\"||props.activeTab!==\"Shape\"},uAmplitude:{type:ControlType.Number,title:\"Spiral\",step:.1,min:.1,displayStepper:true,hidden:props=>props.type!==\"sphere\"||props.control===\"query\"||props.activeTab!==\"Shape\"},pixelDensity:{type:ControlType.Number,step:.1,min:0,max:3,displayStepper:true,hidden:props=>props.control===\"query\"||props.activeTab!==\"Shape\"},// Effects\ngrain:{type:ControlType.Enum,options:[\"on\",\"off\"],optionTitles:[\"On\",\"Off\"],displaySegmentedControl:true,hidden:props=>props.control===\"query\"||props.activeTab!==\"Effects\"},lightType:{type:ControlType.Enum,options:[\"env\",\"3d\"],optionTitles:[\"Env\",\"Light\"],displaySegmentedControl:true,hidden:props=>props.control===\"query\"||props.activeTab!==\"Effects\"},envPreset:{type:ControlType.Enum,options:[\"city\",\"dawn\",\"lobby\"],optionTitles:[\"City\",\"Dawn\",\"Lobby\"],displaySegmentedControl:true,hidden:props=>props.lightType===\"3d\"||props.control===\"query\"||props.activeTab!==\"Effects\"},brightness:{type:ControlType.Number,step:.1,min:.1,max:3,hidden:props=>props.lightType===\"env\"||props.control===\"query\"||props.activeTab!==\"Effects\"||props.url},reflection:{type:ControlType.Number,step:.1,min:0,max:1,hidden:props=>props.lightType===\"3d\"||props.control===\"query\"||props.activeTab!==\"Effects\"||props.url},// Colors\ncolor1:{type:ControlType.Color,hidden:props=>props.control===\"query\"||props.activeTab!==\"Colors\"},color2:{type:ControlType.Color,hidden:props=>props.control===\"query\"||props.activeTab!==\"Colors\"},color3:{type:ControlType.Color,hidden:props=>props.control===\"query\"||props.activeTab!==\"Colors\"},// View\ncDistance:{title:\"Distance\",type:ControlType.Number,displayStepper:true,min:0,max:20,hidden:props=>props.type===\"sphere\"||props.control===\"query\"||props.activeTab!==\"View\"},cameraZoom:{type:ControlType.Number,displayStepper:true,step:.1,min:.1,max:30,hidden:props=>props.type!==\"sphere\"||props.control===\"query\"||props.activeTab!==\"View\"},cameraAngle:{type:ControlType.Object,controls:{cAzimuthAngle:{title:\"Azimuth\",type:ControlType.Number,displayStepper:true,step:10,min:0,max:360,defaultValue:180},cPolarAngle:{title:\"Polar\",type:ControlType.Number,displayStepper:true,step:10,min:0,max:180,defaultValue:90}},hidden:props=>props.control===\"query\"||props.activeTab!==\"View\"},position:{type:ControlType.Object,controls:{positionX:{type:ControlType.Number,step:.1,displayStepper:true,defaultValue:-1.4},positionY:{type:ControlType.Number,step:.1,displayStepper:true},positionZ:{type:ControlType.Number,step:.1,displayStepper:true}},hidden:props=>props.control===\"query\"||props.activeTab!==\"View\"},rotation:{type:ControlType.Object,controls:{rotationX:{type:ControlType.Number,step:10,min:-360,max:360,displayStepper:true,defaultValue:0},rotationY:{type:ControlType.Number,step:10,min:-360,max:360,displayStepper:true,defaultValue:10},rotationZ:{type:ControlType.Number,step:10,min:-360,max:360,displayStepper:true,defaultValue:50}},hidden:props=>props.control===\"query\"||props.activeTab!==\"View\"},// urlString\nurlString:{type:ControlType.String,placeholder:\"URL from shadergradient.co\",hidden:props=>props.control===\"props\"},// Tools (🧰)\nzoomOut:{type:ControlType.Boolean,title:\"View\",enabledTitle:\"Wide\",disabledTitle:\"-\",hidden:props=>props.control===\"query\"},toggleAxis:{type:ControlType.Boolean,title:\"Axis\",enabledTitle:\"Guide\",disabledTitle:\"-\",hidden:props=>props.control===\"query\"},pointerEvents:{type:ControlType.Enum,title:\"Touch Control\",options:[\"none\",\"auto\"],optionTitles:[\"Disable\",\"Enable\"],displaySegmentedControl:true,hidden:props=>props.control===\"query\"},performantOnCanvas:{type:ControlType.Boolean,defaultValue:false}});}AddControls(ShaderGradient);/**\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export const Background=props=>/*#__PURE__*/_jsx(shadergradient.Background,{...props});// add it to suppress warnings\nexport const TestControl=props=>{return /*#__PURE__*/_jsx(shadergradient.TestControl,{});};function parseToken(colorString){if(colorString.startsWith(\"var(\")){const regex=/(rgba?)\\((\\d+),\\s*(\\d+),\\s*(\\d+)(,\\s*([\\d.]+))?\\)/;const matches=colorString.match(regex);if(matches){const isRgba=matches[1]===\"rgba\";const red=parseInt(matches[2]);const green=parseInt(matches[3]);const blue=parseInt(matches[4]);const alpha=isRgba?parseFloat(matches[6]):1;return`rgba(${red}, ${green}, ${blue}, ${alpha})`;}}else return colorString;}export default ShaderGradient;\nexport const __FramerMetadata__ = {\"exports\":{\"TestControl\":{\"type\":\"reactComponent\",\"name\":\"TestControl\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"Background\":{\"type\":\"reactComponent\",\"name\":\"Background\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"400\",\"framerIntrinsicHeight\":\"300\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"AddControls\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"ShaderGradient\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"300\",\"framerIntrinsicHeight\":\"250\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ShaderGradient.map"],"mappings":"gPAO2pB,SAAgB,EAAY,EAAK,CAAC,EAAK,aAAa,CAAC,QAAQ,QAAQ,QAAQ,KAAK,WAAW,IAAI,UAAU,IAAI,WAAW,EAAE,OAAO,UAAU,OAAO,UAAU,OAAO,UAAU,UAAU,MAAM,UAAU,OAAO,YAAY,OAAO,MAAM,KAAK,UAAU,KAAK,aAAa,EAAE,WAAW,GAAG,OAAO,WAAW,KAAK,QAAQ,OAAO,GAAG,MAAM,EAAE,UAAU,QAAQ,QAAQ,GAAM,WAAW,GAAM,cAAc,OAAO,CAAC,EAAoB,EAAK,CAAC,QAAQ,CAAC,KAAK,EAAY,KAAK,QAAQ,CAAC,QAAQ,QAAQ,CAAC,aAAa,CAAC,QAAQ,QAAQ,CAAC,wBAAwB,GAAK,CAAC,UAAU,CAAC,MAAM,iBAAiB,KAAK,EAAY,KAAK,QAAQ,CAAC,QAAQ,SAAS,UAAU,OAAO,CAAC,OAAO,GAAO,EAAM,UAAU,QAAQ,CACv0C,KAAK,CAAC,KAAK,EAAY,KAAK,QAAQ,CAAC,QAAQ,SAAS,aAAa,CAAC,aAAa,CAAC,QAAQ,SAAS,QAA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