(this["webpackJsonpcameronwthomas.com"]=this["webpackJsonpcameronwthomas.com"]||[]).push([[0],[,,,,,,,,,function(e,t,n){},,function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var i=n(1),c=n.n(i),o=n(4),a=n.n(o),r=(n(9),n(2)),s=n(0);function l(e){return Object(s.jsx)("div",{className:"hovering-back-button",children:Object(s.jsx)("i",{className:"fas fa-caret-left carrot",onClick:e.func})})}function d(){var e=Object(i.useState)(window.innerWidth),t=Object(r.a)(e,2),n=t[0],c=t[1],o=function(){c(window.innerWidth)};return Object(i.useEffect)((function(){return window.addEventListener("resize",o),function(){window.removeEventListener("resize",o)}}),[]),n<=768}function u(e){return Object(s.jsxs)("div",{id:d?"mobile-site-contents":"site-contents",children:[Object(s.jsx)("div",{children:Object(s.jsx)("h1",{className:d?"mobile-title":"title",children:"Cameron W Thomas"})}),Object(s.jsx)("div",{className:"about",children:"Web and software developer. Also a musician."}),Object(s.jsxs)("div",{children:[Object(s.jsxs)("div",{className:"section",children:[Object(s.jsx)("div",{className:"section-header",children:"Projects"}),Object(s.jsxs)("div",{className:"section-link",children:[" ",Object(s.jsx)("span",{onClick:function(){return e.linkTo("https://fsr.live")},children:" frozen section radio (site developer) "})," "]}),Object(s.jsxs)("div",{className:"section-link",children:[" ",Object(s.jsx)("span",{onClick:e.goToMandala,children:" mandala "})]}),Object(s.jsxs)("div",{className:"section-link",children:[" ",Object(s.jsx)("span",{onClick:e.goToGOL,children:" cellular automata (epileptics beware. seriously.) "})]}),Object(s.jsxs)("div",{className:"section-link",children:[" ",Object(s.jsx)("span",{onClick:function(){return e.linkTo("http://www.weatherdotcomsucks.org")},children:" www.weatherdotcomsucks.org "})," "]})]}),Object(s.jsxs)("div",{className:"section",children:[Object(s.jsx)("div",{className:"section-header",children:"Music"}),Object(s.jsxs)("div",{className:"section-link",children:[" ",Object(s.jsx)("span",{onClick:function(){return e.linkTo("https://leisuresport.bandcamp.com/album/title-card")},children:" Leisure Sport (Bass) "})," "]}),Object(s.jsxs)("div",{className:"section-link",children:[" ",Object(s.jsx)("span",{onClick:function(){return e.linkTo("https://oblonggato.bandcamp.com/")},children:" Obling Gato "})]})]})]}),Object(s.jsx)(l,{func:e.goBackToLanding})]})}function h(e){var t=e.title,n=d();return Object(s.jsx)("div",{children:Object(s.jsx)("h1",{className:n?"mobile-title":"title",children:t})})}n(11);function f(){return Object(s.jsx)("div",{className:"dither-wrapper",children:Object(s.jsx)(h,{title:"Cameron W Thomas"})})}var j=function(e){var t=Object(i.useRef)(null),n=Object(i.useState)(!1),c=Object(r.a)(n,2),o=(c[0],c[1],Object(i.useState)({x:-123,y:-123})),a=Object(r.a)(o,2),l=a[0],d=a[1],u=function(e,t){e.preventDefault(),d("mouse"==t?{x:e.clientX,y:e.clientY}:{x:e.touches[0].clientX,y:e.touches[0].clientY})},h=function(e,t){d({x:-123,y:-123})},f=function(t,n){n=e.maxDiam&&e.moveAlong()};return Object(i.useEffect)((function(){if(-123!=l.x&&-123!=l.y){var e,n=t.current.getContext("2d"),i=0;return function t(){f(n,i+=5),e=window.requestAnimationFrame(t)}(),function(){window.cancelAnimationFrame(e)}}}),[f]),Object(s.jsx)("canvas",{id:"lp-canvas",height:window.innerHeight,width:window.innerWidth,ref:t,onTouchStart:function(e){u(e,"touch")},onTouchEnd:function(e){h()},onMouseDown:function(e){u(e,"mouse")},onMouseUp:function(e){h()}})};function b(e){return Object(s.jsxs)("div",{id:d?"mobile-site-contents":"site-contents",children:[Object(s.jsx)("div",{children:Object(s.jsx)("h1",{className:d?"mobile-title":"title",children:e.title})}),e.children,Object(s.jsx)("div",{className:"about",children:e.description}),Object(s.jsx)(l,{func:e.goBackToSiteContents})]})}n(12);var m=window.innerWidth<=768;function v(e){var t=Object(i.useRef)(null),n=m?window.innerWidth-30:400,c=m?window.innerWidth-30:400,o=d(c),a=d(c),r=["#A9DDD6","#7A8B99","#91ADC2","#9BA0BC","#C1B8C8"];function l(e){!function(e){e.clearRect(0,0,n,c);for(var t=1;t=0;){var n=c(),i=c(),a=(r=5,s=20,Math.floor(Math.random()*s)+r);o(e/2,e/2,1e4,t,t-a,n,i),t-=a}var r,s}()}),[t]),console.log("is mobile"),console.log(w);var n=400;return w&&(n=window.innerWidth-30),Object(s.jsx)("canvas",{id:"myCanvas",height:n,width:n,ref:t,style:{border:"1px solid #fff"}})}var x=function(){var e=Object(i.useState)(0),t=Object(r.a)(e,2),n=t[0],c=t[1];return Object(s.jsxs)("div",{className:"page-wraper",children:[0==n&&Object(s.jsxs)(s.Fragment,{children:[Object(s.jsx)(f,{}),Object(s.jsx)(j,{maxDiam:Math.max(window.innerHeight,window.innerWidth),moveAlong:function(){c(1)}})]}),1==n&&Object(s.jsx)(u,{goBackToLanding:function(){return c(0)},goToMandala:function(){c(2)},goToGOL:function(){c(3)},linkTo:function(e){window.open(e,"_blank")}}),2==n&&Object(s.jsx)(b,{title:"Mandala",description:"Js generative canvas art to create mandala-like structures rendered real time in browser. Completely random and unique.",goBackToSiteContents:function(){return c(1)},children:Object(s.jsx)(O,{})}),3==n&&Object(s.jsx)(b,{title:"Waterfalls",description:" Celular Automata. Rendere real time in browser via canvas. Fooled with conways game of life variables and ended up creating an interesting waterfall structure. It flashes like crazy and dies after a while. Still, I thought it was kind of pretty.",goBackToSiteContents:function(){return c(1)},children:Object(s.jsx)(v,{goBackToSiteContents:function(){return c(1)}})})]})},g=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,14)).then((function(t){var n=t.getCLS,i=t.getFID,c=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),i(e),c(e),o(e),a(e)}))};a.a.render(Object(s.jsx)(c.a.StrictMode,{children:Object(s.jsx)(x,{})}),document.getElementById("root")),g()}],[[13,1,2]]]); //# sourceMappingURL=main.127e37ff.chunk.js.map