Skip to content

v9.0.0

Latest
Compare
Choose a tag to compare
@straker straker released this 27 Jan 03:56
· 31 commits to main since this release

The angleToTarget helper class was returning the wrong angle due to an incorrect use of sin and cos, resulting in adding a quarter rotation. This has been fixed which causes a breaking change from the value that was returned before (no longer adds a quarter rotation).

Breaking Changes

  • helpers: return correct angle from angleToTarget

Features

  • vector: add direction function
  • vector: add set function and allow initialize with object
  • text: add text stroke
  • gamepad: pass buttonName as extra param to gamepad callback
  • animation: add start and stop functions ,isStopped property

Fixes

  • tileEngine: Add TileEngineClass to exports
  • gameObject: clamp opacity between 0 and 1
  • keyboard: allow keyPressed to accept array of keys
  • vector: handle normalizing zero vector
  • text: correctly handle string with both newlines and a fixed width
  • allow objects to be created before init
  • pointer: correctly track objects when scene/tileEngine camera is moved
  • tileEngine: prevent negative sx/sy when map size is smaller than canvas size