Published
Edited
Oct 14, 2021
Insert cell
Insert cell
w = 540
Insert cell
h = 540
Insert cell
p = getRandomPalette()
Insert cell
palette = shuffle(p)
Insert cell
displayPalettes(palette)
Insert cell
bnb({
w, h,
numFrames: 120,
fps: 30,
record: true,
// video: true,

setup: (s, g) => {},

draw: (s, t, g) => {
s.background(palette[0])
s.noStroke()

const t1 = easing.easeQuadInOut(linearstep(t, 0, 0.125))
s.fill(palette[1])
s.rect(0, 0, t1 * w, h)
}
})
Insert cell
Insert cell
import {bnb} from '@makio135/bnb'
Insert cell
import {random, randInt, array, shuffle, linearstep} from '@makio135/utilities'
Insert cell
import {getRandomPalette, displayPalettes, scales, ramp} from '@makio135/give-me-colors'
Insert cell
easing = require('d3-ease')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more