Skip to content

v.2.1.1

Compare
Choose a tag to compare
@Cazka Cazka released this 26 Feb 22:34
· 63 commits to main since this release
de16213

Added:

  • Support for retina displays or any displays with a window.devicePixelRatio != 1.
  • new method arenaScaling.screenToCanvasUnits() scale screen pixels to canvas pixels
  • new method arenaScaling.canvasToScreenUnits() unscale canvas pixels to screen pixels
  • new method arenaScaling.screenToCanvas() scale screen coordinates to canvas coordinates
  • new method arenaScaling.canvasToScreen() unscale canvas coordinates to screen coordinates

Breaking Changes:

  • arenaScaling.toScreenPos() got renamed to arenaScaling.toCanvasPos()
  • arenaScaling.toScreenUnits() got renamed to arenaScaling.toCanvasUnits()