From c9fe91db30a2afec2dbfed48fcd346156225a06a Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Sun, 14 Nov 2021 21:28:07 +0100 Subject: [PATCH] Done: refactor sequencing non-scalars --- .../core/src/sequences/interpolationTripleAtPosition.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/theatre/core/src/sequences/interpolationTripleAtPosition.ts b/theatre/core/src/sequences/interpolationTripleAtPosition.ts index 0d29b25..402dafa 100644 --- a/theatre/core/src/sequences/interpolationTripleAtPosition.ts +++ b/theatre/core/src/sequences/interpolationTripleAtPosition.ts @@ -14,6 +14,13 @@ export type InterpolationTriple = { progression: number } +// @remarks This new implementation supports sequencing non-scalars, but it's also heavier +// on the GC. This shouldn't be a problem for the vast majority of users, but it's also a +// low-hanging fruit for perf optimization. +// It can be improved by: +// 1. Not creating a new InterpolationTriple object on every change +// 2. Caching propConfig.sanitize(value) + export default function interpolationTripleAtPosition( trackP: Pointer, timeD: IDerivation,