Created
October 27, 2019 16:42
-
-
Save akella/576f5219d59af9f825feb5392cd22702 to your computer and use it in GitHub Desktop.
basic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const canvasSketch = require("canvas-sketch"); | |
| const { fract, lerp, clamp, mapRange,clamp01,sign } = require('canvas-sketch-util/math'); | |
| const settings = { | |
| // Enable an animation loop | |
| animate: true, | |
| // Set loop duration to 3 seconds | |
| duration: 10, | |
| // Use a small size for our GIF output | |
| dimensions: [1080, 1920], | |
| // Optionally specify an export frame rate, defaults to 30 | |
| fps: 36 | |
| }; | |
| // Start the sketch | |
| const sketch = ({ width, height }) => { | |
| const render = ({ context, width, height, playhead }) => { | |
| context.fillStyle = "#080"; | |
| context.clearRect(0, 0, width, height); | |
| context.fillRect(0, 0, width, height); | |
| context.restore(); | |
| }; | |
| return render; | |
| }; | |
| canvasSketch(sketch, settings); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment