@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.js CHANGED
@@ -4775,10 +4775,12 @@ var cacheReuseLayout = (cache5, view) => {
4775
4775
  const cacheW = cache5.widthDevicePx;
4776
4776
  const cacheH = cache5.heightDevicePx;
4777
4777
  const marginDev = cache5.marginCssPx * cache5.dpr;
4778
- const destW = cacheW * ratio;
4779
- const destH = cacheH * ratio;
4780
- const destX = (cache5.camX - view.camX) * view.camZ * cache5.dpr + marginDev * (1 - ratio);
4781
- const destY = (cache5.camY - view.camY) * view.camZ * cache5.dpr + marginDev * (1 - ratio);
4778
+ const rawDestX = (cache5.camX - view.camX) * view.camZ * cache5.dpr + marginDev * (1 - ratio);
4779
+ const rawDestY = (cache5.camY - view.camY) * view.camZ * cache5.dpr + marginDev * (1 - ratio);
4780
+ const destX = Math.round(rawDestX);
4781
+ const destY = Math.round(rawDestY);
4782
+ const destW = Math.round(rawDestX + cacheW * ratio) - destX;
4783
+ const destH = Math.round(rawDestY + cacheH * ratio) - destY;
4782
4784
  const dest = { x: destX, y: destY, w: destW, h: destH };
4783
4785
  const strips = {
4784
4786
  top: { x: 0, y: 0, w: cacheW, h: Math.max(0, destY) },
@@ -5226,7 +5228,7 @@ var createRenderer = (opts) => {
5226
5228
  staticSurface.ctx.drawImage(cache5.canvas, srcX, srcY, srcW, srcH, 0, 0, w, h);
5227
5229
  };
5228
5230
  const SCALED_BLIT_MAX_RATIO = 4;
5229
- const SCALED_EXTEND_MIN_RATIO = 0.5;
5231
+ const SCALED_EXTEND_MIN_RATIO = 0.8;
5230
5232
  const paintStatic = () => {
5231
5233
  const camera = store.getCamera();
5232
5234
  if (!cacheStale && camera.z === cacheCamZ) {