Object tool allows listing and interacting with all objects that are currently on canvas. Objects include shapes, text, stickers, drawings, overlay images etc.
const pixie = await Pixie.init();
console.log(pixie.tools.objects.getAll());
Get all objects that are currently on canvas.
getAll(): Object[]
Get object with specified name from canvas.
get(name: string): undefined | Object
Get object with specified id from canvas.
getById(id: string): undefined | Object
Check whether specified object is currently selected.
isActive(objectOrId: string | Object): boolean
Get currently active object.
getActive(): null | Object
Check if object with specified name exists on canvas.
has(name: string): boolean
Select specified object.
select(objOrId: string | Object): void
Deselect currently active object.
deselectActive(): void
Apply values to specified or currently active object.
setValues(values: ObjectOptions, obj?: null | Object): void
Move specified or currently active object in given direction.
move(direction: "up" | "right" | "down" | "left", amount?: number, obj?: null | Object): void
Bring specified or currently active object to front of canvas.
bringToFront(obj?: null | Object): void
Send specified or currently active object to back of canvas.
sendToBack(obj?: null | Object): void
Flip specified or currently active object horizontally.
flipHorizontally(obj?: null | Object): void
Duplicate specified or currently active object.
duplicate(obj?: null | Object): void
Delete specified or currently active object.
delete(obj?: null | Object): void