Nodes
A node is the basic1 building block in m2c2kit. A node is a graphical object that can be displayed on the screen. Nodes can be moved, rotated, and scaled. Nodes can also be animated, and they can respond to user input.
Nodes have a hierarchical structure. A node can be a container for other nodes, which allows you to create compound objects by combining simple nodes into more complex ones.
Graphical primitives, such as scenes, shapes, labels, and sprites, are all different types of nodes, each with their own specific properties and methods.
In m2c2kit, everything you see on the screen is some type of node.
Footnotes
-
For those with object-oriented programming experience, think of a node as a base class for all graphical objects in m2c2kit. Specifically,
M2Node
is an abstract class from which all other graphical objects are derived. The class name for an m2c2kit node isM2Node
, rather thanNode
, to avoid conflicts with the DOMNode
class. ↩