Skip to content

Commit 865ab94

Browse files
committed
Update mask type to allow null in Group and Text
Changed the type of the 'mask' property in both Two.Group and Two.Text definitions to accept 'null' in addition to 'Shape' and 'undefined', improving type safety and clarity.
1 parent 2b11dc6 commit 865ab94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

types.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,7 @@ declare module 'two.js/src/group' {
17241724
* @name Two.Group#mask
17251725
* @property {Shape} - The Two.js object to clip from a group's rendering.
17261726
*/
1727-
mask: Shape | undefined;
1727+
mask: Shape | null | undefined;
17281728
/**
17291729
* @name Two.Group#strokeAttenuation
17301730
* @property {Boolean} - When set to `true`, stroke width scales with transformations (default behavior). When `false`, stroke width remains constant in screen space for all child shapes.
@@ -4296,7 +4296,7 @@ declare module 'two.js/src/text' {
42964296
* @property {Shape} - The shape whose alpha property becomes a clipping area for the text.
42974297
* @nota-bene This property is currently not working becuase of SVG spec issues found here {@link https://code.google.com/p/chromium/issues/detail?id=370951}.
42984298
*/
4299-
mask: any;
4299+
mask: Shape | null | undefined;
43004300
/**
43014301
* @name Two.Text#clip
43024302
* @property {Shape} - Object to define clipping area.

0 commit comments

Comments
 (0)