forked from withoutblank/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrush-schema.json
132 lines (132 loc) · 4.57 KB
/
brush-schema.json
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Brush",
"description": "",
"type": "object",
"properties": {
"disabled_state": {
"description": "The UI element is disabled.",
"$ref": "#/$defs/brush_state"
},
"dpi_source": {
"type": "string",
"enum": [
"user_interface",
"current_display_size"
]
},
"focused_state": {
"description": "The UI element has focus. All keyboard input will be directed here before others.",
"$ref": "#/$defs/brush_state"
},
"hovered_state": {
"description": "The UI element is hovered, typically the mouse cursor is over it.",
"$ref": "#/$defs/brush_state"
},
"is_transient": {
"description": "If true this texture will be loaded and loaded on demand and NOT optimized onto a texture page. Only make true for large textures that should not stay resident.",
"type": "boolean"
},
"margins": {
"description": "When stretched will define the 9 pieces that are composited. https://docs.unity3d.com/Manual/9SliceSprites.html",
"type": "object",
"properties": {
"bottom": {
"type": "integer"
},
"left": {
"type": "integer"
},
"right": {
"type": "integer"
},
"top": {
"type": "integer"
}
},
"unevaluatedProperties": false
},
"normal_state": {
"description": "Normal or default state of the brush",
"$ref": "#/$defs/brush_state"
},
"pressed_state": {
"description": "The UI element has be pressed, typically indicating the mouse button is down.",
"$ref": "#/$defs/brush_state"
},
"supported_dpis": {
"description": "What DPI this brush natively supports for higher resolution textures. By convention texture names must be post-fixed with the DPI value to be found. For example picture.png would also need picture150.png side-by-side if supported DPI of 150 was added. Typically should be [150, 200] if this feature is being used.",
"type": "array",
"items": {
"$ref": "#/$defs/dpi"
}
},
"tiles": {
"description": "Allows a brush to consist of multiple distinct pieces. Typically used for flipbook animations.",
"type": "object",
"properties": {
"column_count": {
"type": "integer"
},
"tile_size": {
"$ref": "#/$defs/size"
},
"tile_stride": {
"$ref": "#/$defs/size"
},
"total_count": {
"type": "integer"
}
},
"unevaluatedProperties": false
}
},
"unevaluatedProperties": false,
"$defs": {
"size": {
"type": "array",
"items": {
"type": "integer"
},
"minItems": 2,
"maxItems": 2
},
"brush_state": {
"type": "object",
"properties": {
"alpha_multiply": {
"description": "Alpha multiply the brush texture when this state is active",
"type": "number",
"minimum": 0.0,
"maximum": 1.0
},
"shader_type": {
"description": "Control the shader this brush will be rendered with. Default is 'normal'",
"type": "string",
"enum": [
"normal",
"normal_overlay",
"disabled",
"focused",
"pressed",
"hovered",
"hovered_overlay",
"yuv_video"
]
},
"texture": {
"description": "Name of texture",
"type": "string"
}
},
"required": [
"texture"
],
"unevaluatedProperties": false
},
"dpi": {
"type": "integer",
"exclusiveMinimum": 100
}
}
}