forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGenerateEmptyMapData.js
More file actions
41 lines (40 loc) · 1.22 KB
/
Copy pathGenerateEmptyMapData.js
File metadata and controls
41 lines (40 loc) · 1.22 KB
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
var GenerateEmptyMapData = function (format, name, tileWidth, tileHeight, width, height)
{
return {
width: (width !== undefined && width !== null) ? width : 0,
height: (height !== undefined && height !== null) ? height : 0,
tileWidth: (tileWidth !== undefined && tileWidth !== null) ? tileWidth : 0,
tileHeight: (tileHeight !== undefined && tileHeight !== null) ? tileHeight : 0,
name: (name !== undefined && name !== null) ? name : '',
format: format,
orientation: 'orthogonal',
version: '1',
properties: {},
widthInPixels: 0,
heightInPixels: 0,
layers: [
{
name: 'layer',
x: 0,
y: 0,
width: 0,
height: 0,
widthInPixels: 0,
heightInPixels: 0,
alpha: 1,
visible: true,
properties: {},
indexes: [],
callbacks: [],
bodies: [],
data: []
}
],
images: [],
objects: {},
collision: {},
tilesets: [],
tiles: []
};
};
module.exports = GenerateEmptyMapData;