{"id":17981468,"url":"https://github.com/francisrstokes/creative-code-toolkit-fp","last_synced_at":"2025-04-04T01:22:54.179Z","repository":{"id":57195282,"uuid":"121164382","full_name":"francisrstokes/creative-code-toolkit-fp","owner":"francisrstokes","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-10T06:44:12.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T13:11:11.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/francisrstokes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-11T20:32:30.000Z","updated_at":"2021-10-08T12:18:24.000Z","dependencies_parsed_at":"2022-09-16T05:22:10.891Z","dependency_job_id":null,"html_url":"https://github.com/francisrstokes/creative-code-toolkit-fp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francisrstokes%2Fcreative-code-toolkit-fp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francisrstokes%2Fcreative-code-toolkit-fp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francisrstokes%2Fcreative-code-toolkit-fp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francisrstokes%2Fcreative-code-toolkit-fp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/francisrstokes","download_url":"https://codeload.github.com/francisrstokes/creative-code-toolkit-fp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247104221,"owners_count":20884189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T18:10:01.617Z","updated_at":"2025-04-04T01:22:54.160Z","avatar_url":"https://github.com/francisrstokes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creative Code Toolkit (FP)\n\nThis library is my personal collection of helper functions in creative coding, revolving around modulation, array functions, random numbers, etc.\n\n## Functions\n\n## mapRange :: Vector  -\u003e Vector    -\u003e Number -\u003e Number\n`mapRange :: toRange -\u003e tromRange -\u003e value  -\u003e Number`\nMap v in `fromRange` to `fromRange`\n\n## sinMap :: Vector -\u003e Number -\u003e Number\n`sinMap :: toRange -\u003e Divisor -\u003e Number`\nMap the output sin(v / div) to `toRange`\n\n## cosMap :: Vector -\u003e Number -\u003e Number\n`cosMap :: toRange -\u003e Divisor -\u003e Number`\nMap the output cos(v / div) to `toRange`\n\n## wrapValue :: Number -\u003e Number -\u003e Number -\u003e Number\nif v is greater than M or less than m, wrap the value around to stay in this range\n\n## deepArrayCopy :: [a] -\u003e [a]\nReturn a deep copy array a\n\n## genArray :: Number -\u003e []\nCreate an array of size s\n\n## get1dY :: Number -\u003e Number -\u003e Number\n`get1dY :: Columns -\u003e Index -\u003e Number`\nGet the Y component of a 1d array containing 2d data when the index is i\n\n## get1dX :: Number -\u003e Number -\u003e Number\n`get1dX :: Columns -\u003e Index -\u003e Number`\nGet the X component of a 1d array containing 2d data when the index is i\n## choose :: [a] -\u003e a\npick a random element from the array a\n\n## without :: (\\*) -\u003e [\\*] -\u003e [\\*]\nget an array without a specific member\n\n## chooseWithout :: a -\u003e [a] -\u003e [a]\n`compose(choose, without)`\n\n## rndB :: Vector -\u003e Number\n`rndB :: Range -\u003e Number`\nRandom number in range\n\n## rndIntB :: Vector -\u003e Number\n`rndIntB :: Range -\u003e Number`\nRandom integer in range\n\n## polute()\nPolutes the global scope with unnamespaced functions","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancisrstokes%2Fcreative-code-toolkit-fp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrancisrstokes%2Fcreative-code-toolkit-fp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancisrstokes%2Fcreative-code-toolkit-fp/lists"}