Skip to content

Commit 51d71ec

Browse files
authored
Merge pull request #21 from Insality/develop
Develop
2 parents 2119930 + 7b1fef1 commit 51d71ec

File tree

12 files changed

+180
-965
lines changed

12 files changed

+180
-965
lines changed

docs/panthera_adapter.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ local M = {
2525
-- Sets a property of a node to a specified value.
2626
gui.set(node, property_id, value)
2727
end,
28-
get_node_property = function(node, property_id)
29-
-- Gets the current value of a property of a node.
30-
return gui.get(node, property_id)
31-
end,
3228
tween_animation_key = function(node, property_id, easing, duration, end_value)
3329
-- Applies a tween to a node property based on Panthera animation key data.
3430
gui.animate(node, property_id, end_value, easing, duration)

example/example_go/example_go.collection

Lines changed: 1 addition & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,8 @@ embedded_instances {
55
data: "components {\n"
66
" id: \"example_go\"\n"
77
" component: \"/example/example_go/example_go.script\"\n"
8-
" position {\n"
9-
" x: 0.0\n"
10-
" y: 0.0\n"
11-
" z: 0.0\n"
12-
" }\n"
13-
" rotation {\n"
14-
" x: 0.0\n"
15-
" y: 0.0\n"
16-
" z: 0.0\n"
17-
" w: 1.0\n"
18-
" }\n"
19-
" property_decls {\n"
20-
" }\n"
218
"}\n"
229
""
23-
position {
24-
x: 0.0
25-
y: 0.0
26-
z: 0.0
27-
}
28-
rotation {
29-
x: 0.0
30-
y: 0.0
31-
z: 0.0
32-
w: 1.0
33-
}
34-
scale3 {
35-
x: 1.0
36-
y: 1.0
37-
z: 1.0
38-
}
3910
}
4011
embedded_instances {
4112
id: "root"
@@ -45,18 +16,6 @@ embedded_instances {
4516
position {
4617
x: 480.0
4718
y: 340.0
48-
z: 0.0
49-
}
50-
rotation {
51-
x: 0.0
52-
y: 0.0
53-
z: 0.0
54-
w: 1.0
55-
}
56-
scale3 {
57-
x: 1.0
58-
y: 1.0
59-
z: 1.0
6019
}
6120
}
6221
embedded_instances {
@@ -67,14 +26,11 @@ embedded_instances {
6726
" data: \"size {\\n"
6827
" x: 128.0\\n"
6928
" y: 32.0\\n"
70-
" z: 0.0\\n"
71-
" w: 0.0\\n"
7229
"}\\n"
7330
"color {\\n"
7431
" x: 0.2\\n"
7532
" y: 0.2\\n"
7633
" z: 0.2\\n"
77-
" w: 1.0\\n"
7834
"}\\n"
7935
"outline {\\n"
8036
" x: 1.0\\n"
@@ -83,71 +39,31 @@ embedded_instances {
8339
" w: 0.0\\n"
8440
"}\\n"
8541
"shadow {\\n"
86-
" x: 0.0\\n"
87-
" y: 0.0\\n"
88-
" z: 0.0\\n"
8942
" w: 0.0\\n"
9043
"}\\n"
91-
"leading: 1.0\\n"
92-
"tracking: 0.0\\n"
93-
"pivot: PIVOT_CENTER\\n"
94-
"blend_mode: BLEND_MODE_ALPHA\\n"
95-
"line_break: false\\n"
9644
"text: \\\"Hello\\\"\\n"
9745
"font: \\\"/example/assets/troika.font\\\"\\n"
9846
"material: \\\"/builtins/fonts/label-df.material\\\"\\n"
9947
"\"\n"
10048
" position {\n"
101-
" x: 0.0\n"
10249
" y: -81.0\n"
10350
" z: 0.01\n"
10451
" }\n"
105-
" rotation {\n"
106-
" x: 0.0\n"
107-
" y: 0.0\n"
108-
" z: 0.0\n"
109-
" w: 1.0\n"
110-
" }\n"
11152
"}\n"
11253
"embedded_components {\n"
11354
" id: \"sprite\"\n"
11455
" type: \"sprite\"\n"
11556
" data: \"default_animation: \\\"panthera\\\"\\n"
11657
"material: \\\"/panthera/materials/sprite.material\\\"\\n"
117-
"blend_mode: BLEND_MODE_ALPHA\\n"
11858
"textures {\\n"
11959
" sampler: \\\"texture_sampler\\\"\\n"
12060
" texture: \\\"/example/assets/example.atlas\\\"\\n"
12161
"}\\n"
12262
"\"\n"
123-
" position {\n"
124-
" x: 0.0\n"
125-
" y: 0.0\n"
126-
" z: 0.0\n"
127-
" }\n"
128-
" rotation {\n"
129-
" x: 0.0\n"
130-
" y: 0.0\n"
131-
" z: 0.0\n"
132-
" w: 1.0\n"
133-
" }\n"
13463
"}\n"
13564
""
13665
position {
137-
x: 0.0
138-
y: 0.0
139-
z: 0.0
140-
}
141-
rotation {
142-
x: 0.0
143-
y: 0.0
144-
z: 0.0
145-
w: 1.0
146-
}
147-
scale3 {
148-
x: 1.0
149-
y: 1.0
150-
z: 1.0
66+
z: 0.1
15167
}
15268
}
15369
embedded_instances {
@@ -157,44 +73,15 @@ embedded_instances {
15773
" type: \"sprite\"\n"
15874
" data: \"default_animation: \\\"ui_circle\\\"\\n"
15975
"material: \\\"/panthera/materials/sprite.material\\\"\\n"
160-
"blend_mode: BLEND_MODE_ALPHA\\n"
16176
"textures {\\n"
16277
" sampler: \\\"texture_sampler\\\"\\n"
16378
" texture: \\\"/example/assets/example.atlas\\\"\\n"
16479
"}\\n"
16580
"\"\n"
166-
" position {\n"
167-
" x: 0.0\n"
168-
" y: 0.0\n"
169-
" z: -0.01\n"
170-
" }\n"
171-
" rotation {\n"
172-
" x: 0.0\n"
173-
" y: 0.0\n"
174-
" z: 0.0\n"
175-
" w: 1.0\n"
176-
" }\n"
17781
" scale {\n"
17882
" x: 3.0\n"
17983
" y: 3.0\n"
180-
" z: 1.0\n"
18184
" }\n"
18285
"}\n"
18386
""
184-
position {
185-
x: 0.0
186-
y: 0.0
187-
z: 0.0
188-
}
189-
rotation {
190-
x: 0.0
191-
y: 0.0
192-
z: 0.0
193-
w: 1.0
194-
}
195-
scale3 {
196-
x: 1.0
197-
y: 1.0
198-
z: 1.0
199-
}
20087
}

example/example_go/example_go_panthera.lua

Lines changed: 1 addition & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ return {
251251
fps = 60,
252252
gizmo_steps = {
253253
},
254+
gui_path = "example/example_go/example_go.collection",
254255
layers = {
255256
},
256257
settings = {
@@ -260,120 +261,6 @@ return {
260261
},
261262
},
262263
nodes = {
263-
{
264-
blend_mode = "alpha",
265-
clipping_mode = "none",
266-
clipping_visible = true,
267-
color_a = 1,
268-
color_b = 1,
269-
color_g = 1,
270-
color_r = 1,
271-
enabled = true,
272-
inherit_alpha = true,
273-
node_id = "go_2",
274-
node_index = 1,
275-
node_type = "box",
276-
pivot = "pivot_center",
277-
scale_x = 1,
278-
scale_y = 1,
279-
scale_z = 1,
280-
size_mode = "auto",
281-
size_x = 200,
282-
size_y = 100,
283-
},
284-
{
285-
blend_mode = "alpha",
286-
clipping_mode = "none",
287-
clipping_visible = true,
288-
color_a = 1,
289-
color_b = 1,
290-
color_g = 1,
291-
color_r = 1,
292-
enabled = true,
293-
inherit_alpha = true,
294-
node_id = "go_2#sprite",
295-
node_index = 2,
296-
node_type = "box",
297-
parent = "go_2",
298-
pivot = "pivot_center",
299-
position_z = -0.01,
300-
scale_x = 3,
301-
scale_y = 3,
302-
scale_z = 1,
303-
size_mode = "auto",
304-
size_x = 150,
305-
size_y = 150,
306-
texture = "example/ui_circle",
307-
visible = true,
308-
},
309-
{
310-
blend_mode = "alpha",
311-
clipping_mode = "none",
312-
clipping_visible = true,
313-
color_a = 1,
314-
color_b = 1,
315-
color_g = 1,
316-
color_r = 1,
317-
enabled = true,
318-
inherit_alpha = true,
319-
node_id = "go",
320-
node_index = 3,
321-
node_type = "box",
322-
pivot = "pivot_center",
323-
scale_x = 1,
324-
scale_y = 1,
325-
scale_z = 1,
326-
size_mode = "auto",
327-
size_x = 200,
328-
size_y = 100,
329-
},
330-
{
331-
blend_mode = "alpha",
332-
clipping_mode = "none",
333-
clipping_visible = true,
334-
color_a = 1,
335-
color_b = 1,
336-
color_g = 1,
337-
color_r = 1,
338-
enabled = true,
339-
inherit_alpha = true,
340-
node_id = "go#sprite",
341-
node_index = 4,
342-
node_type = "box",
343-
parent = "go",
344-
pivot = "pivot_center",
345-
scale_x = 1,
346-
scale_y = 1,
347-
scale_z = 1,
348-
size_mode = "auto",
349-
size_x = 128,
350-
size_y = 128,
351-
texture = "example/panthera",
352-
visible = true,
353-
},
354-
{
355-
blend_mode = "alpha",
356-
clipping_mode = "none",
357-
clipping_visible = true,
358-
color_a = 1,
359-
enabled = true,
360-
inherit_alpha = true,
361-
node_id = "go#label",
362-
node_index = 5,
363-
node_type = "text",
364-
parent = "go",
365-
pivot = "pivot_center",
366-
position_y = -81,
367-
position_z = -0.01,
368-
scale_x = 1,
369-
scale_y = 1,
370-
scale_z = 1,
371-
size_mode = "auto",
372-
size_x = 200,
373-
size_y = 100,
374-
text = "Hello",
375-
visible = true,
376-
},
377264
},
378265
},
379266
format = "json",

0 commit comments

Comments
 (0)