|
|
@@ -2,17 +2,17 @@
|
|
|
"actors" : {{% for actor in bodies %}
|
|
|
"{{actor.name}}" : {
|
|
|
"node" : "{{actor.node}}",
|
|
|
- "type" : "{{actor.class}}",
|
|
|
+ "class" : "{{actor.class}}",
|
|
|
"shapes" : {{% for shape in actor.fixtures %}
|
|
|
- {{shape.name}} : {
|
|
|
+ "{{shape.name}}" : {
|
|
|
"class" : "{{shape.class}}",
|
|
|
- "material" : "default", {% if shape.is_box %}
|
|
|
+ "material" : "default",{% if shape.is_box %}
|
|
|
"type" : "box",
|
|
|
- "coords" : [{% for point in shape.hull%}
|
|
|
- {{point.x}}, {{point.y}}{% if not forloop.last %},{% endif %} {% endfor %}
|
|
|
- ] {% endif %}{% if shape.is_circle %}
|
|
|
+ "width" : {{actor.size.width}}, {# in pixels #}
|
|
|
+ "height" : {{actor.size.height}}, {# in pixels #}
|
|
|
+ "depth" : 0.1{% endif %}{% if shape.is_circle %}
|
|
|
"type" : "circle",
|
|
|
- "radius" : {{shape.radius}} {% endif %}
|
|
|
+ "radius" : {{shape.radius|floatformat:3}} {% endif %}
|
|
|
} {% if not forloop.last %},{% endif %} {% endfor %}
|
|
|
}
|
|
|
}
|