mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
deprecated Matter.RenderPixi
This commit is contained in:
parent
72f90b99dd
commit
a6b97cd4e3
2 changed files with 15 additions and 2 deletions
|
@ -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`.
|
* 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`.
|
* One may also develop a custom renderer module based on `Matter.Render` and pass an instance of it to `Engine.create` via `options.render`.
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
* See also `Matter.Render` for a canvas based renderer.
|
* See also `Matter.Render` for a canvas based renderer.
|
||||||
*
|
*
|
||||||
* @class RenderPixi
|
* @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 = {};
|
var RenderPixi = {};
|
||||||
|
@ -31,8 +33,11 @@ var Common = require('../core/Common');
|
||||||
* @method create
|
* @method create
|
||||||
* @param {object} options
|
* @param {object} options
|
||||||
* @return {RenderPixi} A new renderer
|
* @return {RenderPixi} A new renderer
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
RenderPixi.create = function(options) {
|
RenderPixi.create = function(options) {
|
||||||
|
Common.log('RenderPixi.create: Matter.RenderPixi is deprecated (see docs)', 'warn');
|
||||||
|
|
||||||
var defaults = {
|
var defaults = {
|
||||||
controller: RenderPixi,
|
controller: RenderPixi,
|
||||||
engine: null,
|
engine: null,
|
||||||
|
@ -119,6 +124,7 @@ var Common = require('../core/Common');
|
||||||
* Continuously updates the render canvas on the `requestAnimationFrame` event.
|
* Continuously updates the render canvas on the `requestAnimationFrame` event.
|
||||||
* @method run
|
* @method run
|
||||||
* @param {render} render
|
* @param {render} render
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
RenderPixi.run = function(render) {
|
RenderPixi.run = function(render) {
|
||||||
(function loop(time){
|
(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.
|
* Ends execution of `Render.run` on the given `render`, by canceling the animation frame request event loop.
|
||||||
* @method stop
|
* @method stop
|
||||||
* @param {render} render
|
* @param {render} render
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
RenderPixi.stop = function(render) {
|
RenderPixi.stop = function(render) {
|
||||||
_cancelAnimationFrame(render.frameRequestId);
|
_cancelAnimationFrame(render.frameRequestId);
|
||||||
|
@ -140,6 +147,7 @@ var Common = require('../core/Common');
|
||||||
* Clears the scene graph
|
* Clears the scene graph
|
||||||
* @method clear
|
* @method clear
|
||||||
* @param {RenderPixi} render
|
* @param {RenderPixi} render
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
RenderPixi.clear = function(render) {
|
RenderPixi.clear = function(render) {
|
||||||
var container = render.container,
|
var container = render.container,
|
||||||
|
@ -183,6 +191,7 @@ var Common = require('../core/Common');
|
||||||
* @method setBackground
|
* @method setBackground
|
||||||
* @param {RenderPixi} render
|
* @param {RenderPixi} render
|
||||||
* @param {string} background
|
* @param {string} background
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
RenderPixi.setBackground = function(render, background) {
|
RenderPixi.setBackground = function(render, background) {
|
||||||
if (render.currentBackground !== background) {
|
if (render.currentBackground !== background) {
|
||||||
|
@ -217,6 +226,7 @@ var Common = require('../core/Common');
|
||||||
* Description
|
* Description
|
||||||
* @method world
|
* @method world
|
||||||
* @param {engine} engine
|
* @param {engine} engine
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
RenderPixi.world = function(render) {
|
RenderPixi.world = function(render) {
|
||||||
var engine = render.engine,
|
var engine = render.engine,
|
||||||
|
@ -288,6 +298,7 @@ var Common = require('../core/Common');
|
||||||
* @method constraint
|
* @method constraint
|
||||||
* @param {engine} engine
|
* @param {engine} engine
|
||||||
* @param {constraint} constraint
|
* @param {constraint} constraint
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
RenderPixi.constraint = function(render, constraint) {
|
RenderPixi.constraint = function(render, constraint) {
|
||||||
var engine = render.engine,
|
var engine = render.engine,
|
||||||
|
@ -339,6 +350,7 @@ var Common = require('../core/Common');
|
||||||
* @method body
|
* @method body
|
||||||
* @param {engine} engine
|
* @param {engine} engine
|
||||||
* @param {body} body
|
* @param {body} body
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
RenderPixi.body = function(render, body) {
|
RenderPixi.body = function(render, body) {
|
||||||
var engine = render.engine,
|
var engine = render.engine,
|
||||||
|
@ -395,6 +407,7 @@ var Common = require('../core/Common');
|
||||||
* @param {RenderPixi} render
|
* @param {RenderPixi} render
|
||||||
* @param {body} body
|
* @param {body} body
|
||||||
* @return {PIXI.Sprite} sprite
|
* @return {PIXI.Sprite} sprite
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
var _createBodySprite = function(render, body) {
|
var _createBodySprite = function(render, body) {
|
||||||
var bodyRender = body.render,
|
var bodyRender = body.render,
|
||||||
|
@ -415,6 +428,7 @@ var Common = require('../core/Common');
|
||||||
* @param {RenderPixi} render
|
* @param {RenderPixi} render
|
||||||
* @param {body} body
|
* @param {body} body
|
||||||
* @return {PIXI.Graphics} graphics
|
* @return {PIXI.Graphics} graphics
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
var _createBodyPrimitive = function(render, body) {
|
var _createBodyPrimitive = function(render, body) {
|
||||||
var bodyRender = body.render,
|
var bodyRender = body.render,
|
||||||
|
@ -479,6 +493,7 @@ var Common = require('../core/Common');
|
||||||
* @param {RenderPixi} render
|
* @param {RenderPixi} render
|
||||||
* @param {string} imagePath
|
* @param {string} imagePath
|
||||||
* @return {PIXI.Texture} texture
|
* @return {PIXI.Texture} texture
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
var _getTexture = function(render, imagePath) {
|
var _getTexture = function(render, imagePath) {
|
||||||
var texture = render.textures[imagePath];
|
var texture = render.textures[imagePath];
|
||||||
|
|
Loading…
Reference in a new issue