Skip to content

3.0.0

Compare
Choose a tag to compare
@straker straker released this 12 Aug 09:44

Release Notes

  • docs: add github-pages doc directory
  • refactor: greatly reduce file size of all files and remove a lot of public properties and functions
  • refactor: changed examples to work with new code
  • feat(assets): add assets.js from straker/kontra-asset-loader
  • feat(spriteSheet): add margin property for images with margins between frames

Deprecations

In order to reduce the library to as small as possible, many features were removed. Most were unpublished public properties or functions that moved to private implementations to improve minification, but others were not.

Please note the following public properties and functions that have been removed.

Assets

Removed asset bundles and asset manifest from straker/kontra-asset-loader.

In 2.x, all Asset properties and functions were added to the Kontra object directly. This is no longer the case and now all Asset properties and functions have been put under their own namespace kontra.assets. As such, most of the names were changed to reflect the move.

  • kontra.canUse
  • kontra.assetPaths was removed and subproperties were renamed to kontra.assets.imagePath, kontra.assets.audiopath and kontra.assets.dataPath
  • kontra.audios was renamed kontra.assets.audio
  • kontra.getAssetExtension()
  • kontra.getAssetType()
  • kontra.getAssetName()
  • kontra.loadAssets() was renamed kontra.assets.load() and should be used instead of the load functions for images, audio, and data.
  • kontra.loadImage()
  • kontra.loadAudio()
  • kontra.loadData()
  • kontra.bundles
  • kontra.createBundle()
  • kontra.loadBundles()
  • kontra.loadManifest()

Core

  • kontra.logError()
  • kontra.noop()
  • kontra.isString()
  • kontra.isNumber()
  • kontra.isImage()
  • kontra.isCanvas()
  • kontra.game

Game loop

  • kontra.timestamp

Keyboard

  • The ability to bind to combination keys (ctrl+c, etc.) has been removed

Pool

  • kontra.pool.createProperties argument
  • kontra.pool.fill argument
  • kontra.pool.lastIndex
  • kontra.pool.inUse

Quadtree

  • kontra.quadtree.depth
  • kontra.quadtree.isBranchNode
  • kontra.quadtree.parentNode
  • kontra.quadtree.render()
  • kontra.quadtree.init()

Sprite

  • kontra.sprite.timeToLive was renamed kontra.sprite.ttl

Sprite sheet animation

  • kontra.animation.currentFrame
  • kontra.animation.stop()
  • kontra.animation.pause()
  • kontra.animation.play()
  • kontra.animation.init()

Spritesheet

  • kontra.spriteSheet.init()

Store

  • kontra.store.remove()
  • kontra.store.clear()

Tile engine

  • kontra.tileEngine.canvasWidth
  • kontra.tileEngine.canvasHeight

Vector