Skip to content

hm5-types (source format) / MarkerGeometry

Interface: MarkerGeometry ​

The geometry of a marker, in its layer's space. Which fields count depends on the component's shape (absent ones read as 0):

  • point: x, y
  • arrow: x, y (tail), angle (degrees, 0 = right, clockwise as y goes down), length
  • rect / ellipse: x, y (top-left of the box), w, h
  • circle: x, y (centre), r
  • parabola: x, y (start), vx, vy (velocity per frame)
  • hline / vline: x, y (start), length (signed: + = right / down)
  • polygon: x, y (where its corners are measured from), points (the corners, flat [x0, y0, x1, y1, …] relative to x, y; the last joins the first), cx / cy (optional centre relative to x, y — both or neither)
  • data: x, y (top-left of the tag)

Properties ​

PropertyTypeDescription
angle?number-
cx?numberpolygon: the centre (pivot for scaling), relative to (x, y); absent = none set (the area's centroid stands in)
cy?number-
h?number-
length?number-
points?number[]polygon: the corners, flat [x0, y0, x1, y1, …], relative to (x, y)
r?number-
vx?number-
vy?number-
w?number-
xnumber-
ynumber-

HereSplash — 2D animation for the web