PageSourceSearch

https://k-l-lambda.github.io/klstudio/assets/curves-editor-Cp6OaeEX.js

js k-l-lambda.github.io collected 2026-10-03 09:26:39 UTC 3,373 bytes, 1 lines download raw bytes

1import{r as m}from"./vue-resize-directive-CDf_Yp3t.js";import{S as v}from"./svg-map-DP6b4Gh6.js";import{S as x}from"./svg-curve-BwHAsU1F.js";import{_,r as y,y as g,c as i,o as r,a as e,w as o,e as C,i as V,p as U,h as w,F as b,g as E,C as k,q as d,B as z}from"./router-B_NRvU0r.js";class S{constructor(n={xExp:"",yExp:"",argExp:"",argLow:0,argHigh:0,segments:100,style:"solid",color:"black",width:"0.1"}){Object.assign(this,n)}get valid(){return this.xFunction&&this.yFunction}}const F={name:"curves-editor",directives:{resize:m},components:{SvgMap:v,SvgCurve:x},data(){return{size:{},panelIsOn:!1,curveConfig:[]}},mounted(){},methods:{onResize(){this.size={width:this.$el.clientWidth,height:this.$el.clientHeight}},onAddCurve(){this.curveConfig.push(new S)},onRemoveCurve(u){this.curveConfig.splice(u,1)}}},O={key:0,class:"config"},I={class:"curves"},B={class:"index"},M=["onUpdate:modelValue"],f=["onUpdate:modelValue"],A=["onUpdate:modelValue"],H=["onUpdate:modelValue"],L=["onUpdate:modelValue"],R=["onUpdate:modelValue"],D=["onUpdate:modelValue"],N=["onUpdate:modelValue"],W=["onUpdate:modelValue"],j=["onClick"];function q(u,n,T,X,s,a){const c=y("SvgMap"),h=g("resize");return r(),i("body",null,[e("article",null,[o((r(),C(c,{ref:"cartesian",width:s.size.width,height:s.size.height,initViewWidth:4,initViewCenter:{x:0,y:0}},{default:V(()=>[...n[2]||(n[2]=[e("g",{class:"axes"},[e("line",{x1:"-100",x2:"100",y1:"0",y2:"0"}),e("line",{y1:"-100",y2:"100",x1:"0",x2:"0"})],-1),e("g",{class:"curves"},null,-1)])],void 0,!0),_:1},8,["width","height"])),[[h,a.onResize]])]),e("header",null,[e("button",{class:w(["settings",{on:s.panelIsOn,off:!s.panelIsOn}]),onClick:n[0]||(n[0]=t=>s.panelIsOn=!s.panelIsOn)},"⚙",2),s.panelIsOn?(r(),i("div",O,[e("table",I,[e("tbody",null,[(r(!0),i(b,null,E(s.curveConfig,(t,p)=>(r(),i("tr",{key:p},[e("td",B,k(p+1)+".",1),e("td",null,[e("div",null,[o(e("input",{type:"text",placeholder:"X Function","onUpdate:modelValue":l=>t.xExp=l},null,8,M),[[d,t.xExp]])]),e("div",null,[o(e("input",{type:"text",placeholder:"Y Function","onUpdate:modelValue":l=>t.yExp=l},null,8,f),[[d,t.yExp]])])]),e("td",null,[o(e("input",{type:"text",placeholder:"Arg Function","onUpdate:modelValue":l=>t.argExp=l},null,8,A),[[d,t.argExp]])]),e("td",null,[o(e("input",{type:"text",placeholder:"arg start","onUpdate:modelValue":l=>t.argLow=l},null,8,H),[[d,t.argLow,void 0,{number:!0}]]),o(e("input",{type:"text",placeholder:"arg end","onUpdate:modelValue":l=>t.argHigh=l},null,8,L),[[d,t.argHigh,void 0,{number:!0}]])]),e("td",null,[o(e("input",{type:"number",placeholder:"segments","onUpdate:modelValue":l=>t.segments=l},null,8,R),[[d,t.segments,void 0,{number:!0}]])]),e("td",null,[o(e("select",{"onUpdate:modelValue":l=>t.style=l},[...n[3]||(n[3]=[e("option",{value:"solid"},"solid",-1),e("option",{value:"dashed"},"dashed",-1)])],8,D),[[z,t.style]])]),e("td",null,[o(e("input",{type:"text",placeholder:"color","onUpdate:modelValue":l=>t.color=l},null,8,N),[[d,t.color]])]),e("td",null,[o(e("input",{type:"text",placeholder:"width","onUpdate:modelValue":l=>t.width=l},null,8,W),[[d,t.width]])]),e("td",null,[e("button",{class:"remove-curve",onClick:l=>a.onRemoveCurve(p)},"-",8,j)])]))),128))])]),e("button",{class:"add-curve",onClick:n[1]||(n[1]=(...t)=>a.onAddCurve&&a.onAddCurve(...t))},"+")])):U("",!0)])])}const P=_(F,[["render",q]]);export{P as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.