- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
import { TextureAtlas } from "./../video/texture/atlas.js";
import Renderer from "./../video/renderer.js";
import { Draggable } from "./../renderable/draggable.js";
import { DropTarget } from "./../renderable/dragndrop.js";
import UISpriteElement from "./../renderable/ui/uispriteelement.js";
import { warning } from "./console.js";
import CanvasRenderTarget from "../video/rendertarget/canvasrendertarget.js";
import CanvasRenderer from "../video/canvas/canvas_renderer.js";
import WebGLRenderer from "../video/webgl/webgl_renderer.js";
/*
* placeholder for all deprecated classes and corresponding alias for backward compatibility
*/
/**
* Alias of {@link TextureAtlas}
* @public
* @name Texture
* @class
* @memberof Renderer#
* @deprecated since 10.4.0
* @see TextureAtlas
*/
Object.defineProperty(Renderer.prototype, "Texture", {
/**
* @ignore
*/
get : function () {
warning("me.video.renderer.Texture", "me.TextureAtlas", "10.4.0");
return TextureAtlas;
}
});
/**
* @classdesc
* Used to make a game entity draggable
* @augments Entity
* @deprecated since 10.5.0
* @see Draggable
*/
export class DraggableEntity extends Draggable {
/**
* @param {number} x - the x coordinates of the draggable object
* @param {number} y - the y coordinates of the draggable object
* @param {object} settings - Entity properties (see {@link Entity})
*/
constructor(x, y, settings) {
warning("DraggableEntity", "Draggable", "10.5.0");
super(x, y, settings.width, settings.height);
}
}
/**
* @classdesc
* Used to make a game entity a droptarget
* @augments Entity
* @deprecated since 10.5.0
* @see DropTarget
*/
export class DroptargetEntity extends DropTarget {
/**
* @param {number} x - the x coordinates of the draggable object
* @param {number} y - the y coordinates of the draggable object
* @param {object} settings - Entity properties (see {@link Entity})
*/
constructor(x, y, settings) {
warning("DroptargetEntity", "DropTarget", "10.5.0");
super(x, y, settings.width, settings.height);
}
}
/**
* return a reference to the screen canvas
* @name getScreenCanvas
* @memberof Renderer
* @returns {HTMLCanvasElement}
* @deprecated since 13.1.0
* @see getCanvas();
*/
Renderer.prototype.getScreenCanvas = function() {
warning("getScreenCanvas", "getCanvas", "13.1.0");
return this.getCanvas();
};
/**
* return a reference to the screen canvas corresponding 2d Context<br>
* (will return buffered context if double buffering is enabled, or a reference to the Screen Context)
* @name getScreenContext
* @memberof Renderer
* @returns {CanvasRenderingContext2D}
* @deprecated since 13.1.0
* @see getContext();
*/
Renderer.prototype.getScreenContext = function() {
warning("getScreenContext", "getContext", "13.1.0");
return this.getContext();
};
/**
* @classdesc
* A very basic object to manage GUI elements
* @augments Sprite
* @deprecated since 14.0.0
* @see UISpriteElement
*/
export class GUI_Object extends UISpriteElement {
/**
* @param {number} x - the x coordinate of the GUI Object
* @param {number} y - the y coordinate of the GUI Object
* @param {object} settings - See {@link Sprite}
*/
constructor(x, y, settings) {
warning("GUI_Object", "UISpriteElement or UITextButton", "14.0.0");
super(x, y, settings);
}
}
/**
* return the width of the system Canvas
* @public
* @name getWidth
* @class
* @memberof Renderer#
* @deprecated since 15.12.0
* @see width
*/
Renderer.prototype.getWidth = function() {
warning("getWidth", "width", "15.12.0");
return this.width;
};
/**
* return the height of the system Canvas
* @public
* @name getHeight
* @memberof Renderer#
* @deprecated since 15.12.0
* @see height
*/
Renderer.prototype.getHeight = function() {
warning("getHeight", "height", "15.12.0");
return this.height;
};
/**
* @classdesc
* @deprecated since 17.1.0
* @see CanvasRenderTarget
*/
export class CanvasTexture extends CanvasRenderTarget {
/**
* @param {number} width - the desired width of the canvas
* @param {number} height - the desired height of the canvas
* @param {object} attributes - The attributes to create both the canvas and context
* @param {boolean} [attributes.context="2d"] - the context type to be created ("2d", "webgl", "webgl2")
* @param {boolean} [attributes.offscreenCanvas=false] - will create an offscreenCanvas if true instead of a standard canvas
* @param {boolean} [attributes.willReadFrequently=false] - Indicates whether or not a lot of read-back operations are planned
* @param {boolean} [attributes.antiAlias=false] - Whether to enable anti-aliasing, use false (default) for a pixelated effect.
*/
constructor(width, height, attributes) {
warning("CanvasTexture", "CanvasRenderTarget", "17.1.0");
super(width, height, attributes);
}
}
/**
* return the height of the system Canvas
* @public
* @name setLineWidth
* @memberof CanvasRenderer#
* @deprecated since 17.3.0
* @see lineWidth
*/
CanvasRenderer.prototype.setLineWidth = function(width) {
warning("setLineWidth", "lineWidth", "17.3.0");
this.lineWidth = width;
};
/**
* return the height of the system Canvas
* @public
* @name setLineWidth
* @memberof WebGLRenderer#
* @deprecated since 17.3.0
* @see lineWidth
*/
WebGLRenderer.prototype.setLineWidth = function(width) {
warning("setLineWidth", "lineWidth", "17.3.0");
this.lineWidth = width;
};