Git Product home page Git Product logo

tutorial-motioncanvas's Introduction

motioncanvas-tutorial

A sandbox for learning motion-canvas tooling

Installation Instructions

Note: when installing, Motion Canvas will come with a built-in Image sequence exporter. To export the animation as a finished video, install with the FFmpeg exporter option.

npm init @motion-canvas@latest
cd <project-path>
npm install

Running Instructions

Note: the editor/preview can be accessed at http://localhost:9000/ after serving.

npm run serve

Understanding Motion-Canvas

When the yield keyword is encountered, the execution of the function pauses, and resumes only when the caller requests another value. This is particularly useful when declaring animations - usually we want to change the things on the screen in incremental steps to create an illusion of movement. We also want to wait a constant amount of time between these updates so that our eyes can register what's happening. With generators, we can update things in-between the yield keywords, and then wait for a bit whenever the function yields.

This is the fundamental idea of Motion Canvas. yield means: "The current frame is ready, display it on the screen and come back to me later."

Flow Generators

  • all
    • run all tasks concurrently and wait for all of them to finish
  • any
    • run all tasks concurrently and wait for any of them to finish
  • chain
    • run tasks one after another
  • delay
    • run given generator or callback after a specific amount of time
  • sequence
    • start all tasks one after another with a constant delay between
  • loop
    • run generator N times

tutorial-motioncanvas's People

Contributors

totally-not-frito-lays avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.