1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import vec2 from require 'cpml' => input.selection @objs center = vec2! for o in *@objs! center += o.pos num = #@objs! if num > 0 center /= num input.arrow @delta, center delta = @delta!.to - @delta!.frm for o in *@objs! op.move o, o.pos + delta