Scene Elements - e-ucm/ead GitHub Wiki
Scene elements are interactive elements in a scene. They should a have a renderer, and can have effects and behaviors.
Scene elements also contain a list of collision polygons, that defines the area of the scene elements. These polygons will be used to perform different operations, e.g., check if user touches/clicks over it.
Scene elements contains a ref property that allows inheritance from already defined scene elements. ref is an URI that points to the json file storing the base scene element.
For example, having in button.json the next json:
{
renderer: {
type: image,
uri: "images/button.png"
}
}
If we define a scene like:
{
children: [
{
ref: "button.json",
transformation: {
x: 10,
y: 25
}
}
]
}
the scene will contain a scene element, situated in (10, 25) with image button.png as renderer.