@vpmedia/phaser 1.0.31 → 1.0.33
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/README.md +1 -1
- package/dist/phaser.cjs +1 -1
- package/dist/phaser.cjs.LICENSE.txt +1 -1
- package/dist/phaser.cjs.map +1 -1
- package/dist/phaser.js +1 -1
- package/dist/phaser.js.LICENSE.txt +1 -1
- package/dist/phaser.js.map +1 -1
- package/package.json +1 -1
- package/src/phaser/core/device.js +0 -1
- package/src/phaser/core/device_util.js +0 -49
- package/src/phaser/core/game.js +0 -1
- package/src/phaser/core/sound_sprite.js +1 -1
- package/src/phaser/display/webgl/renderer.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/phaser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.33",
|
|
4
4
|
"description": "@vpmedia/phaser is the modern ECMAScript port of the popular Phaser game engine v2.6.2",
|
|
5
5
|
"author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -264,52 +264,3 @@ export function initialize(device) {
|
|
|
264
264
|
checkFullScreenSupport(device);
|
|
265
265
|
checkInput(device);
|
|
266
266
|
}
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* TBD
|
|
270
|
-
*/
|
|
271
|
-
export function readyCheck() {
|
|
272
|
-
if (!document.body) {
|
|
273
|
-
window.setTimeout(readyCheck._monitor, 20);
|
|
274
|
-
} else if (!this.deviceReadyAt) {
|
|
275
|
-
this.deviceReadyAt = Date.now();
|
|
276
|
-
document.removeEventListener('deviceready', readyCheck._monitor);
|
|
277
|
-
document.removeEventListener('DOMContentLoaded', readyCheck._monitor);
|
|
278
|
-
window.removeEventListener('load', readyCheck._monitor);
|
|
279
|
-
initialize(this);
|
|
280
|
-
let item = readyCheck._queue.shift();
|
|
281
|
-
while (item) {
|
|
282
|
-
const callback = item[0];
|
|
283
|
-
const context = item[1];
|
|
284
|
-
callback.call(context, this);
|
|
285
|
-
item = readyCheck._queue.shift();
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
*
|
|
292
|
-
* @param {object} device TBD
|
|
293
|
-
* @param {Function} callback TBD
|
|
294
|
-
* @param {object} context TBD
|
|
295
|
-
* @param {boolean} nonPrimer TBD
|
|
296
|
-
*/
|
|
297
|
-
export function whenReady(device, callback, context, nonPrimer) {
|
|
298
|
-
if (device.deviceReadyAt) {
|
|
299
|
-
callback.call(context, device);
|
|
300
|
-
} else if (readyCheck._monitor || nonPrimer) {
|
|
301
|
-
readyCheck._queue = readyCheck._queue || [];
|
|
302
|
-
readyCheck._queue.push([callback, context]);
|
|
303
|
-
} else {
|
|
304
|
-
readyCheck._monitor = readyCheck.bind(device);
|
|
305
|
-
readyCheck._queue = readyCheck._queue || [];
|
|
306
|
-
readyCheck._queue.push([callback, context]);
|
|
307
|
-
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
308
|
-
// Why is there an additional timeout here?
|
|
309
|
-
window.setTimeout(readyCheck._monitor, 0);
|
|
310
|
-
} else {
|
|
311
|
-
document.addEventListener('DOMContentLoaded', readyCheck._monitor, false);
|
|
312
|
-
window.addEventListener('load', readyCheck._monitor, false);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
package/src/phaser/core/game.js
CHANGED
|
@@ -13,7 +13,7 @@ export default class {
|
|
|
13
13
|
this.sounds = {};
|
|
14
14
|
for (let k in this.config.spritemap) {
|
|
15
15
|
const marker = this.config.spritemap[k];
|
|
16
|
-
const sound = this.game.add
|
|
16
|
+
const sound = this.game.sound.add(this.key);
|
|
17
17
|
sound.addMarker(k, marker.start, (marker.end - marker.start), null, marker.loop);
|
|
18
18
|
this.sounds[k] = sound;
|
|
19
19
|
}
|
|
@@ -129,7 +129,7 @@ export default class {
|
|
|
129
129
|
}
|
|
130
130
|
const gl = this.gl;
|
|
131
131
|
// -- Does this need to be set every frame? -- //
|
|
132
|
-
gl.viewport(0, 0, this.width, this.height);
|
|
132
|
+
// gl.viewport(0, 0, this.width, this.height);
|
|
133
133
|
// make sure we are bound to the main frame buffer
|
|
134
134
|
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
135
135
|
if (this.clearBeforeRender) {
|