Skip to content

pack_line()

Kevin110026 edited this page Mar 5, 2025 · 2 revisions

new pack_line(obj1, obj2, noForce = false, arrow = false)

創造一條線連接兩物件

arg - noForce 不要將兩物件互相束縛

arg - arrow 顯示線的箭頭(從obj1到obj2)

property - pointer obj1, obj2

線連接兩個物件,物件須包含Coordinate2d pos屬性

property - obj_bound bound

若arg - noForce 為 false,則此bound存在

property - pointer maxr, minr 線的最大,最小長(以obj_bound實現)

範例程式
let c = new pack_circle();
let l = new pack_line(c, {pos: new refer(function(){return new Coordinate2d(mouse.x, mouse.y)})});

流星錘ouob

Clone this wiki locally