# Behavior traces — motiondivision/motion

> Canonical page: https://codevetter.com/unpack/motion/behavior-traces

# Behavior traces — motiondivision/motion

Scanned commit f5838ce47b323ce2713cb2effc5afaa5b6120a44 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Three principal flows were followed across concrete source files: playground startup, imperative DOM animation, and scroll-driven playback. Additional traces cover React component mounting, scoped cleanup, exit completion, and browser view transitions. These traces describe execution order and material branches observed in source. They do not report runtime verification.
- Playground startup: main.tsx calls createRoot(...).render(<StrictMode><App/></StrictMode>); App eagerly imports fixture App exports, reads example/test query parameters, prioritizes example, and renders the selected module or ExampleList. — [dev/react/src/main.tsx#L1-L10](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/dev/react/src/main.tsx#L1-L10) [dev/react/src/App.tsx#L3-L28](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/dev/react/src/App.tsx#L3-L28) [dev/react/src/App.tsx#L40-L50](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/dev/react/src/App.tsx#L40-L50)
- Primary animation entry: motion → framer-motion/dom → createScopedAnimate's scopedAnimate → animateSubject → resolveSubjects; sequence-shaped input instead enters animateSequence before subject dispatch. — [packages/motion/src/index.ts#L1-L1](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/motion/src/index.ts#L1-L1) [packages/framer-motion/src/dom.ts#L4-L4](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/dom.ts#L4-L4) [packages/framer-motion/src/animation/animate/index.ts#L119-L141](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/animation/animate/index.ts#L119-L141) [packages/framer-motion/src/animation/animate/subject.ts#L99-L119](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/animation/animate/subject.ts#L99-L119)
- DOM animation continuation: animateSubject → animateElement → animateValues or animateEffectSubject → value.start(animateMotionValue(...)) → AsyncMotionValueAnimation → keyframe resolution → native animation or JSAnimation; NativeAnimation construction failures take the JS branch. — [packages/framer-motion/src/animation/animate/subject.ts#L143-L157](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/animation/animate/subject.ts#L143-L157) [packages/motion-dom/src/animation/animate/element.ts#L74-L91](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/motion-dom/src/animation/animate/element.ts#L74-L91) [packages/motion-dom/src/animation/animate/effects.ts#L98-L113](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/motion-dom/src/animation/animate/effects.ts#L98-L113) [packages/motion-dom/src/animation/AsyncMotionValueAnimation.ts#L171-L189](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/motion-dom/src/animation/AsyncMotionValueAnimation.ts#L171-L189)
- Scroll playback: scroll defaults axis/container and calls attachToAnimation; compatible native ranges attach a cached ScrollTimeline/ViewTimeline, while fallback observe pauses controls and sets time to iterationDuration × measured axis progress. — [packages/framer-motion/src/render/dom/scroll/index.ts#L7-L29](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/render/dom/scroll/index.ts#L7-L29) [packages/framer-motion/src/render/dom/scroll/attach-animation.ts#L22-L24](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/render/dom/scroll/attach-animation.ts#L22-L24) [packages/framer-motion/src/render/dom/scroll/attach-animation.ts#L52-L85](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/render/dom/scroll/attach-animation.ts#L52-L85) [packages/framer-motion/src/render/dom/scroll/utils/get-timeline.ts#L30-L50](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/render/dom/scroll/utils/get-timeline.ts#L30-L50)
- Scroll measurement and disposal: scrollInfo creates handlers and one listener per container; scroll events schedule measureAll in frame.read, then notifyAll in preUpdate; final subscriber removal releases scroll/resize listeners and content-size polling. — [packages/framer-motion/src/render/dom/scroll/track.ts#L27-L85](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/render/dom/scroll/track.ts#L27-L85) [packages/framer-motion/src/render/dom/scroll/track.ts#L120-L156](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/render/dom/scroll/track.ts#L120-L156)
- React mount: motion proxy property access creates/caches a component; createMotionComponent initializes visual state and browser-only VisualElements; layout effects update features and schedule rendering, and animateChanges normally runs in a passive effect but runs earlier for optimized-appear handoff. — [packages/framer-motion/src/render/components/create-proxy.ts#L67-L85](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/render/components/create-proxy.ts#L67-L85) [packages/framer-motion/src/motion/index.tsx#L100-L131](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/motion/index.tsx#L100-L131) [packages/framer-motion/src/motion/utils/use-visual-element.ts#L148-L183](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/motion/utils/use-visual-element.ts#L148-L183)
- Scoped and presence completion: useAnimate registers groups in scope.animations and stops remaining groups on unmount; AnimatePresence marks individual exits complete, waits for all tracked exits, re-diffs children, and invokes safeToRemove/onExitComplete. — [packages/framer-motion/src/animation/animate/index.ts#L144-L154](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/animation/animate/index.ts#L144-L154) [packages/framer-motion/src/animation/hooks/use-animate.ts#L25-L30](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/animation/hooks/use-animate.ts#L25-L30) [packages/framer-motion/src/components/AnimatePresence/index.tsx#L202-L231](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/framer-motion/src/components/AnimatePresence/index.tsx#L202-L231)
- View transition: startViewAnimation names/measures old layers and commits CSS, calls document.startViewTransition(callback), awaits update(), resolves/measures new layers and crop rules, wraps generated animations, and removes names/CSS on completion; unsupported browsers execute update without animation. — [packages/motion-dom/src/view/start.ts#L78-L84](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/motion-dom/src/view/start.ts#L78-L84) [packages/motion-dom/src/view/start.ts#L441-L488](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/motion-dom/src/view/start.ts#L441-L488) [packages/motion-dom/src/view/start.ts#L827-L829](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/motion-dom/src/view/start.ts#L827-L829) [packages/motion-dom/src/view/start.ts#L875-L889](https://github.com/motiondivision/motion/blob/f5838ce47b323ce2713cb2effc5afaa5b6120a44/packages/motion-dom/src/view/start.ts#L875-L889)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
