Skip to content

Implement Sequences#133

Merged
ydaniv merged 34 commits intomasterfrom
implement-sequences
Mar 12, 2026
Merged

Implement Sequences#133
ydaniv merged 34 commits intomasterfrom
implement-sequences

Conversation

@ydaniv
Copy link
Collaborator

@ydaniv ydaniv commented Feb 23, 2026

Description

Related Issue

Checklist

  • I have read the Contributing Guide
  • I have added/updated tests for my changes (if applicable)
  • I have updated documentation/rules/skills (if applicable)

Screenshots / Demos

Additional Notes

const cached = Interact.sequenceCache.get(cacheKey);
if (cached) return cached;

const sequence = getSequence(sequenceOptions, animationGroupArgs, context);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using motion getSequence inside getSequence is confusing i would give it an alias.

if (_isSequenceConfigRef(seqOrRef)) {
const resolved = instance.dataCache.sequences[seqOrRef.sequenceId];

if (!resolved) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think silently failing here is hard for development i would add a console.warn for trying to reference an undefined sequence.

const effectOptions = {
...(effectId ? instance.dataCache.effects[effectId] || {} : {}),
...effect,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for (const effect of seqEffects) {
  const effectId = (effect as EffectRef).effectId;
  const resolvedEffect = effectId
    ? instance.dataCache.effects[effectId] ?? {}
    : {};

  const effectOptions = { ...resolvedEffect, ...effect };
  .
  .
  .
}

i feel this is more readable

ydaniv added 5 commits March 10, 2026 19:37
# Conflicts:
#	.cursor/plans/sequence_docs_and_demos_9e654633.plan.md
#	packages/interact/src/core/Interact.ts
#	packages/interact/test/sequences.spec.ts
#	packages/motion/src/Sequence.ts
#	packages/motion/test/Sequence.spec.ts
@ydaniv ydaniv merged commit c51f608 into master Mar 12, 2026
1 check passed
@ydaniv ydaniv deleted the implement-sequences branch March 12, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants