5 Star 51 Fork 0

Gitee Community / 码力传递:晒代码赢奖品

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
滑块验证码 759 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ouyang 提交于 2020-06-10 17:51 . add 滑块验证码.
for (Integer x : align) { // 对齐操作
int y = (int) (Math.random() * offsetY * (locationY > 0 ? -1 : 1));
locationX += x; // 偏移补偿
locationY += y; // Y轴偏移适当抖动,不需要精确对齐
logger.info("align move (" + x + ", " + y + ", " + locationX + ", " + locationY + ")");
array.add(DPUtil.objectNode().put("x", x).put("y", y));
}
if (locationX != targetX) { // 精确定位
int x = targetX - locationX, y = (int) (Math.random() * offsetY * (locationY > 0 ? -1 : 1));
locationX += x;
locationY += y;
logger.info("target move (" + x + ", " + y + ", " + locationX + ", " + locationY + ")");
node.put("stopX", x).put("stopY", y);
} else {
node.put("stopX", 0).put("stopY", 0);
}
1
https://gitee.com/gitee-community/gitee-7th-event-3.git
git@gitee.com:gitee-community/gitee-7th-event-3.git
gitee-community
gitee-7th-event-3
码力传递:晒代码赢奖品
master

搜索帮助