diff --git a/src/deprecation.js b/src/deprecation.js index 696b77b..ec346af 100644 --- a/src/deprecation.js +++ b/src/deprecation.js @@ -1,12 +1,8 @@ var core = require('./core'), extras = require('./extras'), + mesh = require('./mesh'), text = require('./text'); -core.Stage = function () -{ - window.console.warn('You do not need to use a PIXI Stage any more, you can simply render any container.'); - return new core.Container(); -}; core.SpriteBatch = function () { @@ -17,15 +13,33 @@ window.console.warn('The loader system was overhauled in pixi v3, please see the new PIXI.Loader class.'); }; -core.DisplayObjectContainer = function () { - window.console.warn('DisplayObjectContainer has been shortened to Container, please use Container from now on'); - return new core.Container(); -}; +Object.defineProperties(core, { -core.Strip = function (texture) { - window.console.warn('The Strip class has been renamed to Mesh, please use Mesh from now on'); - return new extras.mesh.Mesh(texture); -}; + Stage: { + get: function () + { + window.console.warn('You do not need to use a PIXI Stage any more, you can simply render any container.'); + return new core.Container(); + } + }, + + DisplayObjectContainer: { + get: function () + { + window.console.warn('DisplayObjectContainer has been shortened to Container, please use Container from now on'); + return new core.Container(); + } + }, + + Strip: { + get: function () + { + window.console.warn('The Strip class has been renamed to Mesh, please use Mesh from now on'); + return new mesh.Mesh(texture); + } + } + +}); core.Sprite.prototype.setTexture = function (texture) {