{"id":16675982,"url":"https://github.com/pixelrobin/superpowers-game-noisejs-plugin","last_synced_at":"2025-03-13T04:27:57.884Z","repository":{"id":96434947,"uuid":"65439681","full_name":"Pixelrobin/superpowers-game-noisejs-plugin","owner":"Pixelrobin","description":"🏔 noisejs plugin for Superpowers Game","archived":false,"fork":false,"pushed_at":"2018-10-29T07:44:38.000Z","size":2767,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T21:50:00.299Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Pixelrobin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-11T04:58:03.000Z","updated_at":"2018-10-29T07:44:39.000Z","dependencies_parsed_at":"2023-03-13T16:31:44.124Z","dependency_job_id":null,"html_url":"https://github.com/Pixelrobin/superpowers-game-noisejs-plugin","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/Pixelrobin%2Fsuperpowers-game-noisejs-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixelrobin%2Fsuperpowers-game-noisejs-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixelrobin%2Fsuperpowers-game-noisejs-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixelrobin%2Fsuperpowers-game-noisejs-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pixelrobin","download_url":"https://codeload.github.com/Pixelrobin/superpowers-game-noisejs-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243339656,"owners_count":20275733,"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-12T13:08:42.031Z","updated_at":"2025-03-13T04:27:57.860Z","avatar_url":"https://github.com/Pixelrobin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# superpowers-game-noisejs-plugin\n[Noisejs](https://github.com/josephg/noisejs) plugin for [Superpowers Game](https://github.com/superpowers/superpowers-game).\n\n![Example game scene with minecraft-like blocks](superpowers-noisejs.gif)\n\n## Installation on Windows\nUse the following commands\n```\ncd %appdata%\\Superpowers\\systems\\game\\plugins\\extra\ngit clone --recursive https://github.com/Pixelrobin/superpowers-game-noisejs-plugin noisejs\n```\nCurrently not tested on mac or linux. If anyone is willing to share how to install on those platforms, please open a PR!\n\n## Demo project\nThe repository contains a little demo project with minecraft-like terrain generation. Just copy the `noisejs-demo` folder from `project\\demo.zip` to your superpowers project directory. Make sure you installed the plugin.\n\nOn Windows, in a typical installation, your projects folder is located under `%appdata%\\Superpowers\\projects` and if you followed the directions above, the plugin should be installed in `%appdata%\\Superpowers\\systems\\game\\plugins\\extra\\` as the folder `noisejs`.\n\n## Usage\n``` Typescript\n// Set the seed of the noise ( float between 0 and 1 or integer between 1 and 65536 )\nNoise.seed( seed: number ): void\n\n// Make a random seed for the noise\nNoise.makeRandomSeed(): void\n\n// Get the last set seed\nNoise.getSeed(): number\n\n// Simplex Noise functions\nNoise.simplex2d( x: number, y: number ): number            // 2D\nNoise.simplex3d( x: number, y: number, z: number ): number // 3D\n  \n// Perlin Noise functions\nNoise.perlin2d( x: number, y: number ): number            // 2D\nNoise.perlin3d( x: number, y: number, z: number ): number // 3D\n```\n\n## Example\n``` Typescript\n// Taken and adapted from the original noisejs repo\n\nlet width = 10, height = 10, time = 0, values: number[] = [];\nNoise.makeRandomSeed();\n\nfor (var x = 0; x \u003c width; x ++) {\n  for (var y = 0; y \u003c height; y ++) {\n    // All noise functions return values in the range of -1 to 1.\n\n    // noise.simplex2 and noise.perlin2 for 2d noise\n    let value = Noise.simplex2d(x / 100, y / 100);\n    // ... or noise.simplex3 and noise.perlin3:\n    let value = Noise.simplex3d(x / 100, y / 100, time);\n\n    values[ x, y ] = value // Or whatever. See demo project for a minecraft-like terrain generator\n    \n  }\n}\n```\n\n## License\nThis project is licensed under the [MIT License](https://github.com/Pixelrobin/superpowers-game-noisejs-plugin/blob/master/LICENSE).\n\nIt includes code from josephg/noisejs, which is licensed under the [ISC License](https://github.com/josephg/noisejs/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelrobin%2Fsuperpowers-game-noisejs-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelrobin%2Fsuperpowers-game-noisejs-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelrobin%2Fsuperpowers-game-noisejs-plugin/lists"}