-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
tpinfo.proto
60 lines (49 loc) · 1.64 KB
/
tpinfo.proto
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
// Copied from atlas_ddf.proto and modified to remove things that don't apply here
syntax = "proto2";
package dmGameSystemDDF;
option java_package = "com.dynamo.texturepacker.proto";
option java_outer_classname = "Info";
message Point
{
required float x = 1;
required float y = 2;
}
message Size
{
required float width = 1;
required float height = 2;
}
message Rect
{
required float x = 1;
required float y = 2;
required float width = 3;
required float height = 4;
}
// Coordinates are in image space (texels)
message Sprite
{
required string name = 1;
required bool trimmed = 2; // If the new rectangle is smaller than the source rect
required bool rotated = 3; // True if it has been rotated 90 deg ccw
required bool is_solid = 4; // true if there are no transparent texels
required Size untrimmed_size = 5; // size of the original image
required Point corner_offset = 6; // offset from topleft corner to the trimmed rectangle
required Rect source_rect = 7; // the trimmed rectangle within the original image
required Rect frame_rect = 8; // The final placement in the texture
repeated Point vertices = 9;
repeated int32 indices = 10;
optional Point pivot = 11; // An offset from the top left corner, where the final center point will be at runtime
}
message Page
{
required string name = 1;
required Size size = 2; // Size of the texture
repeated Sprite sprites = 3;
}
message Atlas
{
repeated Page pages = 1;
optional string version = 2; // E.g. "1.0"
optional string description = 3; // E.g. "TexturePacker exporter"
}