Skip to content

Releases: straker/kontra

v4.0.0

11 Aug 04:34
Compare
Choose a tag to compare

Release Notes

  • refactor: reduced file size even more and removed a few public properties
  • refactor: upgrade to es6 syntax

Deprecations

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

Sprite

  • kontra.sprite.currentAnimation

SpriteSheet

  • kontra.spriteSheet.framesPerRow

3.3.0

15 Jul 01:57
Compare
Choose a tag to compare

feat(animation): Add option to play animation just once using animation.loop.

3.2.0

10 Jul 07:28
Compare
Choose a tag to compare

feat(pointer): add pointer events

3.1.0

22 Dec 05:11
Compare
Choose a tag to compare

feat(*): add DEBUG and VISUAL_DEBUG to gulp script to reduce file size from distribution code.

3.0.0

12 Aug 09:44
Compare
Choose a tag to compare

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

2.1.1

14 Aug 08:03
Compare
Choose a tag to compare

docs(buildTask): add qLite to build script list

2.1.0

23 Apr 07:19
Compare
Choose a tag to compare

feat(gameLoop): auto clear the canvas every render, add option to disable
feat(spriteSheet): add clone function to allow using the same sprite sheet for multiple sprites
feat(tileEngine): make getRow and getCol functions public, allow functions that take a position to also use row and col
refactor(core,keyboard,quadtree,spriteSheet,tileEngine): remove kontra.isArray for Array.isArray
refactor(pool,quadtree,sprite,tileEngine): remove _this references only used as a way to reduce minified byte size
refactor(sprite): copy properties to sprite before setting values (instead of after)
refactor(examples): remove manual clearing of the canvas

2.0.3

02 Oct 07:34
Compare
Choose a tag to compare

fix(bower.json): fix to make valid json

2.0.2

28 Sep 05:58
Compare
Choose a tag to compare

test(tileEngine): add tests for rendering the tile engine
fix(tileEngine): fix bug in flattening a 2d array of layer data to allow empty tiles or rows
fix(tileEngine): prevent sxMax and syMax from being negative

2.0.1

27 Sep 05:06
Compare
Choose a tag to compare

docs(examples): add lots of small examples for working with sprites
fix(keyboard): remove preventDefault from bind function and instead rely on the developer to preventDefault or not