mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
🆙 Init V3
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { GetRoomEngine } from '@nitrots/nitro-renderer';
|
||||
|
||||
export const GetRoomObjectBounds = (roomId: number, objectId: number, category: number, canvasId = 1) =>
|
||||
{
|
||||
const rectangle = GetRoomEngine().getRoomObjectBoundingRectangle(roomId, objectId, category, canvasId);
|
||||
|
||||
if(!rectangle) return null;
|
||||
|
||||
rectangle.x = Math.round(rectangle.x);
|
||||
rectangle.y = Math.round(rectangle.y);
|
||||
|
||||
return rectangle;
|
||||
};
|
||||
Reference in New Issue
Block a user