anchor(o: Anchor | Vec2): AnchorComp

Anchor point for render (default "topleft").

paramo- The anchor point to set.

// set anchor to "center" so it'll rotate from center
add([
    rect(40, 10),
    rotate(45),
    anchor("center"),
])

returnsThe anchor comp.

sincev2000.0

kaplay logo

Misc

Layer