astar:a星寻路算法javascript的实现-源码

上传者: 42107561 | 上传时间: 2021-07-24 11:03:50 | 文件大小: 709KB | 文件类型: ZIP
astar 最近更新 新增了JPS(跳点寻路),欢迎大家提issue 新增了TS版本,进一步的优化代码,以及进一步的简化用法,欢迎大家提issue 商业项目放心使用,有问题会及时更新! 最近要用到寻路算法,偷懒网上搜了一批,尼玛惨不忍睹,各种bug,没办法,自己动手丰衣足食。 本版本优化了两个地方,第一个是将经典的递归改成了循环避免了堆栈溢出,第二个是优化了路径尽量走直线。 关于用法 工程项目是cocos create的,其他项目直接调用 /assets/Script/AutoFindPath.js下的getPath即可参数和返回值如下, 另外点对象的结构如下(x: 0, y: 0) /** * @param {object} bron 出生点 @param {object} obstacles 障碍物数组 @param {object} target 目标 @

文件下载

资源详情

[{"title":"( 31 个子文件 709KB ) astar:a星寻路算法javascript的实现-源码","children":[{"title":"astar-master","children":[{"title":".gitignore <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"settings","children":[{"title":"builder.panel.json <span style='color:#111;'> 177B </span>","children":null,"spread":false},{"title":"builder.json <span style='color:#111;'> 304B </span>","children":null,"spread":false},{"title":"project.json <span style='color:#111;'> 439B </span>","children":null,"spread":false}],"spread":true},{"title":"jsconfig.json <span style='color:#111;'> 266B </span>","children":null,"spread":false},{"title":"assets","children":[{"title":"Texture","children":[{"title":"singleColor.png.meta <span style='color:#111;'> 676B </span>","children":null,"spread":false},{"title":"gz.png.meta <span style='color:#111;'> 671B </span>","children":null,"spread":false},{"title":"singleColor.png <span style='color:#111;'> 16.79KB </span>","children":null,"spread":false},{"title":"gz.png <span style='color:#111;'> 139B </span>","children":null,"spread":false},{"title":"HelloWorld.png.meta <span style='color:#111;'> 683B </span>","children":null,"spread":false},{"title":"HelloWorld.png <span style='color:#111;'> 36.98KB </span>","children":null,"spread":false}],"spread":true},{"title":"gz.prefab.meta <span style='color:#111;'> 116B </span>","children":null,"spread":false},{"title":"Scene.meta <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"Script","children":[{"title":"AutoFindPath.js <span style='color:#111;'> 8.23KB </span>","children":null,"spread":false},{"title":"HelloWorld.js.meta <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"AutoFindPath.js.meta <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"canvasControl.js.meta <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"canvasControl.js <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"HelloWorld.js <span style='color:#111;'> 5.24KB </span>","children":null,"spread":false}],"spread":true},{"title":"Scene","children":[{"title":"helloworld.fire.meta <span style='color:#111;'> 146B </span>","children":null,"spread":false},{"title":"helloworld.fire <span style='color:#111;'> 22.92KB </span>","children":null,"spread":false}],"spread":true},{"title":"Texture.meta <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"Script.meta <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"gz.prefab <span style='color:#111;'> 3.37KB </span>","children":null,"spread":false}],"spread":true},{"title":"creator.d.ts <span style='color:#111;'> 566.95KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false},{"title":"README.md.bak <span style='color:#111;'> 580B </span>","children":null,"spread":false},{"title":"NewProject1.rar <span style='color:#111;'> 525.56KB </span>","children":null,"spread":false},{"title":"template-banner.png <span style='color:#111;'> 22.61KB </span>","children":null,"spread":false},{"title":"template.json <span style='color:#111;'> 112B </span>","children":null,"spread":false},{"title":"project.json <span style='color:#111;'> 57B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明