Marks

Mark objects are handles to their internal representation in Fatum. They can be created and deleted without affecting the existance of the corresponding visual element. Using invalid marks will cause crashes. You should check if a Markis valid using its isValid() method.

Every mark has an id, which you can access with the method id().

Properties

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Other methods

Deleting a Mark

The method del() can be used to remove a mark from fatum. Be aware that this will only signal it for deletion after the next animation or swap. A common pattern is to change the Mark's appearance to signify deletion. For instance,

m.del().alpha(0);
fatum.animate();

Will make the mark fade out before being deleted.

Manipulating the buffers

By default, every modification you make to a Mark is made in the back buffer. It is possible to copy the Mark's state from the back buffer to the front buffer using show().

Connecting a Mark

To connect a Mark to another Mark, you can use the fatum addConnect(m1,m2) method, or the inline connect(m) method.

var m1 = fatum.addMark();
var m2 = fatum.addMark();
// connect through fatum
fatum.addConnection(m1,m2);
// or connect in an inline fashion
m1.connect(m2);

Cloning a Mark

A Mark can be cloned with its clone()method. This will create a new Mark, with the same properties as the original.