{"id":17809552,"url":"https://github.com/ldd/melonjs-pathfinding","last_synced_at":"2025-04-02T06:28:43.091Z","repository":{"id":23620927,"uuid":"26990385","full_name":"ldd/melonjs-pathfinding","owner":"ldd","description":"Pathfinding plugin for melonJS","archived":false,"fork":false,"pushed_at":"2014-11-22T06:09:13.000Z","size":124,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T21:18:20.431Z","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/ldd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-22T05:59:45.000Z","updated_at":"2020-08-24T10:03:05.000Z","dependencies_parsed_at":"2022-08-22T01:50:36.711Z","dependency_job_id":null,"html_url":"https://github.com/ldd/melonjs-pathfinding","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/ldd%2Fmelonjs-pathfinding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldd%2Fmelonjs-pathfinding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldd%2Fmelonjs-pathfinding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldd%2Fmelonjs-pathfinding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldd","download_url":"https://codeload.github.com/ldd/melonjs-pathfinding/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246766238,"owners_count":20830243,"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-27T15:19:46.204Z","updated_at":"2025-04-02T06:28:43.068Z","avatar_url":"https://github.com/ldd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"melonjs-pathfinding\n=============\n\nMelonJS plugin implementing pathfindings using webworkers\n\nOfficial repository : https://github.com/ldd/melonjs-pathfinding\n\nCredit: https://github.com/qiao/PathFinding.js/\n\nLicense: MIT\n\nUsage\n=====\n\n- Add melonjs-pathfinding folder to your plugins directory and include it on your game page.\n- Register it in your game.js:\n`me.plugin.register(me.pathFinding, \"pathFinding\", [arguments]);`\n- Call me.pathFinding.postMessage(message) from your entity code.\n\nArgument options\n================\n`me.plugin.register(me.pathFinding, \"pathFinding\", width, height, type, length, location);`\n\nWhere:\n\n`width: the width of the grid`\n\n`height: the height of the grid`\n\n`type: type of pathfinding algorithm` (default is jumpPointFinder)\n\n`length: how many grids to hold, 1 per layer` (default is 1)\n\n`location: the path of your plugins` \t\t\t(default is lib/plugins/pathFinding)\n\nmessage format\n===============\nto find a path:\n`{name: \"findPath\",\n data: {initialPosition:{x:0,y:0}, endPosition: {x:4, y:3},\t\t\t\t\t\t\t\t\t\t\t\t\t \t\tzLevel: 0, offset: 0}}\n`\n\nto set some position in the grid as walkable or not:\n`{name: \"setWalkablePosition\",data: [{x: 1, y: 2, z: 3, value: true}]}`\n\nto set all nodes in a grid:         \n`{name: \"setWalkableNodes\", data: [{nodes: {}}]}`\n\nto find out if a position in the grid is walkable:\n`{name: \"isWalkableAt\", data: [{x:4, y: 4, z: 0}]}`\n\nto get all grids:   \n`{name: \"getAllGrids\"}`\n\nextending functionality\n==================\nBasically, there are two places that you want to change\n\n`me.pathFinding.workerListener` \t\tto handle the response differently. The current behavior simply prints the response.\n\n`pathObject.prototype.handleAction` \tto handle the message that is being passed to the worker.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldd%2Fmelonjs-pathfinding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldd%2Fmelonjs-pathfinding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldd%2Fmelonjs-pathfinding/lists"}