melonjs 9.1.0 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE → LICENSE.md} +0 -0
- package/README.md +93 -57
- package/dist/melonjs.js +10334 -11179
- package/dist/melonjs.min.js +4 -10
- package/dist/melonjs.module.d.ts +13206 -0
- package/dist/melonjs.module.js +9913 -10872
- package/package.json +19 -14
- package/src/audio/audio.js +477 -553
- package/src/camera/camera2d.js +67 -65
- package/src/entity/draggable.js +26 -35
- package/src/entity/droptarget.js +17 -14
- package/src/entity/entity.js +59 -79
- package/src/game.js +194 -204
- package/src/index.js +12 -30
- package/src/input/gamepad.js +8 -19
- package/src/input/keyboard.js +4 -4
- package/src/input/pointer.js +14 -12
- package/src/input/pointerevent.js +15 -13
- package/src/lang/deprecated.js +2 -887
- package/src/level/level.js +3 -3
- package/src/level/tiled/TMXGroup.js +7 -11
- package/src/level/tiled/TMXLayer.js +33 -32
- package/src/level/tiled/TMXTileMap.js +15 -19
- package/src/level/tiled/TMXTileset.js +5 -5
- package/src/level/tiled/TMXUtils.js +3 -3
- package/src/level/tiled/renderer/TMXRenderer.js +4 -0
- package/src/loader/loader.js +8 -23
- package/src/loader/loadingscreen.js +51 -60
- package/src/math/matrix3.js +1 -1
- package/src/particles/emitter.js +36 -39
- package/src/particles/particle.js +27 -12
- package/src/particles/particlecontainer.js +17 -16
- package/src/physics/body.js +80 -118
- package/src/physics/collision.js +5 -235
- package/src/physics/detector.js +235 -0
- package/src/physics/quadtree.js +14 -14
- package/src/physics/world.js +84 -18
- package/src/plugin/plugin.js +26 -24
- package/src/polyfill/console.js +9 -14
- package/src/renderable/GUI.js +48 -62
- package/src/renderable/collectable.js +11 -4
- package/src/renderable/colorlayer.js +28 -26
- package/src/renderable/container.js +120 -96
- package/src/renderable/imagelayer.js +94 -93
- package/src/renderable/renderable.js +164 -138
- package/src/renderable/sprite.js +42 -44
- package/src/renderable/trigger.js +24 -17
- package/src/shapes/ellipse.js +27 -27
- package/src/shapes/line.js +12 -8
- package/src/shapes/poly.js +77 -49
- package/src/shapes/rectangle.js +193 -268
- package/src/state/stage.js +23 -25
- package/src/state/state.js +35 -86
- package/src/system/device.js +233 -285
- package/src/system/event.js +485 -432
- package/src/system/pooling.js +61 -54
- package/src/system/save.js +17 -16
- package/src/system/timer.js +34 -38
- package/src/text/bitmaptext.js +44 -46
- package/src/text/text.js +39 -34
- package/src/tweens/easing.js +0 -2
- package/src/tweens/interpolation.js +3 -8
- package/src/tweens/tween.js +332 -351
- package/src/utils/function.js +6 -8
- package/src/utils/utils.js +34 -30
- package/src/video/canvas/canvas_renderer.js +13 -8
- package/src/video/renderer.js +8 -7
- package/src/video/texture.js +8 -8
- package/src/video/texture_cache.js +5 -5
- package/src/video/video.js +373 -403
- package/src/video/webgl/glshader.js +2 -2
- package/src/video/webgl/webgl_compositor.js +14 -8
- package/src/video/webgl/webgl_renderer.js +21 -19
- package/plugins/debug/debugPanel.js +0 -770
- package/plugins/debug/font/PressStart2P.fnt +0 -100
- package/plugins/debug/font/PressStart2P.ltr +0 -1
- package/plugins/debug/font/PressStart2P.png +0 -0
- package/plugins/debug/particleDebugPanel.js +0 -303
|
@@ -1,770 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* MelonJS Game Engine
|
|
3
|
-
* Copyright (C) 2011 - 2020 Olivier Biot
|
|
4
|
-
* http://www.melonjs.org
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
(function () {
|
|
8
|
-
|
|
9
|
-
// ensure that me.debug is defined
|
|
10
|
-
me.debug = me.debug || {};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @classdesc
|
|
14
|
-
* a simple debug panel plugin <br>
|
|
15
|
-
* <img src="images/debugPanel.png"/> <br>
|
|
16
|
-
* <b>usage : </b><br>
|
|
17
|
-
* • upon loading the debug panel, it will be automatically registered under me.plugins.debugPanel <br>
|
|
18
|
-
* • you can then press the default "s" key to show or hide the panel, or use me.plugins.debugPanel.show() and me.plugins.debugPanel.show(), or add #debug as a parameter to your URL e.g. http://myURL/index.html#debug <br>
|
|
19
|
-
* • default key can be configured using the following parameters in the url : e.g. http://myURL/index.html#debugToggleKey=d <br>
|
|
20
|
-
* <b>the debug panel provides the following information : </b><br>
|
|
21
|
-
* • amount of total objects currently active in the current stage <br>
|
|
22
|
-
* • amount of draws operation <br>
|
|
23
|
-
* • amount of body shape (for collision) <br>
|
|
24
|
-
* • amount of bounding box <br>
|
|
25
|
-
* • amount of sprites objects <br>
|
|
26
|
-
* • amount of objects currently inactive in the the object pool <br>
|
|
27
|
-
* • memory usage (Heap Memory information is only available under Chrome) <br>
|
|
28
|
-
* • frame update time (in ms) <br>
|
|
29
|
-
* • frame draw time (in ms) <br>
|
|
30
|
-
* • current fps rate vs target fps <br>
|
|
31
|
-
* additionally, using the checkbox in the panel it is also possible to display : <br>
|
|
32
|
-
* • the hitbox or bounding box for all objects <br>
|
|
33
|
-
* • current velocity vector <br>
|
|
34
|
-
* • quadtree spatial visualization <br>
|
|
35
|
-
* @class
|
|
36
|
-
* @hideconstructor
|
|
37
|
-
* @name DebugPanel
|
|
38
|
-
* @see me.plugins
|
|
39
|
-
* @public
|
|
40
|
-
* @extends me.plugin.Base
|
|
41
|
-
* @memberOf me
|
|
42
|
-
* @constructor
|
|
43
|
-
* @example
|
|
44
|
-
* // load the debugPanel in your index.html file
|
|
45
|
-
* <script type="text/javascript" src="plugins/debug/debugPanel.js"></script>
|
|
46
|
-
*/
|
|
47
|
-
me.DebugPanel = me.plugin.Base.extend({
|
|
48
|
-
/** @private */
|
|
49
|
-
init : function (debugToggle) {
|
|
50
|
-
// call the super constructor
|
|
51
|
-
this._super(me.plugin.Base, "init");
|
|
52
|
-
this.panel = new DebugPanel(debugToggle);
|
|
53
|
-
|
|
54
|
-
// if "#debug" is present in the URL
|
|
55
|
-
if (me.utils.getUriFragment().debug === true) {
|
|
56
|
-
this.show();
|
|
57
|
-
} // else keep it hidden
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* show the debug panel
|
|
62
|
-
* @public
|
|
63
|
-
* @function
|
|
64
|
-
* @memberOf me.DebugPanel
|
|
65
|
-
*/
|
|
66
|
-
show : function () {
|
|
67
|
-
this.panel.show();
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* hide the debug panel
|
|
72
|
-
* @public
|
|
73
|
-
* @function
|
|
74
|
-
* @memberOf me.DebugPanel
|
|
75
|
-
*/
|
|
76
|
-
hide : function () {
|
|
77
|
-
this.panel.hide();
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* toggle the debug panel visibility state
|
|
82
|
-
* @public
|
|
83
|
-
* @function
|
|
84
|
-
* @memberOf me.DebugPanel
|
|
85
|
-
*/
|
|
86
|
-
toggle : function () {
|
|
87
|
-
if (this.panel.visible) {
|
|
88
|
-
this.panel.hide();
|
|
89
|
-
} else {
|
|
90
|
-
this.panel.show();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
// PRIVATE components
|
|
98
|
-
|
|
99
|
-
var DEBUG_HEIGHT = 50;
|
|
100
|
-
|
|
101
|
-
var Counters = function(name) {
|
|
102
|
-
this.stats = [];
|
|
103
|
-
this.reset(this.stats);
|
|
104
|
-
}
|
|
105
|
-
Counters.prototype.reset = function(stats) {
|
|
106
|
-
var self = this;
|
|
107
|
-
(stats || Object.keys(this.stats)).forEach(function (stat) {
|
|
108
|
-
self.stats[stat] = 0;
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
Counters.prototype.inc = function(stat, value) {
|
|
112
|
-
this.stats[stat] += (value || 1);
|
|
113
|
-
}
|
|
114
|
-
Counters.prototype.get = function(stat) {
|
|
115
|
-
return this.stats[stat] || 0;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// embedded bitmap font data
|
|
119
|
-
var fontDataSource =
|
|
120
|
-
"info face=\"PressStart2P\" size=10 bold=0 italic=0 charset= unicode= stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=0,0 outline=0\n" +
|
|
121
|
-
"common lineHeight=10 base=10 scaleW=128 scaleH=128 pages=1 packed=0\n" +
|
|
122
|
-
"page id=0 file=\"PressStart2P.png\"\n" +
|
|
123
|
-
"chars count=95\n" +
|
|
124
|
-
"char id=32 x=1 y=1 width=0 height=0 xoffset=0 yoffset=10 xadvance=10 page=0 chnl=15\n" +
|
|
125
|
-
"char id=33 x=1 y=2 width=5 height=10 xoffset=3 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
126
|
-
"char id=34 x=1 y=13 width=8 height=5 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
127
|
-
"char id=35 x=7 y=1 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
128
|
-
"char id=36 x=1 y=19 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
129
|
-
"char id=37 x=1 y=30 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
130
|
-
"char id=38 x=1 y=41 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
131
|
-
"char id=39 x=10 y=12 width=4 height=5 xoffset=3 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
132
|
-
"char id=40 x=1 y=52 width=6 height=10 xoffset=3 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
133
|
-
"char id=41 x=1 y=63 width=6 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
134
|
-
"char id=42 x=1 y=74 width=10 height=8 xoffset=0 yoffset=1 xadvance=10 page=0 chnl=15\n" +
|
|
135
|
-
"char id=43 x=8 y=52 width=9 height=8 xoffset=1 yoffset=1 xadvance=10 page=0 chnl=15\n" +
|
|
136
|
-
"char id=44 x=8 y=61 width=5 height=5 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=15\n" +
|
|
137
|
-
"char id=45 x=8 y=67 width=9 height=2 xoffset=1 yoffset=4 xadvance=10 page=0 chnl=15\n" +
|
|
138
|
-
"char id=46 x=14 y=61 width=4 height=4 xoffset=3 yoffset=6 xadvance=10 page=0 chnl=15\n" +
|
|
139
|
-
"char id=47 x=12 y=18 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
140
|
-
"char id=48 x=18 y=1 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
141
|
-
"char id=49 x=12 y=29 width=9 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
142
|
-
"char id=50 x=12 y=40 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
143
|
-
"char id=51 x=22 y=29 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
144
|
-
"char id=52 x=23 y=12 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
145
|
-
"char id=53 x=29 y=1 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
146
|
-
"char id=54 x=1 y=83 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
147
|
-
"char id=55 x=1 y=94 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
148
|
-
"char id=56 x=1 y=105 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
149
|
-
"char id=57 x=1 y=116 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
150
|
-
"char id=58 x=18 y=51 width=4 height=8 xoffset=3 yoffset=1 xadvance=10 page=0 chnl=15\n" +
|
|
151
|
-
"char id=59 x=12 y=70 width=5 height=9 xoffset=1 yoffset=1 xadvance=10 page=0 chnl=15\n" +
|
|
152
|
-
"char id=60 x=12 y=80 width=8 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
153
|
-
"char id=61 x=23 y=23 width=10 height=5 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
154
|
-
"char id=62 x=18 y=66 width=8 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
155
|
-
"char id=63 x=23 y=40 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
156
|
-
"char id=64 x=33 y=29 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
157
|
-
"char id=65 x=23 y=51 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
158
|
-
"char id=66 x=34 y=12 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
159
|
-
"char id=67 x=40 y=1 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
160
|
-
"char id=68 x=12 y=91 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
161
|
-
"char id=69 x=21 y=77 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
162
|
-
"char id=70 x=27 y=62 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
163
|
-
"char id=71 x=34 y=40 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
164
|
-
"char id=72 x=34 y=51 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
165
|
-
"char id=73 x=44 y=23 width=9 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
166
|
-
"char id=74 x=45 y=12 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
167
|
-
"char id=75 x=51 y=1 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
168
|
-
"char id=76 x=12 y=102 width=9 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
169
|
-
"char id=77 x=12 y=113 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
170
|
-
"char id=78 x=22 y=102 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
171
|
-
"char id=79 x=23 y=88 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
172
|
-
"char id=80 x=32 y=73 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
173
|
-
"char id=81 x=38 y=62 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
174
|
-
"char id=82 x=23 y=113 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
175
|
-
"char id=83 x=33 y=99 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
176
|
-
"char id=84 x=34 y=84 width=9 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
177
|
-
"char id=85 x=43 y=73 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
178
|
-
"char id=86 x=34 y=110 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
179
|
-
"char id=87 x=44 y=84 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
180
|
-
"char id=88 x=44 y=95 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
181
|
-
"char id=89 x=45 y=106 width=9 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
182
|
-
"char id=90 x=45 y=117 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
183
|
-
"char id=91 x=45 y=34 width=6 height=10 xoffset=3 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
184
|
-
"char id=92 x=45 y=45 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
185
|
-
"char id=93 x=52 y=34 width=6 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
186
|
-
"char id=94 x=34 y=23 width=8 height=4 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
187
|
-
"char id=95 x=34 y=121 width=10 height=2 xoffset=0 yoffset=9 xadvance=10 page=0 chnl=15\n" +
|
|
188
|
-
"char id=96 x=15 y=12 width=4 height=4 xoffset=4 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
189
|
-
"char id=97 x=54 y=23 width=10 height=7 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
190
|
-
"char id=98 x=56 y=12 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
191
|
-
"char id=99 x=62 y=1 width=10 height=7 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
192
|
-
"char id=100 x=49 y=56 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
193
|
-
"char id=101 x=56 y=45 width=10 height=8 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
194
|
-
"char id=102 x=59 y=31 width=9 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
195
|
-
"char id=103 x=54 y=67 width=10 height=9 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
196
|
-
"char id=104 x=60 y=54 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
197
|
-
"char id=105 x=67 y=42 width=9 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
198
|
-
"char id=106 x=67 y=9 width=8 height=11 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
199
|
-
"char id=107 x=69 y=21 width=10 height=10 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
200
|
-
"char id=108 x=76 y=1 width=9 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
201
|
-
"char id=109 x=76 y=12 width=10 height=8 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
202
|
-
"char id=110 x=69 y=32 width=10 height=8 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
203
|
-
"char id=111 x=86 y=1 width=10 height=8 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
204
|
-
"char id=112 x=97 y=1 width=10 height=9 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
205
|
-
"char id=113 x=108 y=1 width=10 height=9 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
206
|
-
"char id=114 x=87 y=10 width=9 height=8 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
207
|
-
"char id=115 x=97 y=11 width=10 height=7 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
208
|
-
"char id=116 x=108 y=11 width=9 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
209
|
-
"char id=117 x=87 y=19 width=10 height=7 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
210
|
-
"char id=118 x=98 y=19 width=9 height=8 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
211
|
-
"char id=119 x=80 y=27 width=10 height=7 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
212
|
-
"char id=120 x=108 y=22 width=10 height=8 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
213
|
-
"char id=121 x=91 y=28 width=10 height=9 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
214
|
-
"char id=122 x=80 y=35 width=10 height=7 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
215
|
-
"char id=123 x=118 y=11 width=6 height=10 xoffset=3 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
216
|
-
"char id=124 x=102 y=28 width=4 height=10 xoffset=4 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
217
|
-
"char id=125 x=119 y=22 width=6 height=10 xoffset=1 yoffset=0 xadvance=10 page=0 chnl=15\n" +
|
|
218
|
-
"char id=126 x=91 y=38 width=10 height=5 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15\n" +
|
|
219
|
-
"char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15";
|
|
220
|
-
|
|
221
|
-
var fontImageSource = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAdhklEQVR42u1deXMUR5bnG8xH8EfgI+g/h405zCFzI3QLBJYDhgVjQBJICF1ugcVlHCtzXwZx2d6IAYqN9eA/20ji8hh6ltmxHeuI6fEV6zGI3Pxl9at+nZ1ZVdlqYSzqRWSoVZ2dnZWZnfXeL3/vvWnTEkkkTLp37Rz+9JOPBQpe7x18L0v/v/nmmha9Pq7R+yjHjx0Va9asmc7r8DZMJU67prq2vun3YLpuKryubUxQ8L1x6sXpd5zxKLXfVtE7QA3s3Llj+MKF4ayQ8vTpU3Fh+Hz285s31WuI/Fxm25bNrdQOXuPa/fv3BMp3330nHj16JA7u35devbpxDtX7+OMrgoTqUvnyy/tizeqmVt4/ahffi/ZQD3/1PvB2qY2dnfIeZL9xDW0PDPR7+r3pfaB+UF1dcB3voz8oH1+5LPQ6tvYfPfpv9ZlB2e8thn4X1i2+R3u7j4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ugPanel = me.Renderable.extend({
|
|
224
|
-
/** @private */
|
|
225
|
-
init : function (debugToggle) {
|
|
226
|
-
// call the super constructor
|
|
227
|
-
this._super(me.Renderable, "init", [ 0, 0, me.video.renderer.getWidth(), DEBUG_HEIGHT ]);
|
|
228
|
-
|
|
229
|
-
// enable collision and event detection
|
|
230
|
-
this.isKinematic = false;
|
|
231
|
-
|
|
232
|
-
// minimum melonJS version expected
|
|
233
|
-
this.version = "9.0.0";
|
|
234
|
-
|
|
235
|
-
// to hold the debug options
|
|
236
|
-
// clickable rect area
|
|
237
|
-
this.area = {};
|
|
238
|
-
|
|
239
|
-
// Useful counters
|
|
240
|
-
this.counters = new Counters([
|
|
241
|
-
"shapes",
|
|
242
|
-
"sprites",
|
|
243
|
-
"velocity",
|
|
244
|
-
"bounds",
|
|
245
|
-
"children"
|
|
246
|
-
]);
|
|
247
|
-
|
|
248
|
-
// for z ordering
|
|
249
|
-
// make it ridiculously high
|
|
250
|
-
this.pos.z = Infinity;
|
|
251
|
-
|
|
252
|
-
// visibility flag
|
|
253
|
-
this.visible = false;
|
|
254
|
-
|
|
255
|
-
// frame update time in ms
|
|
256
|
-
this.frameUpdateTime = 0;
|
|
257
|
-
|
|
258
|
-
// frame draw time in ms
|
|
259
|
-
this.frameDrawTime = 0;
|
|
260
|
-
|
|
261
|
-
// set the object GUID value
|
|
262
|
-
this.GUID = "debug-" + me.utils.createGUID();
|
|
263
|
-
|
|
264
|
-
// set the object entity name
|
|
265
|
-
this.name = "me.debugPanel";
|
|
266
|
-
|
|
267
|
-
// persistent
|
|
268
|
-
this.isPersistent = true;
|
|
269
|
-
|
|
270
|
-
// a floating object
|
|
271
|
-
this.floating = true;
|
|
272
|
-
|
|
273
|
-
// renderable
|
|
274
|
-
this.isRenderable = true;
|
|
275
|
-
|
|
276
|
-
// always update, even when not visible
|
|
277
|
-
this.alwaysUpdate = true;
|
|
278
|
-
|
|
279
|
-
// WebGL/Canvas compatibility
|
|
280
|
-
this.canvas = me.video.createCanvas(this.width, this.height, true);
|
|
281
|
-
|
|
282
|
-
// create a default font, with fixed char width
|
|
283
|
-
this.font_size = 10;
|
|
284
|
-
this.mod = 2;
|
|
285
|
-
if (this.width < 500) {
|
|
286
|
-
this.font_size = 7;
|
|
287
|
-
this.mod = this.mod * (this.font_size / 10);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// create the bitmapfont
|
|
291
|
-
var fontImage = new Image();
|
|
292
|
-
fontImage.src = fontImageSource;
|
|
293
|
-
|
|
294
|
-
this.font = new me.BitmapText(0, 0, {
|
|
295
|
-
fontData: fontDataSource,
|
|
296
|
-
font: fontImage
|
|
297
|
-
});
|
|
298
|
-
this.font.name = "debugPanelFont";
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
// free static ressources
|
|
302
|
-
fontImageSource = null;
|
|
303
|
-
fontDataSource = null;
|
|
304
|
-
|
|
305
|
-
// clickable areas
|
|
306
|
-
var size = 10 * this.mod;
|
|
307
|
-
this.area.renderHitBox = new me.Rect(250, 2, size, size);
|
|
308
|
-
this.area.renderVelocity = new me.Rect(250, 17, size, size);
|
|
309
|
-
this.area.renderQuadTree = new me.Rect(410, 2, size, size);
|
|
310
|
-
|
|
311
|
-
// enable the FPS counter
|
|
312
|
-
me.debug.displayFPS = true;
|
|
313
|
-
|
|
314
|
-
var self = this;
|
|
315
|
-
|
|
316
|
-
// add some keyboard shortcuts
|
|
317
|
-
this.debugToggle = debugToggle || me.input.KEY.S;
|
|
318
|
-
this.keyHandler = me.event.subscribe(me.event.KEYDOWN, function (action, keyCode) {
|
|
319
|
-
if (keyCode === self.debugToggle) {
|
|
320
|
-
me.plugins.debugPanel.toggle();
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
// some internal string/length
|
|
325
|
-
this.help_str = "["+String.fromCharCode(32 + this.debugToggle)+"]show/hide";
|
|
326
|
-
this.help_str_len = this.font.measureText(this.help_str).width;
|
|
327
|
-
this.fps_str_len = this.font.measureText("00/00 fps").width;
|
|
328
|
-
this.memoryPositionX = 325 * this.mod;
|
|
329
|
-
|
|
330
|
-
// resize the panel if the browser is resized
|
|
331
|
-
me.event.subscribe(me.event.CANVAS_ONRESIZE, function (w) {
|
|
332
|
-
self.resize(w, DEBUG_HEIGHT);
|
|
333
|
-
});
|
|
334
|
-
|
|
335
|
-
//patch patch patch !
|
|
336
|
-
this.patchSystemFn();
|
|
337
|
-
|
|
338
|
-
this.anchorPoint.set(0, 0);
|
|
339
|
-
},
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* patch system fn to draw debug information
|
|
343
|
-
* @ignore
|
|
344
|
-
*/
|
|
345
|
-
patchSystemFn : function () {
|
|
346
|
-
var hash = me.utils.getUriFragment();
|
|
347
|
-
|
|
348
|
-
// add a few new debug flag (if not yet defined)
|
|
349
|
-
me.debug.renderHitBox = me.debug.renderHitBox || hash.hitbox || false;
|
|
350
|
-
me.debug.renderVelocity = me.debug.renderVelocity || hash.velocity || false;
|
|
351
|
-
me.debug.renderQuadTree = me.debug.renderQuadTree || hash.quadtree || false;
|
|
352
|
-
|
|
353
|
-
var _this = this;
|
|
354
|
-
|
|
355
|
-
// patch me.game.update
|
|
356
|
-
me.plugin.patch(me.game, "update", function (dt) {
|
|
357
|
-
var frameUpdateStartTime = window.performance.now();
|
|
358
|
-
|
|
359
|
-
this._patched.apply(this, arguments);
|
|
360
|
-
|
|
361
|
-
// calculate the update time
|
|
362
|
-
_this.frameUpdateTime = window.performance.now() - frameUpdateStartTime;
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
// patch me.game.draw
|
|
366
|
-
me.plugin.patch(me.game, "draw", function () {
|
|
367
|
-
var frameDrawStartTime = window.performance.now();
|
|
368
|
-
|
|
369
|
-
_this.counters.reset();
|
|
370
|
-
|
|
371
|
-
this._patched.apply(this, arguments);
|
|
372
|
-
|
|
373
|
-
// calculate the drawing time
|
|
374
|
-
_this.frameDrawTime = window.performance.now() - frameDrawStartTime;
|
|
375
|
-
});
|
|
376
|
-
|
|
377
|
-
// patch renderable.js
|
|
378
|
-
me.plugin.patch(me.Renderable, "postDraw", function (renderer) {
|
|
379
|
-
|
|
380
|
-
// call the original me.Renderable.postDraw function
|
|
381
|
-
this._patched.apply(this, arguments);
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
// increment the sprites counter
|
|
385
|
-
if (typeof this.image !== "undefined") {
|
|
386
|
-
_this.counters.inc("sprites");
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// increment the bound counter
|
|
390
|
-
_this.counters.inc("bounds");
|
|
391
|
-
|
|
392
|
-
// increment the children counter
|
|
393
|
-
if (this instanceof me.Container) {
|
|
394
|
-
_this.counters.inc("children");
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
// don't do anything else if the panel is hidden
|
|
399
|
-
if (_this.visible) {
|
|
400
|
-
|
|
401
|
-
// omit following object as they are patched later through different methods
|
|
402
|
-
// XXX TODO: make this patched method more generic at Renderable level
|
|
403
|
-
if (!(this instanceof me.Entity) && !(this instanceof me.Text) &&
|
|
404
|
-
!(this instanceof me.BitmapText) && !(this instanceof me.Camera2d)
|
|
405
|
-
&& !(this instanceof me.ImageLayer)) {
|
|
406
|
-
|
|
407
|
-
// draw the renderable bounding box
|
|
408
|
-
if (me.debug.renderHitBox && this.getBounds().isFinite()) {
|
|
409
|
-
|
|
410
|
-
if (typeof this.ancestor !== "undefined") {
|
|
411
|
-
var absolutePosition = this.ancestor.getAbsolutePosition();
|
|
412
|
-
|
|
413
|
-
renderer.save();
|
|
414
|
-
|
|
415
|
-
// if this object of this renderable parent is not the root container
|
|
416
|
-
if (!this.root && !this.ancestor.root && this.ancestor.floating) {
|
|
417
|
-
renderer.translate(
|
|
418
|
-
-absolutePosition.x,
|
|
419
|
-
-absolutePosition.y
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// draw the renderable bounds
|
|
425
|
-
renderer.setColor("green");
|
|
426
|
-
renderer.stroke(this.getBounds());
|
|
427
|
-
|
|
428
|
-
if (typeof this.ancestor !== "undefined") {
|
|
429
|
-
renderer.restore();
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
// the sprite mask if defined
|
|
433
|
-
if (typeof this.mask !== "undefined") {
|
|
434
|
-
renderer.setColor("orange");
|
|
435
|
-
renderer.stroke(this.mask);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
if (typeof this.body !== "undefined") {
|
|
439
|
-
var bounds = this.getBounds();
|
|
440
|
-
renderer.translate(bounds.x, bounds.y);
|
|
441
|
-
|
|
442
|
-
renderer.setColor("orange");
|
|
443
|
-
renderer.stroke(this.body.getBounds());
|
|
444
|
-
|
|
445
|
-
// draw all defined shapes
|
|
446
|
-
renderer.setColor("red");
|
|
447
|
-
for (var i = this.body.shapes.length, shape; i--, (shape = this.body.shapes[i]);) {
|
|
448
|
-
renderer.stroke(shape);
|
|
449
|
-
_this.counters.inc("shapes");
|
|
450
|
-
}
|
|
451
|
-
renderer.translate(-bounds.x, -bounds.y);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
});
|
|
457
|
-
|
|
458
|
-
me.plugin.patch(me.BitmapText, "draw", function (renderer) {
|
|
459
|
-
// call the original me.Sprite.draw function
|
|
460
|
-
this._patched.apply(this, arguments);
|
|
461
|
-
|
|
462
|
-
// draw the font rectangle
|
|
463
|
-
if (_this.visible && me.debug.renderHitBox && this.name !== "debugPanelFont") {
|
|
464
|
-
var bounds = this.getBounds();
|
|
465
|
-
|
|
466
|
-
if (typeof this.ancestor !== "undefined") {
|
|
467
|
-
var ax = this.anchorPoint.x * bounds.width,
|
|
468
|
-
ay = this.anchorPoint.y * bounds.height;
|
|
469
|
-
// translate back as the bounds position
|
|
470
|
-
// is already adjusted to the anchor Point
|
|
471
|
-
renderer.translate(ax, ay);
|
|
472
|
-
} else {
|
|
473
|
-
renderer.save();
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
renderer.setColor("green");
|
|
477
|
-
renderer.stroke(bounds);
|
|
478
|
-
|
|
479
|
-
if (typeof this.ancestor === "undefined") {
|
|
480
|
-
renderer.restore();
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
|
|
485
|
-
// patch font.js
|
|
486
|
-
me.plugin.patch(me.Text, "draw", function (renderer, text, x, y) {
|
|
487
|
-
// call the original me.Text.draw function
|
|
488
|
-
this._patched.apply(this, arguments);
|
|
489
|
-
|
|
490
|
-
// call the original me.Sprite.draw function
|
|
491
|
-
if (_this.visible && me.debug.renderHitBox) {
|
|
492
|
-
if (typeof this.ancestor === "undefined") {
|
|
493
|
-
renderer.save();
|
|
494
|
-
}
|
|
495
|
-
renderer.setColor("green");
|
|
496
|
-
renderer.stroke(this.getBounds());
|
|
497
|
-
|
|
498
|
-
if (typeof this.ancestor === "undefined") {
|
|
499
|
-
renderer.restore();
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
});
|
|
503
|
-
|
|
504
|
-
// patch entities.js
|
|
505
|
-
me.plugin.patch(me.Entity, "postDraw", function (renderer) {
|
|
506
|
-
// don't do anything else if the panel is hidden
|
|
507
|
-
if (_this.visible) {
|
|
508
|
-
|
|
509
|
-
// check if debug mode is enabled
|
|
510
|
-
if (me.debug.renderHitBox) {
|
|
511
|
-
renderer.save();
|
|
512
|
-
|
|
513
|
-
renderer.translate(
|
|
514
|
-
-this.pos.x - this.body.getBounds().x - this.ancestor.getAbsolutePosition().x,
|
|
515
|
-
-this.pos.y - this.body.getBounds().y - this.ancestor.getAbsolutePosition().y
|
|
516
|
-
);
|
|
517
|
-
|
|
518
|
-
if (this.renderable instanceof me.Renderable) {
|
|
519
|
-
renderer.translate(
|
|
520
|
-
-this.anchorPoint.x * this.body.getBounds().width,
|
|
521
|
-
-this.anchorPoint.y * this.body.getBounds().height
|
|
522
|
-
);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
renderer.translate(
|
|
526
|
-
this.pos.x + this.ancestor.getAbsolutePosition().x,
|
|
527
|
-
this.pos.y + this.ancestor.getAbsolutePosition().y
|
|
528
|
-
);
|
|
529
|
-
|
|
530
|
-
// draw the bounding rect shape
|
|
531
|
-
renderer.setColor("orange");
|
|
532
|
-
renderer.stroke(this.body.getBounds());
|
|
533
|
-
|
|
534
|
-
// draw all defined shapes
|
|
535
|
-
renderer.setColor("red");
|
|
536
|
-
for (var i = this.body.shapes.length, shape; i--, (shape = this.body.shapes[i]);) {
|
|
537
|
-
renderer.stroke(shape);
|
|
538
|
-
_this.counters.inc("shapes");
|
|
539
|
-
}
|
|
540
|
-
renderer.restore();
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
if (me.debug.renderVelocity && (this.body.vel.x || this.body.vel.y)) {
|
|
544
|
-
var bounds = this.getBounds();
|
|
545
|
-
var hWidth = bounds.width / 2;
|
|
546
|
-
var hHeight = bounds.height / 2;
|
|
547
|
-
|
|
548
|
-
renderer.save();
|
|
549
|
-
renderer.setLineWidth(1);
|
|
550
|
-
|
|
551
|
-
renderer.setColor("blue");
|
|
552
|
-
renderer.translate(0, -hHeight);
|
|
553
|
-
renderer.strokeLine(0, 0, ~~(this.body.vel.x * hWidth), ~~(this.body.vel.y * hHeight));
|
|
554
|
-
_this.counters.inc("velocity");
|
|
555
|
-
|
|
556
|
-
renderer.restore();
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
// call the original me.Entity.postDraw function
|
|
560
|
-
this._patched.apply(this, arguments);
|
|
561
|
-
});
|
|
562
|
-
},
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* show the debug panel
|
|
566
|
-
* @ignore
|
|
567
|
-
*/
|
|
568
|
-
show : function () {
|
|
569
|
-
if (!this.visible) {
|
|
570
|
-
// add the debug panel to the game world
|
|
571
|
-
me.game.world.addChild(this, Infinity);
|
|
572
|
-
// register a mouse event for the checkboxes
|
|
573
|
-
me.input.registerPointerEvent("pointerdown", this, this.onClick.bind(this));
|
|
574
|
-
// mark it as visible
|
|
575
|
-
this.visible = true;
|
|
576
|
-
// force repaint
|
|
577
|
-
me.game.repaint();
|
|
578
|
-
}
|
|
579
|
-
},
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* hide the debug panel
|
|
583
|
-
* @ignore
|
|
584
|
-
*/
|
|
585
|
-
hide : function () {
|
|
586
|
-
if (this.visible) {
|
|
587
|
-
// release the mouse event for the checkboxes
|
|
588
|
-
me.input.releasePointerEvent("pointerdown", this);
|
|
589
|
-
// remove the debug panel from the game world
|
|
590
|
-
me.game.world.removeChild(this, true);
|
|
591
|
-
// mark it as invisible
|
|
592
|
-
this.visible = false;
|
|
593
|
-
// force repaint
|
|
594
|
-
me.game.repaint();
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
/** @private */
|
|
600
|
-
update : function () {
|
|
601
|
-
// update the FPS counter
|
|
602
|
-
me.timer.countFPS();
|
|
603
|
-
|
|
604
|
-
return this.visible;
|
|
605
|
-
},
|
|
606
|
-
|
|
607
|
-
/** @private */
|
|
608
|
-
onClick : function (e) {
|
|
609
|
-
// check the clickable areas
|
|
610
|
-
if (this.area.renderHitBox.contains(e.gameX, e.gameY)) {
|
|
611
|
-
me.debug.renderHitBox = !me.debug.renderHitBox;
|
|
612
|
-
} else if (this.area.renderVelocity.contains(e.gameX, e.gameY)) {
|
|
613
|
-
// does nothing for now, since velocity is
|
|
614
|
-
// rendered together with hitboxes (is a global debug flag required?)
|
|
615
|
-
me.debug.renderVelocity = !me.debug.renderVelocity;
|
|
616
|
-
} else if (this.area.renderQuadTree.contains(e.gameX, e.gameY)) {
|
|
617
|
-
me.debug.renderQuadTree = !me.debug.renderQuadTree;
|
|
618
|
-
}
|
|
619
|
-
// force repaint
|
|
620
|
-
me.game.repaint();
|
|
621
|
-
},
|
|
622
|
-
|
|
623
|
-
/** @private */
|
|
624
|
-
drawQuadTreeNode : function (renderer, node) {
|
|
625
|
-
var bounds = node.bounds;
|
|
626
|
-
|
|
627
|
-
// draw the current bounds
|
|
628
|
-
if (node.nodes.length === 0) {
|
|
629
|
-
// cap the alpha value to 0.4 maximum
|
|
630
|
-
var _alpha = (node.objects.length * 0.4) / me.collision.maxChildren;
|
|
631
|
-
if (_alpha > 0.0) {
|
|
632
|
-
renderer.save();
|
|
633
|
-
renderer.setColor("rgba(255,0,0," + _alpha + ")");
|
|
634
|
-
renderer.fillRect(bounds.left, bounds.top, bounds.width, bounds.height);
|
|
635
|
-
renderer.restore();
|
|
636
|
-
}
|
|
637
|
-
} else {
|
|
638
|
-
//has subnodes? drawQuadtree them!
|
|
639
|
-
for (var i = 0; i < node.nodes.length; i++) {
|
|
640
|
-
this.drawQuadTreeNode(renderer, node.nodes[i]);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
},
|
|
644
|
-
|
|
645
|
-
/** @private */
|
|
646
|
-
drawQuadTree : function (renderer) {
|
|
647
|
-
var x = me.game.viewport.pos.x;
|
|
648
|
-
var y = me.game.viewport.pos.y;
|
|
649
|
-
|
|
650
|
-
renderer.translate(-x, -y);
|
|
651
|
-
|
|
652
|
-
this.drawQuadTreeNode(renderer, me.game.world.broadphase);
|
|
653
|
-
|
|
654
|
-
renderer.translate(x, y);
|
|
655
|
-
},
|
|
656
|
-
|
|
657
|
-
/** @private */
|
|
658
|
-
drawMemoryGraph : function (renderer, endX) {
|
|
659
|
-
if (window.performance && window.performance.memory) {
|
|
660
|
-
var usedHeap = me.Math.round(window.performance.memory.usedJSHeapSize / 1048576, 2);
|
|
661
|
-
var totalHeap = me.Math.round(window.performance.memory.totalJSHeapSize / 1048576, 2);
|
|
662
|
-
var maxLen = ~~(endX - this.memoryPositionX - 5);
|
|
663
|
-
var len = maxLen * (usedHeap / totalHeap);
|
|
664
|
-
|
|
665
|
-
renderer.setColor("#0065AD");
|
|
666
|
-
renderer.fillRect(this.memoryPositionX, 0, maxLen, 20);
|
|
667
|
-
renderer.setColor("#3AA4F0");
|
|
668
|
-
renderer.fillRect(this.memoryPositionX + 1, 1, len - 1, 17);
|
|
669
|
-
|
|
670
|
-
this.font.draw(renderer, "Heap : " + usedHeap + "/" + totalHeap + " MB", this.memoryPositionX + 5, 2 * this.mod);
|
|
671
|
-
} else {
|
|
672
|
-
// Heap Memory information not available
|
|
673
|
-
this.font.draw(renderer, "Heap : ??/?? MB", this.memoryPositionX, 2 * this.mod);
|
|
674
|
-
}
|
|
675
|
-
this.font.draw(renderer, "Pool : " + me.pool.getInstanceCount(), this.memoryPositionX, 10 * this.mod);
|
|
676
|
-
},
|
|
677
|
-
|
|
678
|
-
/** @private */
|
|
679
|
-
draw : function (renderer) {
|
|
680
|
-
renderer.save();
|
|
681
|
-
|
|
682
|
-
// draw the QuadTree (before the panel)
|
|
683
|
-
if (me.debug.renderQuadTree === true) {
|
|
684
|
-
this.drawQuadTree(renderer);
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
// draw the panel
|
|
688
|
-
renderer.setGlobalAlpha(0.5);
|
|
689
|
-
renderer.setColor("black");
|
|
690
|
-
renderer.fillRect(
|
|
691
|
-
this.left, this.top,
|
|
692
|
-
this.width, this.height
|
|
693
|
-
);
|
|
694
|
-
renderer.setGlobalAlpha(1.0);
|
|
695
|
-
renderer.setColor("white");
|
|
696
|
-
|
|
697
|
-
this.font.textAlign = "left";
|
|
698
|
-
|
|
699
|
-
this.font.draw(renderer, "#objects : " + me.game.world.children.length, 5 * this.mod, 2 * this.mod);
|
|
700
|
-
this.font.draw(renderer, "#draws : " + me.game.world.drawCount, 5 * this.mod, 10 * this.mod);
|
|
701
|
-
|
|
702
|
-
// debug checkboxes
|
|
703
|
-
this.font.draw(renderer, "?hitbox [" + (me.debug.renderHitBox ? "x" : " ") + "]", 75 * this.mod, 2 * this.mod);
|
|
704
|
-
this.font.draw(renderer, "?velocity [" + (me.debug.renderVelocity ? "x" : " ") + "]", 75 * this.mod, 10 * this.mod);
|
|
705
|
-
|
|
706
|
-
this.font.draw(renderer, "?QuadTree [" + (me.debug.renderQuadTree ? "x" : " ") + "]", 150 * this.mod, 2 * this.mod);
|
|
707
|
-
|
|
708
|
-
// draw the update duration
|
|
709
|
-
this.font.draw(renderer, "Update : " + this.frameUpdateTime.toFixed(2) + " ms", 225 * this.mod, 2 * this.mod);
|
|
710
|
-
// draw the draw duration
|
|
711
|
-
this.font.draw(renderer, "Draw : " + this.frameDrawTime.toFixed(2) + " ms", 225 * this.mod, 10 * this.mod);
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
// Draw color code hints (not supported with bitmapfont)
|
|
715
|
-
//this.font.fillStyle.copy("red");
|
|
716
|
-
this.font.draw(renderer, "Shapes : " + this.counters.get("shapes"), 5 * this.mod, 17 * this.mod);
|
|
717
|
-
|
|
718
|
-
//this.font.fillStyle.copy("green");
|
|
719
|
-
this.font.draw(renderer, "Sprites : " + this.counters.get("sprites"), 75 * this.mod, 17 * this.mod);
|
|
720
|
-
|
|
721
|
-
//this.font.fillStyle.copy("blue");
|
|
722
|
-
this.font.draw(renderer, "Velocity : " + this.counters.get("velocity"), 150 * this.mod, 17 * this.mod);
|
|
723
|
-
|
|
724
|
-
//this.font.fillStyle.copy("orange");
|
|
725
|
-
this.font.draw(renderer, "Bounds : " + this.counters.get("bounds"), 225 * this.mod, 17 * this.mod);
|
|
726
|
-
|
|
727
|
-
//this.font.fillStyle.copy("purple");
|
|
728
|
-
this.font.draw(renderer, "Children : " + this.counters.get("children"), 325 * this.mod, 17 * this.mod);
|
|
729
|
-
|
|
730
|
-
// Reset font style
|
|
731
|
-
//this.font.setFont("courier", this.font_size, "white");
|
|
732
|
-
|
|
733
|
-
// draw the memory heap usage
|
|
734
|
-
var endX = this.width - 5;
|
|
735
|
-
this.drawMemoryGraph(renderer, endX - this.help_str_len);
|
|
736
|
-
|
|
737
|
-
this.font.textAlign = "right";
|
|
738
|
-
|
|
739
|
-
// some help string
|
|
740
|
-
this.font.draw(renderer, this.help_str, endX, 17 * this.mod);
|
|
741
|
-
|
|
742
|
-
//fps counter
|
|
743
|
-
var fps_str = me.timer.fps + "/" + me.timer.maxfps + " fps";
|
|
744
|
-
this.font.draw(renderer, fps_str, endX, 2 * this.mod);
|
|
745
|
-
|
|
746
|
-
renderer.restore();
|
|
747
|
-
},
|
|
748
|
-
|
|
749
|
-
/** @private */
|
|
750
|
-
onDestroyEvent : function () {
|
|
751
|
-
// hide the panel
|
|
752
|
-
this.hide();
|
|
753
|
-
// unbind keys event
|
|
754
|
-
me.input.unbindKey(this.toggleKey);
|
|
755
|
-
me.event.unsubscribe(this.keyHandler);
|
|
756
|
-
}
|
|
757
|
-
});
|
|
758
|
-
|
|
759
|
-
// automatically register the debug panel
|
|
760
|
-
me.event.subscribe(me.event.VIDEO_INIT, function () {
|
|
761
|
-
var toggleKey = me.utils.getUriFragment().debugToggleKey;
|
|
762
|
-
me.utils.function.defer(me.plugin.register, this, me.DebugPanel, "debugPanel",
|
|
763
|
-
toggleKey ? toggleKey.charCodeAt(0) - 32 : undefined
|
|
764
|
-
);
|
|
765
|
-
});
|
|
766
|
-
|
|
767
|
-
/*---------------------------------------------------------*/
|
|
768
|
-
// END END END
|
|
769
|
-
/*---------------------------------------------------------*/
|
|
770
|
-
})();
|