Opus Motion ★ Star on GitHub

Shapes · gears

Meshing gears

Procedural hatched cog wheels pop in and mesh, counter-rotating at the correct tooth ratios; coloured-pencil gears on paper or white line-art gears on black.

A free, MIT-licensed shape animation from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Meshing gears: three frames of the shape animation, start, middle and end
Meshing gears — start, middle and end of the 5.0-second motion.

What Meshing gears is for

"How it works" / process / mechanism sections, cause and effect, teamwork, machinery of an idea.

  • gears
  • mechanism
  • process
  • machine
  • hatch

Details

Category
Shape & geometric animations
Length
5.0 s (150 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
—
Colour props
—
Mood
light, paper, blueprint
Roles
subject
Pairs with
Smoke puffs, Line-art draw-on, Chapter header

Use Meshing gears in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add gears --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render gears --props '{"style":"filled","gears":[],"module":22,"speed":14}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export gears --as mp4 --props '{"style":"filled","gears":[],"module":22,"speed":14}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="gears"
  props={{style: 'filled', gears: [], module: 22, speed: 14}}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="gears"
  props='{"style":"filled","gears":[],"module":22,"speed":14}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "gears",
      "props": {
        "style": "filled",
        "gears": [],
        "module": 22,
        "speed": 14
      }
    }
  ]
}

Meshing gears props

9 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
style"filled""filled" (video20 coloured pencil on paper) or "line" (video19 white line art on black)
gears[]list of {teeth, parent, angle(deg), color?}: each gear meshes with its parent at that angle; [] = built-in 8-gear train
module22tooth size in u (pitch radius = module x teeth / 2)
speed14root gear speed in degrees per second (children follow the tooth ratio)
colors[]gear fill colours, cycled ([] = style palette)
background""background colour ("" = style default)
inkColor""outline colour ("" = style default)
hatchtruepencil hatching on the faces
origin[][x, y] of the root gear as fractions of the frame ([] = default)

Notes & credits

Technique sources:

  • video20 3:03.7-3:09
  • video19 0:13.35-0:14.4 (background gears)