@canvas-harness/core 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4777,10 +4777,12 @@ var cacheReuseLayout = (cache5, view) => {
|
|
|
4777
4777
|
const cacheW = cache5.widthDevicePx;
|
|
4778
4778
|
const cacheH = cache5.heightDevicePx;
|
|
4779
4779
|
const marginDev = cache5.marginCssPx * cache5.dpr;
|
|
4780
|
-
const
|
|
4781
|
-
const
|
|
4782
|
-
const destX =
|
|
4783
|
-
const destY =
|
|
4780
|
+
const rawDestX = (cache5.camX - view.camX) * view.camZ * cache5.dpr + marginDev * (1 - ratio);
|
|
4781
|
+
const rawDestY = (cache5.camY - view.camY) * view.camZ * cache5.dpr + marginDev * (1 - ratio);
|
|
4782
|
+
const destX = Math.round(rawDestX);
|
|
4783
|
+
const destY = Math.round(rawDestY);
|
|
4784
|
+
const destW = Math.round(rawDestX + cacheW * ratio) - destX;
|
|
4785
|
+
const destH = Math.round(rawDestY + cacheH * ratio) - destY;
|
|
4784
4786
|
const dest = { x: destX, y: destY, w: destW, h: destH };
|
|
4785
4787
|
const strips = {
|
|
4786
4788
|
top: { x: 0, y: 0, w: cacheW, h: Math.max(0, destY) },
|
|
@@ -5228,7 +5230,7 @@ var createRenderer = (opts) => {
|
|
|
5228
5230
|
staticSurface.ctx.drawImage(cache5.canvas, srcX, srcY, srcW, srcH, 0, 0, w, h);
|
|
5229
5231
|
};
|
|
5230
5232
|
const SCALED_BLIT_MAX_RATIO = 4;
|
|
5231
|
-
const SCALED_EXTEND_MIN_RATIO = 0.
|
|
5233
|
+
const SCALED_EXTEND_MIN_RATIO = 0.8;
|
|
5232
5234
|
const paintStatic = () => {
|
|
5233
5235
|
const camera = store.getCamera();
|
|
5234
5236
|
if (!cacheStale && camera.z === cacheCamZ) {
|