From f040f82b5106a7a9bb5ed91865546c1b9dcd415c Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 15 Jul 2020 23:54:08 +0800 Subject: [PATCH] Update bigmap threshold --- libs/control.js | 2 +- libs/core.js | 2 +- libs/maps.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/control.js b/libs/control.js index 8a0013f3..3a8da3c3 100644 --- a/libs/control.js +++ b/libs/control.js @@ -1126,7 +1126,7 @@ control.prototype.updateDamage = function (floorId, ctx) { if (!onMap) { var width = core.floors[floorId].width, height = core.floors[floorId].height; // 地图过大的缩略图不绘制显伤 - if (width * height > (core.__SIZE__ + 2 * core.bigmap.extend) * (core.__SIZE__ + 2 * core.bigmap.extend)) return; + if (width * height > core.bigmap.threshold) return; } this._updateDamage_damage(floorId, onMap); this._updateDamage_extraDamage(floorId, onMap); diff --git a/libs/core.js b/libs/core.js index 2475eb75..1fa61ca8 100644 --- a/libs/core.js +++ b/libs/core.js @@ -101,7 +101,7 @@ function core() { width: this.__SIZE__, // map width and height height: this.__SIZE__, v2: false, - threshold: 512, + threshold: 1024, extend: 10, scale: 1.0, tempCanvas: null, // A temp canvas for drawing diff --git a/libs/maps.js b/libs/maps.js index bb543950..d3436b6e 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -1468,7 +1468,7 @@ maps.prototype._drawThumbnail_drawTempCanvas = function (floorId, blocks, option options.ctx = tempCanvas; // 地图过大的缩略图不绘制显伤 - if (width * height > (core.__SIZE__ + 2 * core.bigmap.extend) * (core.__SIZE__ + 2 * core.bigmap.extend)) + if (width * height > core.bigmap.threshold) options.damage = false; // --- 暂存 flags