I think I'm following an outdated tutorial where using the origin() function to modify the anchor position of an object. But it seems like the function has been removed in the latest version.
const player = add([
rect(24, 24),
pos(12, 12),
color(0, 0, 1),
area(),
body(),
origin("center"), //<--- undefined
]);
So How do I do it now in the latest kaboom version ?
It's me from the future, I found it from documentation that we can use
anchor()to do the same thing like theorigin()function does.Eg:
anchor("center")