Skip to content

Based on "Creative Coding: Making Visuals with JavaScript" Domestika course

License

Notifications You must be signed in to change notification settings

null-null-eins-zwei/canvas-sketch-basics

Repository files navigation

canvas-sketch-basics

This repo is based on "Creative Coding: Making Visuals with JavaScript" Domestika course.

Raw HTML Canvas API usage

raw-canvas.html is an example of usage raw canvas API including basic animation .

Links to additional resources:

canvas-sketch is a loose collection of tools, modules and resources for creating generative art in JavaScript and the browser.

CLI setup

Basic CLI usage

canvas-sketch-util

Utilities for generative art in Canvas, WebGL and JavaScript.

This is designed to be used alongside the canvas-sketch toolset, but it is generic enough to work for various Node.js/Browser use cases.

Animation export

  • We can save anything we draw with Ctrl + S.
  • By default export save in ~\Downloads folder. To set another folder, use --output flag.
  • When you use Ctrl + Shift + S to export an animation, it will begin recording image frames as separate files and log progress in the browser console. You can hit this keystroke again to stop recording.
  • To save animation as video we need ffmpeg:
    • npm install @ffmpeg-installer/ffmpeg --global
  • Run with video-export mode: canvas-sketch canvas-sketch-demo.js --output=output/stream-demo --stream
  • Details: https://github.com/mattdesl/canvas-sketch/blob/master/docs/exporting-artwork.md#exporting-animations

Tweakpane

Compact pane library for fine-tuning parameters and monitoring value changes.

About

Based on "Creative Coding: Making Visuals with JavaScript" Domestika course

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published