Opus Motion ★ Star on GitHub

Data · floorplan-draw

Floor plan draw

A top-down floor plan draws itself room by room: walls trace on, each room tints and gets its name and a counting area figure, door swings appear, dimension lines measure the whole footprint and a total-area chip counts up.

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

Floor plan draw: three frames of the animated chart, start, middle and end
Floor plan draw — start, middle and end of the 7.0-second motion.

What Floor plan draw is for

Real-estate listings and new-build promos, interior design and renovation reveals, office or store layouts, venue plans. Describe the layout with a rooms list of {label, x, y, w, h} in your own units (metres, feet); areas are computed or given.

  • floor plan
  • floorplan
  • blueprint
  • rooms
  • architecture
  • real estate
  • interior
  • layout
  • property
  • area
  • dimensions
  • draw on
  • plan view
  • overlay

Details

Category
Animated charts & data visualisation
Length
7.0 s (210 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
title subtitle unit
Colour props
colors background ink paper accent
Mood
blueprint
Roles
accent, subject

Use Floor plan draw in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render floorplan-draw --props '{"title":"Open-plan apartment","subtitle":"Seven rooms on one level","unit":"m","colors":["#F2A65A","#6CC5B0","#7FA8F2","#E88FB2","#B79BE8","#F2D16B","#8BCB7A"],"background":"#EEF1F4","ink":"#1C2733","paper":"#FBFCFD","accent":"#2F6FED"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export floorplan-draw --as webm-alpha --props '{"title":"Open-plan apartment","subtitle":"Seven rooms on one level","unit":"m","colors":["#F2A65A","#6CC5B0","#7FA8F2","#E88FB2","#B79BE8","#F2D16B","#8BCB7A"],"background":"#EEF1F4","ink":"#1C2733","paper":"#FBFCFD","accent":"#2F6FED"}'

React / Next.js

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

<MotionPlayer
  motion="floorplan-draw"
  props={{
    title: 'Open-plan apartment',
    subtitle: 'Seven rooms on one level',
    unit: 'm',
    colors: [
      '#F2A65A',
      '#6CC5B0',
      '#7FA8F2',
      '#E88FB2',
      '#B79BE8',
      '#F2D16B',
      '#8BCB7A',
    ],
    background: '#EEF1F4',
    ink: '#1C2733',
    paper: '#FBFCFD',
    accent: '#2F6FED',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="floorplan-draw"
  props='{"title":"Open-plan apartment","subtitle":"Seven rooms on one level","unit":"m","colors":["#F2A65A","#6CC5B0","#7FA8F2","#E88FB2","#B79BE8","#F2D16B","#8BCB7A"],"background":"#EEF1F4","ink":"#1C2733","paper":"#FBFCFD","accent":"#2F6FED"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "floorplan-draw",
      "props": {
        "title": "Open-plan apartment",
        "subtitle": "Seven rooms on one level",
        "unit": "m",
        "colors": [
          "#F2A65A",
          "#6CC5B0",
          "#7FA8F2",
          "#E88FB2",
          "#B79BE8",
          "#F2D16B",
          "#8BCB7A"
        ],
        "background": "#EEF1F4",
        "ink": "#1C2733",
        "paper": "#FBFCFD",
        "accent": "#2F6FED"
      }
    }
  ]
}

Floor plan draw props

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

PropDefaultWhat it does
title"Open-plan apartment"headline (empty = none)
subtitle"Seven rooms on one level"line under the headline (empty = none)
rooms[{"label":"Living room","x":0,"y":0,"w":7,"h":5},{"label":"Kitchen","x":7,"y":0,"w":5,"…rooms [{label, x, y, w, h, color?, area?}] in your own units, top-left origin, up to 16; area defaults to w x h
doors[{"x":1.2,"y":0,"size":1.1,"orient":"h","swing":1},{"x":7,"y":1,"size":1,"orient":"v","…doors [{x, y, size?, orient?("h" on a horizontal wall / "v"), swing?(1 or -1)}] placed on walls in the same units
unit"m"length unit for the dimension lines
areaUnit"m²"area unit written after the numbers
totalLabel"Total area"caption on the total-area chip
showTotaltrueshow the total-area chip
showDimensionstrueshow the overall width / depth dimension lines
colors["#F2A65A","#6CC5B0","#7FA8F2","#E88FB2","#B79BE8","#F2D16B","#8BCB7A"]palette for rooms without their own colour
background"#EEF1F4"page colour, or "transparent"
ink"#1C2733"wall and text colour
paper"#FBFCFD"drawing sheet colour
accent"#2F6FED"dimension, door and chip colour
fontFamily""CSS font family (empty = Space Grotesk)
startAt6frame the first room starts drawing
speed1animation speed multiplier

Notes & credits

Technique sources:

  • original round-3 vertical motion