auto: 2026-08-29 16:45 (EOMSANGDON-HOME)

This commit is contained in:
2026-08-29 16:45:54 +09:00
parent 936def3755
commit 7fa005dce1
2 changed files with 23 additions and 4 deletions
@@ -107,13 +107,14 @@ export class ScreenCanvasDrawController implements DrawController {
* This function takes the deltaY from the mouse wheel event and zooms the screen in or out
* The location of the mouse in world space is preserved
* @param deltaY
* @param strength 한 번에 얼마나 확대할지(휠 한 칸 = 1). 트랙패드의 잔 델타용.
*/
public zoomScreen(deltaY: number) {
public zoomScreen(deltaY: number, strength = 1) {
const worldMouseLocationBeforeZoom = this.getWorldMouseLocation();
const oldScreenScale = this.getScreenScale();
const newScreenScale =
oldScreenScale * (1 - MOUSE_ZOOM_MULTIPLIER * (deltaY / Math.abs(deltaY)));
oldScreenScale * (1 - MOUSE_ZOOM_MULTIPLIER * strength * (deltaY / Math.abs(deltaY)));
this.setScreenScale(newScreenScale);
// now get the location of the cursor in world space again