Skip to content

Commit

Permalink
these Constructors aren't in extras/ anymore, also make errors cleare…
Browse files Browse the repository at this point in the history
…r with throw()
  • Loading branch information
ippa committed Aug 17, 2014
1 parent e3a5f53 commit 1dc6374
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ var jaws = (function(jaws) {
/*
* Placeholders for constructors in extras-dir. We define the constructors here to be able to give ppl better error-msgs.
* When the correct from extras-dir is included, these will be overwritten.
*
*/
jaws.Parallax = function() { jaws.log.error("To use jaws.Parallax() you need to include src/extras/parallax.js") }
jaws.SpriteList = function() { jaws.log.error("To use SpriteList() you need to include src/extras/sprite_list.js") }
jaws.TileMap = function() { jaws.log.error("To use TileMap() you need to include src/extras/tile_map.js") }
jaws.PixelMap = function() { jaws.log.error("To use PixelMap() you need to include src/extras/pixel_map.js") }
jaws.QuadTree = function() { jaws.log.error("To use QuadTree() you need to include src/extras/quadtree.js") }
jaws.Audio = function() { jaws.log.error("To use jaws.Audio() you need to include src/extras/audio.js") }
//jaws.Parallax = function() { throw("To use jaws.Parallax() you need to include src/extras/parallax.js") }
//jaws.QuadTree = function() { throw("To use QuadTree() you need to include src/extras/quadtree.js") }
//jaws.PixelMap = function() { throw("To use PixelMap() you need to include src/extras/pixel_map.js") }
//jaws.TileMap = function() { throw("To use TileMap() you need to include src/extras/tile_map.js") }
jaws.SpriteList = function() { throw("To use SpriteList() you need to include src/extras/sprite_list.js") }
jaws.Audio = function() { throw("To use jaws.Audio() you need to include src/extras/audio.js") }

/**
* Returns or sets contents of title's innerHTML
Expand Down Expand Up @@ -709,3 +710,5 @@ var jaws = (function(jaws) {
return jaws;
})(jaws || {});

// Support CommonJS require()
if(typeof module !== "undefined" && ('exports' in module)) { module.exports = jaws }

0 comments on commit 1dc6374

Please sign in to comment.