From a6b97cd4e313611fac852714abf22cca32fda03f Mon Sep 17 00:00:00 2001 From: liabru Date: Tue, 26 Apr 2016 21:17:00 +0100 Subject: [PATCH] deprecated Matter.RenderPixi --- src/core/Engine.js | 2 -- src/render/RenderPixi.js | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/core/Engine.js b/src/core/Engine.js index e86f48d5..cad2911a 100644 --- a/src/core/Engine.js +++ b/src/core/Engine.js @@ -463,8 +463,6 @@ var Body = require('../body/Body'); */ /** - * __DEPRECATED__ see Demo.js for an example of creating a renderer. - * * An instance of a `Render` controller. The default value is a `Matter.Render` instance created by `Engine.create`. * One may also develop a custom renderer module based on `Matter.Render` and pass an instance of it to `Engine.create` via `options.render`. * diff --git a/src/render/RenderPixi.js b/src/render/RenderPixi.js index 499c8dd4..4ba104d0 100644 --- a/src/render/RenderPixi.js +++ b/src/render/RenderPixi.js @@ -3,6 +3,8 @@ * See also `Matter.Render` for a canvas based renderer. * * @class RenderPixi +* @deprecated the `Matter.RenderPixi` module will soon be removed from the Matter.js core. +* It will likely be moved to its own repository (but maintenance will be limited). */ var RenderPixi = {}; @@ -31,8 +33,11 @@ var Common = require('../core/Common'); * @method create * @param {object} options * @return {RenderPixi} A new renderer + * @deprecated */ RenderPixi.create = function(options) { + Common.log('RenderPixi.create: Matter.RenderPixi is deprecated (see docs)', 'warn'); + var defaults = { controller: RenderPixi, engine: null, @@ -119,6 +124,7 @@ var Common = require('../core/Common'); * Continuously updates the render canvas on the `requestAnimationFrame` event. * @method run * @param {render} render + * @deprecated */ RenderPixi.run = function(render) { (function loop(time){ @@ -131,6 +137,7 @@ var Common = require('../core/Common'); * Ends execution of `Render.run` on the given `render`, by canceling the animation frame request event loop. * @method stop * @param {render} render + * @deprecated */ RenderPixi.stop = function(render) { _cancelAnimationFrame(render.frameRequestId); @@ -140,6 +147,7 @@ var Common = require('../core/Common'); * Clears the scene graph * @method clear * @param {RenderPixi} render + * @deprecated */ RenderPixi.clear = function(render) { var container = render.container, @@ -183,6 +191,7 @@ var Common = require('../core/Common'); * @method setBackground * @param {RenderPixi} render * @param {string} background + * @deprecated */ RenderPixi.setBackground = function(render, background) { if (render.currentBackground !== background) { @@ -217,6 +226,7 @@ var Common = require('../core/Common'); * Description * @method world * @param {engine} engine + * @deprecated */ RenderPixi.world = function(render) { var engine = render.engine, @@ -288,6 +298,7 @@ var Common = require('../core/Common'); * @method constraint * @param {engine} engine * @param {constraint} constraint + * @deprecated */ RenderPixi.constraint = function(render, constraint) { var engine = render.engine, @@ -339,6 +350,7 @@ var Common = require('../core/Common'); * @method body * @param {engine} engine * @param {body} body + * @deprecated */ RenderPixi.body = function(render, body) { var engine = render.engine, @@ -395,6 +407,7 @@ var Common = require('../core/Common'); * @param {RenderPixi} render * @param {body} body * @return {PIXI.Sprite} sprite + * @deprecated */ var _createBodySprite = function(render, body) { var bodyRender = body.render, @@ -415,6 +428,7 @@ var Common = require('../core/Common'); * @param {RenderPixi} render * @param {body} body * @return {PIXI.Graphics} graphics + * @deprecated */ var _createBodyPrimitive = function(render, body) { var bodyRender = body.render, @@ -479,6 +493,7 @@ var Common = require('../core/Common'); * @param {RenderPixi} render * @param {string} imagePath * @return {PIXI.Texture} texture + * @deprecated */ var _getTexture = function(render, imagePath) { var texture = render.textures[imagePath];