{"__browser":{"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; vr; web-share","iframe_sandbox":"allow-forms allow-modals allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation allow-downloads allow-presentation"},"__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,"teams":[],"__typename":"User"}}},"url":"https://codepen.io/graphql","api":"cprails","cpedata":{"action":"show","controller":"live_fullpage"}},"__user":{"anon":true,"base_url":"/anon/","current_team_id":0,"current_team_hashid":null,"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.eyJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImNsYWltcyI6eyJvd25lcklkIjoiVm9Ea05aIiwiYWRtaW4iOmZhbHNlfSwiZXhwIjoxNjg1NzE1Njk0LCJpYXQiOjE2ODU3MTIwOTQsImlzcyI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInN1YiI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInVpZCI6IlZvRGtOWiJ9.tXsPltonw67zCeJtvwaqlG5FL122OWupEFdnL2eiqpx-NSIDPV54t0pPGSEmY4rXLf8EAdoh2kW8ZpfBxCXvLyKdp1M6N95BzUI9Wixea0uW3OMNjeF5r2kH0QjMPtZ2HN8vpnIzkaRseBws9Zbxm_JwEcYUFZFaK_RTvSZsd_Jj2cvu-ZHA7Ct9lUDi1n_HXaC1WLFT8jrBGawEjlGaNxI4YU67gzP3nwzx-zuMCbS4K4Do6HwF4JnvXuthxwi7go612s7NajpA0lkiOP6wC5cqg2ZT4ypiXB9hoef_XrcYdZZI5Sh-Oenexnpfm0_732M4ky1YX5s6IPOEQV483Q"},"__pay_stripe_public_key":"pk_live_2GndomDfiklqpSNQn8FrGuwZSMIMzha7DkLJqlYe7IR0ihKAlKdiHg68JJc5eVPt68rzAjzAAVXcUwjySHRCsgjQQ00gtRBUFNH","__pay_braintree_env":"production","__item":"{\"id\":49021552,\"user_id\":3685267,\"html\":\"<canvas id=\\\"canvas\\\"><\\/canvas>\",\"css\":\"body {\\n margin: 0;\\n height: 100vh;\\n overflow: hidden;\\n}\\n\",\"js\":\"const { ceil, sin, cos, pow, PI } = Math;\\nconst polar = (ang, r = 1) => [r * cos(ang), r * sin(ang)];\\nconst { innerWidth: w, innerHeight: h } = window;\\nconst canvas = document.getElementById(\\\"canvas\\\");\\ncanvas.width = w;\\ncanvas.height = h;\\nconst ctx = canvas.getContext(\\\"2d\\\");\\nconst tileWidth = 3;\\nnoise.seed(Math.random());\\n\\nconst horizontalTilesCount = ceil(w \\/ tileWidth);\\nconst verticalTilesCount = ceil(h \\/ tileWidth);\\n\\nconst line = (x1, y1, x2, y2, p) => {\\n ctx.beginPath();\\n ctx.moveTo(x1, y1);\\n ctx.lineTo(x2, y2);\\n ctx.strokeStyle = \\\"#000\\\";\\n ctx.lineWidth = 1;\\n ctx.stroke();\\n ctx.closePath();\\n};\\n\\nfor (let ix = 0; ix <= horizontalTilesCount; ix++) {\\n const x = ix * tileWidth;\\n for (let iy = 0; iy <= verticalTilesCount; iy++) {\\n const y = iy * tileWidth;\\n let p = noise.perlin2(x * 0.006, y * 0.006) \\/ 0.75;\\n p = pow(p, 2);\\n const ang = p * 2 * PI;\\n const [x2, y2] = polar(ang, tileWidth * 4);\\n line(x, y, x + x2, y + y2, p);\\n }\\n}\\n\",\"html_pre_processor\":\"none\",\"css_pre_processor\":\"none\",\"js_pre_processor\":\"none\",\"html_classes\":\"\",\"css_starter\":\"neither\",\"js_library\":null,\"created_at\":\"2020-12-14T17:08:27.000Z\",\"updated_at\":\"2020-12-14T17:17:38.000Z\",\"title\":\"3D structure with Perlin noise B\\/W\",\"description\":\"\",\"slug_hash\":\"GRjWJZx\",\"head\":\"\",\"private\":false,\"slug_hash_private\":\"9ac59c764a5150489695e0ea46191a12\",\"has_animation\":false,\"team_id\":0,\"css_prefix\":\"neither\",\"template\":false,\"parent_id\":0,\"comments_count\":0,\"custom_screenshot_filename\":null,\"loves_count\":0,\"pick\":false,\"popularity_score\":0,\"views_count\":0,\"pick_visible_at\":null,\"cpid\":\"01766239-8af8-7d90-9d48-8c17a5783615\",\"is_new_editor_pen\":false,\"pen_hash\":null,\"hashid\":\"GRjWJZx\"}"}