javascript实现多边形碰撞检测

追影-86742 7 0 PDF 2021-02-19 05:02:13

javascript多边形碰撞检测 原理就是 循环每个顶点判断是不是在多边形内 const app = new PIXI.Application({ antialias: true }); document.body.appendChild(app.view); const graphics = new PIXI.Graphics(); // draw polygon const path = [600, 370, 700, 460, 780, 420, 730, 570, 590, 520]; graphics.lineStyle(0); graphics.beginFill(0x3500

用户评论
请输入评论内容
评分:
暂无评论