MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / pathTravels

Function pathTravels

packages/cli/src/commands/keyframes.ts:519–523  ·  view source on GitHub ↗
(points: Array<{ x: number; y: number }>)

Source from the content-addressed store, hash-verified

517// y) is not a pen stroke — exclude it so repeated in-place tweens don't
518// masquerade as a multi-stroke trace.
519function pathTravels(points: Array<{ x: number; y: number }>): boolean {
520 const first = points[0];
521 if (!first) return false;
522 return points.some((p) => Math.abs(p.x - first.x) > 0.5 || Math.abs(p.y - first.y) > 0.5);
523}
524
525// Group an element's DRAWN position strokes (to/from/fromTo/keyframes that carry
526// a path) into one ordered trace. A `set` with x/y is a pen-up jump — excluded

Callers 1

groupTracesFunction · 0.85

Calls 1

absMethod · 0.80

Tested by

no test coverage detected