[Open Source] Image zoom in and out module

I created a module that allow you to zoom in and out on image button and image label. Here is a preview:


Here is the game where you can try it out(it’s open source)

Here is the documentation:

<class> image_zoomer.set_zoom(<GuiObject> Image)

Example:

image = image_zoomer:set_zoom(script.Parent)

create a class where you it apply the zoom effect bellow(it already have default parameter)

image:set_duration(<number> 0.1)

apply tween time(


)

image:set_easing_style(<EasingStyle> Enum.EasiingStyle.Quint)

Set a custom easing style.

Here is a example script:

local replicated_storage = game.ReplicatedStorage
local image_zoomer = require(replicated_storage.ImageZoomer)
object = image_zoomer.set_zoom(script.Parent)
object:set_easing_style(Enum.EasingStyle.Quint)

Here is a example place(the place is open source so you can understand how to use the module a little better)

Here is the module:
https://gist.github.com/ViniDalvino/7bd270f0519fa6535b531f7228fe9b39

I would like to end this thread that I would like to have your feedback on how I can improve my code. Thanjk you.

How is the library easy to use in a scale of 20

  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

0 voters

14 Likes

Bookmarking this, may come in handy later.

Does the image zoom in when you scroll with the mouse?

Yes the image zoom in when you scroll forward with the mosue.

1 Like

Rather than enforcing a zoom increment, let them edit the increment by changing a variable, or something.

and, UIScale might be better in this case.

The goal was to have a fancy animation when you zoom in/out.