{"__browser":{"country":"US","device":"unknown_device","mobile":false,"name":"unknown browser","platform":"unknown_platform","version":"0"},"__constants":{},"__CPDATA":{"domain_iframe":"https://cdpn.io","environment":"production","host":"codepen.io","iframe_allow":"accelerometer *; ambient-light-sensor *; camera *; display-capture *; encrypted-media *; geolocation *; gyroscope *; microphone *; midi *; payment *; serial *; vr *; web-share *; xr-spatial-tracking *","iframe_sandbox":"allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation"},"__graphql":{"data":{"data":{"sessionUser":{"id":"VoDkNZ","name":"Captain Anonymous","title":"Captain Anonymous","avatar":"https://assets.codepen.io/t-1/user-default-avatar.jpg?format=auto&version=0","currentContext":{"id":"VoDkNZ","title":"Captain Anonymous","name":"Captain Anonymous","avatar":"https://assets.codepen.io/t-1/user-default-avatar.jpg?format=auto&version=0","username":"anon","__typename":"User"},"currentTeamId":null,"username":"anon","admin":false,"anon":true,"pro":false,"verified":false,"featureFlags":[],"teams":[],"__typename":"User"}}},"url":"https://codepen.io/graphql","api":"cprails"},"__user":{"anon":true,"base_url":"/anon/","cohorts":[],"current_team_hashid":null,"current_team_id":0,"hashid":"VoDkNZ","id":1,"itemType":"user","name":"Captain Anonymous","paid":false,"tier":0,"username":"anon","created_at":null,"email_verified":null,"collections_count":0,"collections_private_count":0,"followers_count":0,"followings_count":0,"pens_count":0,"pens_private_count":0,"projects_count":0,"projects_private_count":0},"__firebase":{"config":{"apiKey":"AIzaSyBgLAe7N_MdFpuVofMkcQLGwwhUu5tuxls","authDomain":"codepen-store-production.firebaseapp.com","databaseURL":"https://codepen-store-production.firebaseio.com","disabled":false,"projectId":"codepen-store-production"},"token":"eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImNsYWltcyI6eyJvd25lcklkIjoiVm9Ea05aIiwiYWRtaW4iOmZhbHNlfSwiZXhwIjoxNzQ3NDE5ODQyLCJpYXQiOjE3NDc0MTYyNDIsImlzcyI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInN1YiI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInVpZCI6IlZvRGtOWiJ9.0LnOI4bMw4K8xlKP9X3oJ-ki-a6msy4FiMcaR971P-ovngMHITABLoRt3RM39T_EyRe2u2yKbEvmxZrdvFfqRU9uIxFE2TEyHNge-E6IMP-5m8iDPtQ0cvoQ7r0Q5ZIURs5ISBO9VNxFWj5RikEM0G_Hbwbn49rrGtydzqHXD4XdpRMqkL7F7sCayPj8mpdKo8F8zkVtLljrCJGuvcU4vM7X8iJMP88YS1QawMJJ58BYiJy48g2mymJHzoUDoaVCR7_Y0WJ9GEuTq8J4vJF0zrmBZnWde56zzF-Q9WHncaZIO-m1pR2RvaP-V0EDNx_j_n0IrXm26vBsKuKAunslHw"},"__pay_stripe_public_key":"pk_live_2GndomDfiklqpSNQn8FrGuwZSMIMzha7DkLJqlYe7IR0ihKAlKdiHg68JJc5eVPt68rzAjzAAVXcUwjySHRCsgjQQ00gtRBUFNH","__pay_braintree_env":"production","__item":"{\"id\":55674745,\"user_id\":4559259,\"html\":\"\",\"css\":\"html,\\nbody {\\n height: 100%;\\n background: black;\\n}\\n\\nbody {\\n margin: 0;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n overflow: hidden;\\n}\\n\",\"js\":\"let cnv; \\/\\/canvas\\nlet c = 0; \\/\\/wavecounter\\nlet t; \\/\\/time\\nlet waveA = []; \\/\\/wave array\\n\\nfunction setup() {\\n cnv = createCanvas(windowWidth, windowHeight); \\/\\/canvas size and setup\\n angleMode(DEGREES); \\/\\/angles are in degrees\\n curvies();\\n}\\nfunction draw() {\\n background(0,0,0, 1);\\n translate(width \\/ 2, height \\/ 2);\\n t = (-width \\/ 2) * cos(frameCount \\/ (width\\/100)); \\/\\/time is the x-axis or horizontal motion to go back and forth\\n noStroke(); \\/\\/circles plot, so no stroke\\n fill(\\n 100 * sin(frameCount \\/ 3) * sin(frameCount \\/ 3),\\n 200 * sin(frameCount \\/ 4) * sin(frameCount \\/ 4),\\n 250 * cos(frameCount \\/ 2) * cos(frameCount \\/ 2),\\n 100\\n ); \\/\\/variable colors\\n for (let i = 0; i < c; i++) {\\n \\/\\/loop through waves\\n waveA[i].move(); \\/\\/move wave\\n waveA[i].display(); \\/\\/display wave\\n }\\n if(frameCount%50===0){\\n curvies();\\n }\\n \\n}\\nfunction curvies() {\\n \\/\\/click function to add a wave\\n if (c < 100) {\\n waveA.push(new waveMe(c));\\n c = c + 1;\\n }\\n\\n}\\n\\nclass waveMe {\\n \\/\\/wave class\\n constructor(n) {\\n this.x = 0;\\n this.y = 100;\\n this.n = n;\\n }\\n move() {\\n this.x = t;\\n this.y = 100 + 100 * sin(t) * cos(this.n * t) + 10 * sin((this.n * t) \\/ 2); \\/\\/play with this to create various curves -add another sin, cos, tan, etc.\\n }\\n display() {\\n circle(this.x, this.y, 2); \\/\\/plot point for curve\\n circle(-this.x, -this.y, 2); \\/\\/plot point for curve\\n }\\n}\\nfunction mousePressed(){\\n c = 0;\\n waveA = [];\\n setup();\\n}\\n\",\"html_pre_processor\":\"none\",\"css_pre_processor\":\"none\",\"js_pre_processor\":\"none\",\"html_classes\":\"\",\"css_starter\":\"neither\",\"js_library\":null,\"created_at\":\"2021-10-05T03:16:33.022Z\",\"updated_at\":\"2024-07-19T16:56:04.146Z\",\"title\":\"fadedCurve\",\"description\":\"\",\"slug_hash\":\"oNwrLyo\",\"head\":\"\",\"private\":false,\"slug_hash_private\":\"ab6e9652865daba87e4f78bf6f435428\",\"has_animation\":false,\"team_id\":0,\"css_prefix\":\"neither\",\"template\":false,\"parent_id\":0,\"comments_count\":0,\"custom_screenshot_filename\":null,\"loves_count\":6,\"pick\":false,\"popularity\":69,\"views_count\":386,\"pick_visible_at\":null,\"cpid\":\"017c4e73-ee7e-7699-ad3d-5d7da27d19fa\",\"is_new_editor_pen\":false,\"access\":\"Public\",\"pen_hash\":null,\"hashid\":\"oNwrLyo\"}"}