ugcinc-render 1.8.69 → 1.8.70
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 +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2925,8 +2925,8 @@ function DebugOverlay({
|
|
|
2925
2925
|
const { x: vpX, y: vpY } = viewportPos;
|
|
2926
2926
|
const canvasX = (vpX + scrollX) / zoomScale;
|
|
2927
2927
|
const canvasY = (vpY + scrollY) / zoomScale;
|
|
2928
|
-
const
|
|
2929
|
-
const newZoom = Math.max(100, Math.min(1e4, zoom
|
|
2928
|
+
const zoomFactor = e.deltaY > 0 ? 0.85 : 1.15;
|
|
2929
|
+
const newZoom = Math.max(100, Math.min(1e4, Math.round(zoom * zoomFactor)));
|
|
2930
2930
|
const newZoomScale = newZoom / 100;
|
|
2931
2931
|
const newScrollX = Math.max(0, canvasX * newZoomScale - vpX);
|
|
2932
2932
|
const newScrollY = Math.max(0, canvasY * newZoomScale - vpY);
|
package/dist/index.mjs
CHANGED
|
@@ -2033,8 +2033,8 @@ function DebugOverlay({
|
|
|
2033
2033
|
const { x: vpX, y: vpY } = viewportPos;
|
|
2034
2034
|
const canvasX = (vpX + scrollX) / zoomScale;
|
|
2035
2035
|
const canvasY = (vpY + scrollY) / zoomScale;
|
|
2036
|
-
const
|
|
2037
|
-
const newZoom = Math.max(100, Math.min(1e4, zoom
|
|
2036
|
+
const zoomFactor = e.deltaY > 0 ? 0.85 : 1.15;
|
|
2037
|
+
const newZoom = Math.max(100, Math.min(1e4, Math.round(zoom * zoomFactor)));
|
|
2038
2038
|
const newZoomScale = newZoom / 100;
|
|
2039
2039
|
const newScrollX = Math.max(0, canvasX * newZoomScale - vpX);
|
|
2040
2040
|
const newScrollY = Math.max(0, canvasY * newZoomScale - vpY);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc-render",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.70",
|
|
4
4
|
"description": "Unified rendering package for UGC Inc - shared types, components, and compositions for pixel-perfect client/server rendering",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|