Skip to content

Commit 16ce5a1

Browse files
committed
5873 video test
1 parent 9d5bb92 commit 16ce5a1

File tree

8 files changed

+116
-64
lines changed

8 files changed

+116
-64
lines changed

public/assets/bugs/tokyo.mp4

6.28 MB
Binary file not shown.

public/build/dev.js

Lines changed: 26 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -40412,13 +40412,13 @@ var Mask = {
4041240412
* @method Phaser.GameObjects.Components.Mask#createGeometryMask
4041340413
* @since 3.6.2
4041440414
*
40415-
* @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.
40415+
* @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
4041640416
*
4041740417
* @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.
4041840418
*/
4041940419
createGeometryMask: function (graphics)
4042040420
{
40421-
if (graphics === undefined && this.type === 'Graphics')
40421+
if (graphics === undefined && (this instanceof Phaser.GameObjects.Graphics || this instanceof Phaser.GameObjects.Shape))
4042240422
{
4042340423
// eslint-disable-next-line consistent-this
4042440424
graphics = this;
@@ -61051,7 +61051,6 @@ var PointLight = new Class({
6105161051
Components.AlphaSingle,
6105261052
Components.BlendMode,
6105361053
Components.Depth,
61054-
Components.GetBounds,
6105561054
Components.Mask,
6105661055
Components.Pipeline,
6105761056
Components.ScrollFactor,
@@ -184264,7 +184263,7 @@ var SceneManager = new Class({
184264184263
this.scenes.splice(indexB, 1);
184265184264

184266184265
// Add in new location
184267-
this.scenes.splice(indexA + 1, 0, tempScene);
184266+
this.scenes.splice(indexA + (indexB > indexA), 0, tempScene);
184268184267
}
184269184268
}
184270184269

@@ -184314,7 +184313,7 @@ var SceneManager = new Class({
184314184313
else
184315184314
{
184316184315
// Add in new location
184317-
this.scenes.splice(indexA, 0, tempScene);
184316+
this.scenes.splice(indexA - (indexB < indexA), 0, tempScene);
184318184317
}
184319184318
}
184320184319
}
@@ -186016,22 +186015,17 @@ var Systems = new Class({
186016186015
var settings = this.settings;
186017186016
var status = this.getStatus();
186018186017

186019-
if (status !== CONST.CREATING || status !== CONST.RUNNING)
186018+
if (status !== CONST.CREATING && status !== CONST.RUNNING)
186020186019
{
186021186020
console.warn('Cannot pause non-running Scene', settings.key);
186022186021
}
186023-
else
186022+
else if (this.settings.active)
186024186023
{
186025-
var events = this.events;
186026-
186027-
if (this.settings.active)
186028-
{
186029-
settings.status = CONST.PAUSED;
186024+
settings.status = CONST.PAUSED;
186030186025

186031-
settings.active = false;
186026+
settings.active = false;
186032186027

186033-
events.emit(Events.PAUSE, this, data);
186034-
}
186028+
this.events.emit(Events.PAUSE, this, data);
186035186029
}
186036186030

186037186031
return this;
@@ -186083,15 +186077,22 @@ var Systems = new Class({
186083186077
*/
186084186078
sleep: function (data)
186085186079
{
186086-
var events = this.events;
186087186080
var settings = this.settings;
186081+
var status = this.getStatus();
186088186082

186089-
settings.status = CONST.SLEEPING;
186083+
if (status !== CONST.CREATING && status !== CONST.RUNNING)
186084+
{
186085+
console.warn('Cannot sleep non-running Scene', settings.key);
186086+
}
186087+
else
186088+
{
186089+
settings.status = CONST.SLEEPING;
186090186090

186091-
settings.active = false;
186092-
settings.visible = false;
186091+
settings.active = false;
186092+
settings.visible = false;
186093186093

186094-
events.emit(Events.SLEEP, this, data);
186094+
this.events.emit(Events.SLEEP, this, data);
186095+
}
186095186096

186096186097
return this;
186097186098
},
@@ -204378,36 +204379,6 @@ var Tilemap = new Class({
204378204379
};
204379204380
},
204380204381

204381-
/**
204382-
* @ignore
204383-
*/
204384-
createBlankDynamicLayer: function (name, tileset, x, y, width, height, tileWidth, tileHeight)
204385-
{
204386-
console.warn('createBlankDynamicLayer is deprecated. Use createBlankLayer');
204387-
204388-
return this.createBlankLayer(name, tileset, x, y, width, height, tileWidth, tileHeight);
204389-
},
204390-
204391-
/**
204392-
* @ignore
204393-
*/
204394-
createDynamicLayer: function (layerID, tileset, x, y)
204395-
{
204396-
console.warn('createDynamicLayer is deprecated. Use createLayer');
204397-
204398-
return this.createLayer(layerID, tileset, x, y);
204399-
},
204400-
204401-
/**
204402-
* @ignore
204403-
*/
204404-
createStaticLayer: function (layerID, tileset, x, y)
204405-
{
204406-
console.warn('createStaticLayer is deprecated. Use createLayer');
204407-
204408-
return this.createLayer(layerID, tileset, x, y);
204409-
},
204410-
204411204382
/**
204412204383
* Sets the rendering (draw) order of the tiles in this map.
204413204384
*
@@ -204680,7 +204651,7 @@ var Tilemap = new Class({
204680204651

204681204652
var layerData = this.layers[index];
204682204653

204683-
// Check for an associated static or dynamic tilemap layer
204654+
// Check for an associated tilemap layer
204684204655
if (layerData.tilemapLayer)
204685204656
{
204686204657
console.warn('Tilemap Layer ID already exists:' + layerID);
@@ -211244,6 +211215,7 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer)
211244211215
return null;
211245211216
}
211246211217

211218+
var index;
211247211219
var oldTile = layer.data[tileY][tileX];
211248211220
var oldTileCollides = oldTile && oldTile.collides;
211249211221

@@ -211258,7 +211230,7 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer)
211258211230
}
211259211231
else
211260211232
{
211261-
var index = tile;
211233+
index = tile;
211262211234

211263211235
if (layer.data[tileY][tileX] === null)
211264211236
{
@@ -211276,7 +211248,8 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer)
211276211248

211277211249
// Copy properties from tileset to tiles.
211278211250
var tiles = BuildTilesetIndex(layer.tilemapLayer.tilemap);
211279-
var index = tile instanceof Tile ? tile.index : tile;
211251+
211252+
index = tile instanceof Tile ? tile.index : tile;
211280211253

211281211254
var sid = tiles[index][2];
211282211255
var set = layer.tilemapLayer.tileset[sid];

public/build/phaser.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/documentIndex.json

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10729,13 +10729,12 @@
1072910729
"constructor": 1,
1073010730
"super": 1,
1073110731
"key": 1,
10732-
"preload": 1,
1073310732
"create": 1,
1073410733
"let": 4,
10735-
"textbutton": 3,
10734+
"textbutton": 4,
1073610735
"this": 3,
1073710736
"add": 3,
10738-
"text": 2,
10737+
"text": 3,
1073910738
"\"text\"": 1,
1074010739
"font": 3,
1074110740
"px": 3,
@@ -10782,6 +10781,7 @@
1078210781
"any": 1,
1078310782
"further": 1,
1078410783
"addeventlistener": 1,
10784+
"boom": 1,
1078510785
"remove": 1,
1078610786
"causes": 1,
1078710787
"same": 1,
@@ -11363,6 +11363,54 @@
1136311363
"": 1
1136411364
}
1136511365
},
11366+
"bugs\\5873 video.js": {
11367+
"path": "bugs\\5873 video.js",
11368+
"titleWords": {
11369+
"bugs": 1,
11370+
"video": 1
11371+
},
11372+
"bodyWords": {
11373+
"var": 3,
11374+
"config": 2,
11375+
"type": 1,
11376+
"phaser": 3,
11377+
"auto": 1,
11378+
"width": 1,
11379+
"height": 1,
11380+
"backgroundcolor": 1,
11381+
"#": 1,
11382+
"d": 3,
11383+
"parent": 1,
11384+
"example": 1,
11385+
"scene": 1,
11386+
"preload": 3,
11387+
"create": 3,
11388+
"game": 2,
11389+
"new": 1,
11390+
"function": 2,
11391+
"this": 2,
11392+
"load": 1,
11393+
"video": 2,
11394+
"wormhole": 2,
11395+
"https": 1,
11396+
"www": 1,
11397+
"appsloveworld": 1,
11398+
"com": 1,
11399+
"wp": 1,
11400+
"content": 1,
11401+
"uploads": 1,
11402+
"sample": 1,
11403+
"mp": 2,
11404+
"videos": 1,
11405+
"loadeddata": 1,
11406+
"false": 1,
11407+
"true": 2,
11408+
"vid": 2,
11409+
"add": 1,
11410+
"play": 1,
11411+
"": 1
11412+
}
11413+
},
1136611414
"bugs\\5883 layer camera.js": {
1136711415
"path": "bugs\\5883 layer camera.js",
1136811416
"titleWords": {

public/examples.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@
947947
{
948948
"path": "src\\bugs\\5538 ios input.js",
949949
"name": "5538 ios input.js",
950-
"size": 1365,
950+
"size": 1381,
951951
"extension": ".js",
952952
"type": "file"
953953
},
@@ -1028,6 +1028,13 @@
10281028
"extension": ".js",
10291029
"type": "file"
10301030
},
1031+
{
1032+
"path": "src\\bugs\\5873 video.js",
1033+
"name": "5873 video.js",
1034+
"size": 505,
1035+
"extension": ".js",
1036+
"type": "file"
1037+
},
10311038
{
10321039
"path": "src\\bugs\\5883 layer camera.js",
10331040
"name": "5883 layer camera.js",
@@ -1050,7 +1057,7 @@
10501057
"type": "file"
10511058
}
10521059
],
1053-
"size": 40753,
1060+
"size": 41274,
10541061
"type": "directory"
10551062
},
10561063
{
@@ -14655,6 +14662,6 @@
1465514662
"type": "directory"
1465614663
}
1465714664
],
14658-
"size": 4020689,
14665+
"size": 4021210,
1465914666
"type": "directory"
1466014667
}

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
}
242242
else
243243
{
244-
var a = $('<a></a>', { href: 'view.html?src=' + filepath });
244+
var a = $('<a></a>', { href: 'view.html?src=' + filepath + '&rnd=' + Math.random().toString() });
245245
}
246246

247247
const imgPath = filepath.replace(/^src/, 'screenshots').replace(/\.json$/, '.png').replace(/\.js$/, '.png');

public/src/bugs/5538 ios input.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ class Example extends Phaser.Scene {
22
constructor() {
33
super({ key: 'Example' });
44
}
5-
preload() {
6-
}
75
create() {
86
let textbutton = this.add.text(50, 50, "Text", { font: '64px Courier' });
97
textbutton.setInteractive();
@@ -20,6 +18,7 @@ class Example extends Phaser.Scene {
2018
let el = this.add.dom(500, 80, div);
2119
//after the following event handler is called, the event handler for "textbutton" above does not get called any further
2220
div.addEventListener('pointerup', function (event) {
21+
textbutton.text = 'boom';
2322
el.destroy();
2423
// div.remove() //causes the same issue
2524
});
@@ -30,7 +29,7 @@ const config = {
3029
type: Phaser.AUTO,
3130
width: 800,
3231
height: 600,
33-
backgroundColor: '#000000',
32+
backgroundColor: '#220000',
3433
parent: 'phaser-example',
3534
scene: [Example],
3635
dom: {

public/src/bugs/5873 video.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
var config = {
2+
type: Phaser.AUTO,
3+
width: 800,
4+
height: 600,
5+
backgroundColor: '#2d2d2d',
6+
parent: 'phaser-example',
7+
scene: {
8+
preload: preload,
9+
create: create
10+
}
11+
};
12+
13+
var game = new Phaser.Game(config);
14+
15+
function preload ()
16+
{
17+
this.load.video('tokyo', 'assets/bugs/tokyo.mp4', 'loadeddata', true);
18+
}
19+
20+
function create ()
21+
{
22+
var vid = this.add.video(400, 300, 'tokyo');
23+
24+
vid.play();
25+
}

0 commit comments

Comments
 (0)