mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 19:42:39 +08:00
6d10f68ef8
* AnimationCurve * Mark curve frame values as uniquelyReferenced * Adjust modules * Update * Manually implements KeyframeCurve.iterator * TargetPath * Update * Fix BUG * Fix * Add size track * Update * Fix size; unit tests * fix split animation (#24) * CCONB animation clip; Remove integer track/channel/curve * Optimize key shared curves * Remove keyframecurve.empty * Exotic animation * Fix unit tests * start/end -> left/right * Curve range rename * Easing methods * Fix untyped track * Fix * fix upgradUnTypedTracks (#26) * Rename .interpMode -> .interpolationMode RealInterpMode -> RealInterpolationMode QuaternionInterpMode -> QuaternionInterpolationMode ExtrapMode -> ExtrapolationMode .preExtrap -> .preExtrapolation .postExtrap -> .postExtrapolation QuaternionCurve -> QuatCurve QuaternionKeyframeValue -> QuatKeyframeValue * Update pre/post extrap * Optimize-1 * Optimize-2 * Eliminate for-of * Mark deprecateds * Hide RealKeyframeValue/QuatKeyframeValue Constructor * Fix quat keyframe value name * Error ID * Fix RealKeyframeValue editor extras * Elimanate for-of forEach Co-authored-by: zheng han <sunstar198941@gmail.com>
11 lines
220 B
TypeScript
11 lines
220 B
TypeScript
import type { Curve } from './track';
|
|
|
|
export function maskIfEmpty<T extends Curve> (curve: T) {
|
|
return curve.keyFramesCount === 0 ? undefined : curve;
|
|
}
|
|
|
|
export interface Range {
|
|
min: number;
|
|
max: number;
|
|
}
|