2007-10-09 12:44:44 -04:00
|
|
|
{
|
|
|
|
"My Scene" : {
|
|
|
|
"id" : "main-stage",
|
|
|
|
"type" : "ClutterStage",
|
2008-05-09 09:58:04 -04:00
|
|
|
"title" : "ClutterScript test",
|
2007-10-09 12:44:44 -04:00
|
|
|
"color" : "white",
|
2007-11-15 10:24:43 -05:00
|
|
|
"signals" : [
|
2008-05-09 09:58:04 -04:00
|
|
|
{ "name" : "key-press-event", "handler" : "clutter_main_quit" },
|
|
|
|
{ "name" : "destroy", "handler" : "clutter_main_quit" }
|
2007-11-15 10:24:43 -05:00
|
|
|
],
|
2007-10-09 12:44:44 -04:00
|
|
|
"children" : [
|
|
|
|
{
|
|
|
|
"id" : "red-button",
|
|
|
|
"type" : "ClutterRectangle",
|
|
|
|
"color" : "#ff0000ff",
|
2007-11-14 08:36:31 -05:00
|
|
|
"x" : 50, "y" : 50, "width" : 100, "height" : 100,
|
2007-10-25 10:46:02 -04:00
|
|
|
"reactive" : true,
|
2007-12-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
(clutter_actor_set_property),
(clutter_actor_get_property),
(clutter_actor_class_init): Add the rotation-* properties,
controlling the rotation angle and center on each axis. (#614)
(parse_rotation_array), (parse_rotation),
(clutter_actor_parse_custom_node),
(clutter_actor_set_custom_property),
(clutter_scriptable_iface_init): Add a new "rotation" custom
property for expressing the rotation along each axis in a
compact way:
"rotation" : [
{ "x-axis" : [ <angle>, [ <y>, <z> ] ] },
{ "y-axis" : [ <angle>, [ <x>, <z> ] ] },
{ "z-axis" : [ <angle>, [ <x>, <y> ] ] }
]
(clutter_geometry_get_type),(clutter_vertex_get_type),
(clutter_actor_box_get_type): Use the I_() macro instead of
directly calling g_intern_static_string().
* clutter/clutter-entry.c (clutter_entry_request_coords):
* clutter/clutter-label.c (clutter_label_ensure_layout),
(clutter_label_request_coords): Use CLUTTER_UNITS_FROM_DEVICE()
instead of CLUTTER_UNITS_FROM_INT(), as "device" means "pixels".
* clutter/clutter-private.h: Add the I_() macro for intern
static strings.
* tests/test-script.json: Test the newly added "rotation"
custom property.
2007-12-10 06:01:10 -05:00
|
|
|
"rotation" : [
|
|
|
|
{ "z-axis" : [ 45.0, [ 75, 75 ] ] }
|
|
|
|
],
|
2008-05-09 09:58:04 -04:00
|
|
|
"behaviours" : [ "fade-behaviour", "path-behaviour" ]
|
2007-10-09 12:44:44 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id" : "green-button",
|
|
|
|
"type" : "ClutterRectangle",
|
|
|
|
"color" : "#00ff00ff",
|
2007-10-27 15:49:39 -04:00
|
|
|
"border-width" : 5,
|
|
|
|
"border-color" : "#00cc00ff",
|
2007-10-09 12:44:44 -04:00
|
|
|
"x" : 200,
|
|
|
|
"y" : 50,
|
|
|
|
"width" : 100,
|
|
|
|
"height" : 100,
|
2009-08-26 11:50:37 -04:00
|
|
|
"depth" : -200.0,
|
2007-12-25 15:09:20 -05:00
|
|
|
"reactive" : true,
|
2007-11-15 10:24:43 -05:00
|
|
|
"signals" : [
|
|
|
|
{ "name" : "button-press-event", "handler" : "clutter_main_quit" }
|
|
|
|
]
|
2007-10-18 08:31:07 -04:00
|
|
|
},
|
2007-10-09 12:44:44 -04:00
|
|
|
{
|
|
|
|
"id" : "red-hand",
|
|
|
|
"type" : "ClutterTexture",
|
2008-04-25 09:37:36 -04:00
|
|
|
"filename" : "redhand.png",
|
2008-03-05 23:37:00 -05:00
|
|
|
"x" : 100,
|
|
|
|
"y" : 100,
|
2009-08-26 11:50:37 -04:00
|
|
|
"width" : "20 mm",
|
2008-06-23 11:31:12 -04:00
|
|
|
"keep-aspect-ratio" : true,
|
2009-08-26 11:50:37 -04:00
|
|
|
"anchor-x" : "5 em",
|
|
|
|
"anchor-y" : "5 pt",
|
2007-10-09 12:44:44 -04:00
|
|
|
"opacity" : 100,
|
|
|
|
"behaviours" : [ "rotate-behaviour", "fade-behaviour" ]
|
2007-10-18 08:31:07 -04:00
|
|
|
},
|
2007-11-14 08:36:31 -05:00
|
|
|
{
|
|
|
|
"id" : "red-hand-clone",
|
2009-08-26 11:50:37 -04:00
|
|
|
"type" : "ClutterClone",
|
|
|
|
"source" : "red-hand",
|
2007-11-14 08:36:31 -05:00
|
|
|
"x" : 250,
|
|
|
|
"y" : 150,
|
2010-04-09 13:22:50 -04:00
|
|
|
"opacity" : 100
|
2007-11-14 08:36:31 -05:00
|
|
|
},
|
2007-10-25 10:46:02 -04:00
|
|
|
{
|
|
|
|
"id" : "label",
|
2009-08-26 11:50:37 -04:00
|
|
|
"type" : "ClutterText",
|
2007-10-25 10:46:02 -04:00
|
|
|
"x" : 50,
|
|
|
|
"y" : 200,
|
|
|
|
"text" : "Clutter\tScript",
|
|
|
|
"font-name" : "Sans 24px",
|
|
|
|
"color" : "black",
|
2009-08-26 11:50:37 -04:00
|
|
|
"line-alignment" : "center",
|
|
|
|
"line-wrap" : false,
|
2007-10-25 10:46:02 -04:00
|
|
|
"ellipsize" : "none",
|
2007-12-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
(clutter_actor_set_property),
(clutter_actor_get_property),
(clutter_actor_class_init): Add the rotation-* properties,
controlling the rotation angle and center on each axis. (#614)
(parse_rotation_array), (parse_rotation),
(clutter_actor_parse_custom_node),
(clutter_actor_set_custom_property),
(clutter_scriptable_iface_init): Add a new "rotation" custom
property for expressing the rotation along each axis in a
compact way:
"rotation" : [
{ "x-axis" : [ <angle>, [ <y>, <z> ] ] },
{ "y-axis" : [ <angle>, [ <x>, <z> ] ] },
{ "z-axis" : [ <angle>, [ <x>, <y> ] ] }
]
(clutter_geometry_get_type),(clutter_vertex_get_type),
(clutter_actor_box_get_type): Use the I_() macro instead of
directly calling g_intern_static_string().
* clutter/clutter-entry.c (clutter_entry_request_coords):
* clutter/clutter-label.c (clutter_label_ensure_layout),
(clutter_label_request_coords): Use CLUTTER_UNITS_FROM_DEVICE()
instead of CLUTTER_UNITS_FROM_INT(), as "device" means "pixels".
* clutter/clutter-private.h: Add the I_() macro for intern
static strings.
* tests/test-script.json: Test the newly added "rotation"
custom property.
2007-12-10 06:01:10 -05:00
|
|
|
"rotation" : [
|
|
|
|
{ "y-axis" : [ 60.0, [ 275, 100 ] ] },
|
|
|
|
{ "z-axis" : [ 45.0, [ 75, 75 ] ] }
|
2007-12-25 15:09:20 -05:00
|
|
|
]
|
2008-05-28 08:20:54 -04:00
|
|
|
}
|
2007-10-09 12:44:44 -04:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|