# 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. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gimhook.coder-gage.dev/gimforge-mods/better-zoom.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
