Skip to content

Commit d9fc3f0

Browse files
committed
add nearestKey() method to property
1 parent df7606d commit d9fc3f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ export interface Property {
153153
isClosed: boolean
154154
): PathValue;
155155
key(indexOrName: number | string): Key;
156+
nearestKey(time: number): Key;
156157
propertyGroup(countUp: number): PropertyGroup;
157158
}
158159

@@ -189,6 +190,7 @@ export const PropertyBase: PathProperty = {
189190
createPath: (points, inTangents = [], outTangent = [], isClosed = true) =>
190191
PathBase,
191192
key: (indexOrName) => KeyBase,
193+
nearestKey: (t) => KeyBase,
192194
propertyGroup: (countUp = 1) => PropertyGroupBase,
193195
points: (t = time) => PointsBase,
194196
inTangents: (t = time) => PointsBase,

0 commit comments

Comments
 (0)