Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 2.63 KB

File metadata and controls

55 lines (39 loc) · 2.63 KB

Creative Coding: Making Visuals with JavaScript

Online course available at: Creative Coding: Making Visuals with JavaScript

# To launch browser, run in terminal:
canvas-sketch file-name.js --open

#To assign output folder for screenshots:
canvas-sketch file-name.js --output=[folder path]

# Cmd + Shift + S or Ctrl + Shift + S to export an animation, it will begin recording image frames and log progress in the browser console. You can hit this keystroke again to stop recording. First install ffmpeg to stream frames into an MP4 or GIF file:
npm install @ffmpeg-installer/ffmpeg --global

# Save animations to MP4 file
canvas-sketch animation.js --output=tmp --stream

# Save animations to GIF file instead
canvas-sketch animation.js --output=tmp --stream=gif

# Save animations to GIF but scale it down to 512 px wide
canvas-sketch animation.js --output=tmp --stream [ gif --scale=512:-1 ]

Tool Stack

Sample Sketches

yellow square superimposed on grid of smaller squares square made of grid of smaller squares

spinning circles of varying greens rays around a circle of varying widths and lengths

dots moving attached via colorful lines dots moving attached via colorful lines