Skip to content

Commit

Permalink
Added Two.BoundingBox.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-nano committed Mar 19, 2024
1 parent 11bc5d9 commit dc20c58
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ declare module "two.js/src/group" {
* @returns {Object} - Returns object with top, left, right, bottom, width, height attributes.
* @description Return an object with top, left, right, bottom, width, and height parameters of the group.
*/
getBoundingClientRect(shallow?: boolean): any;
getBoundingClientRect(shallow?: boolean): Two.BoundingBox;
/**
* @name Two.Group#noFill
* @function
Expand Down Expand Up @@ -2469,7 +2469,7 @@ declare module "two.js/src/path" {
* @returns {Object} - Returns object with top, left, right, bottom, width, height attributes.
* @description Return an object with top, left, right, bottom, width, and height parameters of the path.
*/
getBoundingClientRect(shallow?: boolean): any;
getBoundingClientRect(shallow?: boolean): Two.BoundingBox;
/**
* @name Two.Path#getPointAt
* @function
Expand Down Expand Up @@ -3178,7 +3178,7 @@ declare module "two.js/src/text" {
* @returns {Object} - Returns object with top, left, right, bottom, width, height attributes.
* @description Return an object with top, left, right, bottom, width, and height parameters of the text object.
*/
getBoundingClientRect(shallow?: boolean): any;
getBoundingClientRect(shallow?: boolean): Two.BoundingBox;
}
import { Shape } from "two.js/src/shape";
import { Gradient } from "two.js/src/effects/gradient";
Expand Down Expand Up @@ -3553,7 +3553,7 @@ declare module "two.js/src/shapes/points" {
* @returns {Object} - Returns object with top, left, right, bottom, width, height attributes.
* @description Return an object with top, left, right, bottom, width, and height parameters of the path.
*/
getBoundingClientRect: (shallow?: boolean) => any;
getBoundingClientRect: (shallow?: boolean) => Two.BoundingBox;
/**
* @name Two.Points#subdivide
* @function
Expand Down Expand Up @@ -4476,6 +4476,15 @@ declare module "two.js" {
import { Renderer as CanvasRenderer } from "two.js/src/renderers/canvas";
import { Renderer as SVGRenderer } from "two.js/src/renderers/svg";
import { Renderer as WebGLRenderer } from "two.js/src/renderers/webgl";

export type BoundingBox = {
top: number,
left: number,
right: number,
bottom: number,
width: number,
height: number
}
}
declare module "two.js/extras/jsm/zui" {
/**
Expand Down

0 comments on commit dc20c58

Please sign in to comment.