> For the complete documentation index, see [llms.txt](https://gimhook.coder-gage.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gimhook.coder-gage.dev/gimforge-mods/better-zoom.md).

# Better Zoom

## Source Code (V1.0.1)

<details>

<summary><a href="https://cdn.discordapp.com/attachments/1119691275474567219/1119691276040810606/BetterZoom.js">BetterZoom.js</a> (Click Link to Download)</summary>

```javascript
// gimhook: {"name":"BetterZoom","description":"A mod that lets you zoom out a bit more than usual...use the scroll wheel to zoom!","version":"1.0.1","author":"Blackhole927","license":"MIT"}
(() => {
  // src/index.ts
  gimhook.addHook("join", () => {
    tZoom = 1
    cZoom = gimhook.graphics.camera.getZoom()


    setInterval(function x() {
        cZoom = tZoom - (tZoom-cZoom)/1.25
        gimhook.graphics.camera.setZoom(cZoom)
    }, 0.25)

    window.addEventListener("wheel", function(e) {
        var dir = Math.sign(e.deltaY);
        if (dir == 1) {
            if (tZoom > 0.1) {
                tZoom -= 0.1
            }
        } else {
            tZoom += 0.1
        }
    });

    console.log("BetterZoom Mod Loaded");
  });
})();
```

</details>

**NOTE:** Older versions of mods are currently not available on this site. However, you can view them in the `usable-mods` channel of our discord.

## How to Use It

After installing the mod, scroll up or down on your mouse or trackpad to zoom in and out. View the [customizability](#customizability) section to see how you can customize this mod.

## Customizability

{% tabs %}
{% tab title="Zoom Amount" %}
Change `0.1` to a bigger or smaller number to change how much you zoom in or out. However, do **NOT** change the `0.1` located at `if (tZoom > 0.1)` .
{% endtab %}
{% endtabs %}

## Changelog

| Version | Changes                                                                                             |
| ------- | --------------------------------------------------------------------------------------------------- |
| v1.0.0  | Added basic zoom with number keys `1`, `2`, `3`, and `4` .                                          |
| v1.0.1  | Added scroll wheel functionality to zoom in and out using your scroll wheel instead of number keys. |
